]> git.baikalelectronics.ru Git - kernel.git/commit
slow-work: use round_jiffies() for thread pool's cull and OOM timers
authorChris Peterson <cpeterso@cpeterso.com>
Tue, 16 Jun 2009 22:33:43 +0000 (15:33 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 17 Jun 2009 02:47:49 +0000 (19:47 -0700)
commitc0acb97ff2b2ecc84be801de5a351a1725fd37ac
tree83692d9eec2773e1d78628120f8e36807efe233b
parent7dab2cc550115e553ffda9f87f0cd25133e84a8c
slow-work: use round_jiffies() for thread pool's cull and OOM timers

Round the slow work queue's cull and OOM timeouts to whole second boundary
with round_jiffies().  The slow work queue uses a pair of timers to cull
idle threads and, after OOM, to delay new thread creation.

This patch also extracts the mod_timer() logic for the cull timer into a
separate helper function.

By rounding non-time-critical timers such as these to whole seconds, they
will be batched up to fire at the same time rather than being spread out.
This allows the CPU wake up less, which saves power.

Signed-off-by: Chris Peterson <cpeterso@cpeterso.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/slow-work.c