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

Linus Torvalds
2024-06-24T14:25:39Z

On Mon, 24 Jun 2024 at 08:46, Peter Zijlstra <peterz@infradead.org> 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