Re: [patch] sched: avoid div in rebalance_tick

2007-01-12 Thread Nick Piggin
On Fri, Jan 12, 2007 at 09:59:40AM +, Alan wrote: > On Fri, 12 Jan 2007 07:02:13 +0100 > Nick Piggin <[EMAIL PROTECTED]> wrote: > > > Just noticed this while looking at a bug. > > Avoid an expensive integer divide 3 times per CPU per tick. > > Integer divide is cheap on some modern processors

Re: [patch] sched: avoid div in rebalance_tick

2007-01-12 Thread Nick Piggin
On Fri, Jan 12, 2007 at 09:59:40AM +, Alan wrote: > On Fri, 12 Jan 2007 07:02:13 +0100 > Nick Piggin <[EMAIL PROTECTED]> wrote: > > > Just noticed this while looking at a bug. > > Avoid an expensive integer divide 3 times per CPU per tick. > > Integer divide is cheap on some modern processors

Re: [patch] sched: avoid div in rebalance_tick

2007-01-12 Thread Alan
On Fri, 12 Jan 2007 07:02:13 +0100 Nick Piggin <[EMAIL PROTECTED]> wrote: > Just noticed this while looking at a bug. > Avoid an expensive integer divide 3 times per CPU per tick. Integer divide is cheap on some modern processors, and multibit shift isn't on all embedded ones. How about putting

[patch] sched: avoid div in rebalance_tick

2007-01-11 Thread Nick Piggin
Just noticed this while looking at a bug. -- Avoid an expensive integer divide 3 times per CPU per tick. Signed-off-by: Nick Piggin <[EMAIL PROTECTED]> Index: linux-2.6/kernel/sched.c === --- linux-2.6.orig/kernel/sched.c +++ linux