Nick Piggin ff91691bcc [PATCH] sched: avoid div in rebalance_tick
Avoid expensive integer divide 3 times per CPU per tick.

A userspace test of this loop went from 26ns, down to 19ns on a G5; and
from 123ns down to 28ns on a P3.

(Also avoid a variable bit shift, as suggested by Alan. The effect
of this wasn't noticable on the CPUs I tested with).

Signed-off-by: Nick Piggin <npiggin@suse.de>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-12 09:48:37 -08:00
..
2006-09-11 13:32:30 -04:00
2006-12-08 08:28:46 -08:00
2007-02-11 10:51:32 -08:00
2006-12-30 10:56:43 -08:00
2006-12-07 08:39:25 -08:00
2006-03-26 08:57:03 -08:00
2006-12-07 08:39:36 -08:00
2006-12-04 02:00:22 -05:00
2006-12-15 08:47:51 -08:00
2007-02-07 10:37:12 -08:00
2007-02-07 10:37:12 -08:00
2006-09-29 09:18:12 -07:00
2007-02-09 17:39:36 -05:00
2005-04-16 15:20:36 -07:00
2007-02-11 10:51:32 -08:00
2006-12-10 09:55:41 -08:00
2006-04-19 16:27:18 -07:00
2006-12-07 08:39:25 -08:00
2006-07-10 13:24:25 -07:00