Re: [PATCH] um: insert scheduler ticks when userspace does not yield

2024-09-24 Thread Benjamin Berg
On Mon, 2024-09-23 at 23:50 +0200, Benjamin Beichler wrote: > Hi, > > Am 23.09.2024 um 16:48 schrieb Benjamin Berg: > > > Actually, I think, timeouts are no problem, if we can assure, that a > > > timeout is never rounded down to 0. Mostly a direct input of 0 have > > > special meanings, or provok

Re: [PATCH] um: insert scheduler ticks when userspace does not yield

2024-09-23 Thread Benjamin Beichler
Hi, Am 23.09.2024 um 16:48 schrieb Benjamin Berg: Actually, I think, timeouts are no problem, if we can assure, that a timeout is never rounded down to 0. Mostly a direct input of 0 have special meanings, or provokes wrong behavior in the first place from user space program. I don't think that

Re: [PATCH] um: insert scheduler ticks when userspace does not yield

2024-09-23 Thread Benjamin Berg
On Mon, 2024-09-23 at 15:56 +0200, Benjamin Beichler wrote: > > > For "clean" semantics of a simulative execution of the kernel, it feels > > > erroneous to advance time even if this value is only read once. > > > > > > In my experiments timer_read was called much more often than I > > > anticipat

Re: [PATCH] um: insert scheduler ticks when userspace does not yield

2024-09-23 Thread Benjamin Beichler
For "clean" semantics of a simulative execution of the kernel, it feels erroneous to advance time even if this value is only read once. In my experiments timer_read was called much more often than I anticipated (e.g., filesystem code). Yeah, that does not really sound like something we would wan

Re: [PATCH] um: insert scheduler ticks when userspace does not yield

2024-09-19 Thread Benjamin Berg
Hi, On Thu, 2024-09-19 at 16:37 +0200, Benjamin Beichler wrote: > Am 19.09.2024 um 16:22 schrieb Benjamin Berg: > > > Could this also eliminate/address the busy-loop hack in timer_read in > > > time.c? > > Hmm, I was considering changing the other hack in handle_syscall to > > also use this approa

Re: [PATCH] um: insert scheduler ticks when userspace does not yield

2024-09-19 Thread Benjamin Beichler
Am 19.09.2024 um 16:22 schrieb Benjamin Berg: Could this also eliminate/address the busy-loop hack in timer_read in time.c? Hmm, I was considering changing the other hack in handle_syscall to also use this approach. But, I don't think the timer_read hack can be removed. In the case of userspace

Re: [PATCH] um: insert scheduler ticks when userspace does not yield

2024-09-19 Thread Benjamin Berg
Hi, On Thu, 2024-09-19 at 16:11 +0200, Benjamin Beichler wrote: > Could this also eliminate/address the busy-loop hack in timer_read in > time.c? Hmm, I was considering changing the other hack in handle_syscall to also use this approach. But, I don't think the timer_read hack can be removed. In

Re: [PATCH] um: insert scheduler ticks when userspace does not yield

2024-09-19 Thread Benjamin Beichler
Hi, Could this also eliminate/address the busy-loop hack in timer_read in time.c? And another question: Why you remove only 1 extra jiffy in the timer callbacks and not all the extra jiffies? Is there always only 1 or could there be multiple? regards Benjamin Beichler Am 13.09.2024 um 22