Re: [PATCH] sched_ext: Fix incorrect time delta calculation in time_delta()
From: Tejun Heo
Date: Sun Feb 02 2025 - 12:42:10 EST
On Sun, Feb 02, 2025 at 12:37:48PM +0900, Changwoo Min wrote:
> When (s64)(after - before) > 0, the code returns the result of
> (s64)(after - before) > 0 while the intended result should be
> (s64)(after - before). That happens because the middle operand of
> the ternary operator was omitted incorrectly, returning the result of
> (s64)(after - before) > 0. Thus, add the middle operand
> -- (s64)(after - before) -- to return the correct time calculation.
>
> Fixes: d07be814fc71 ("sched_ext: Add time helpers for BPF schedulers")
> Signed-off-by: Changwoo Min <changwoo@xxxxxxxxxx>
Applied to sched_ext/for-6.14-fixes.
Thanks.
--
tejun