From: Nick Piggin Date: Mon, 12 Feb 2007 08:53:51 +0000 (-0800) Subject: [PATCH] sched: avoid div in rebalance_tick X-Git-Tag: v2.6.21-rc1~274^2~96 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ff91691bccdb741efb2df0489058a4961fa79598;p=pandora-kernel.git [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 Cc: Ingo Molnar Cc: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed