]> git.baikalelectronics.ru Git - kernel.git/commit
uml: fix !NO_HZ busy-loop
authorJeff Dike <jdike@addtoit.com>
Thu, 29 Nov 2007 00:21:51 +0000 (16:21 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Thu, 29 Nov 2007 17:24:53 +0000 (09:24 -0800)
commit44d677e70956310ef716419622524b170b61a97f
tree1e5c04d671c5fcc8c2e25c37b08378e95a7e4e11
parentb180b2b729be47b5d3cb4fd63e0b5ef28c0809d5
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: Jeff Dike <jdike@linux.intel.com>
Cc: Miklos Szeredi <miklos@szeredi.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/um/os-Linux/time.c