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

Benjamin Beichler Benjamin.Beichler at uni-rostock.de
Thu Sep 19 07:11:36 PDT 2024


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:17 schrieb Benjamin Berg:
> From: Benjamin Berg <benjamin.berg at intel.com>
> 
> In time-travel mode userspace can do a lot of work without any time
> passing. Unfortunately, this can result in OOM situations as the RCU
> core code will never be run.
> 
> Work around this by keeping track of userspace processes that do not
> yield for a lot of operations. When this happens, insert a jiffie into
> the sched_clock clock to account time against the process and cause the
> bookkeeping to run.
> 
> As sched_clock is used for tracing, it is useful to keep it in sync
> between the different VMs. As such, try to remove added ticks again when
> the actual clock ticks.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_0x1569BBF90AC3918A.asc
Type: application/pgp-keys
Size: 2976 bytes
Desc: OpenPGP public key
URL: <http://lists.infradead.org/pipermail/linux-um/attachments/20240919/aac232b7/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 236 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-um/attachments/20240919/aac232b7/attachment.sig>


More information about the linux-um mailing list