Skip to content
Commit 364e3a3d authored by Jeff Dike's avatar Jeff Dike Committed by Linus Torvalds
Browse files

uml: fix !NO_HZ busy-loop



With NO_HZ disabled, the UML idle loop effectively becomes a busy loop, as
it will sleep for no time.

The cause was forgetting to restart the tick after waking up from sleep.
It was disabled before sleeping, and the remaining time used as the
interval to sleep.  So, the tick needs to be restarted when nanosleep
finishes.

This is done by introducing after_sleep_interval, which is empty in the
NO_HZ case, but which sets the tick starting in the !NO_HZ case.

Signed-off-by: default avatarJeff Dike <jdike@linux.intel.com>
Cc: Miklos Szeredi <miklos@szeredi.hu>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 9fc89c2d
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment