Re: [PATCH 19/39] sched_ext: Print sched_ext info when dumping stack

From: Linus Torvalds
Date: Mon Jun 24 2024 - 10:25:56 EST


On Mon, 24 Jun 2024 at 08:46, Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
>
> Also, if we consider 2s complement, does the above actually make sense?

jiffies_to_msecs() does not work on 2s complement. It just takes
'unsigned long', and just considers large positive numbers to be
exactly that - not a negative jiffy.

We have a separate jiffies_delta_to_msecs(), but that clamps to zero.
So again, it doesn't actually work for negative jiffies.

Side note: jiffies_to_msecs() seems to return an "unsigned int". That
seems a bit odd.

Linus