[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070112102740.GC28611@wotan.suse.de>
Date: Fri, 12 Jan 2007 11:27:40 +0100
From: Nick Piggin <npiggin@...e.de>
To: Alan <alan@...rguk.ukuu.org.uk>
Cc: Andrew Morton <akpm@...l.org>, Ingo Molnar <mingo@...e.hu>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [patch] sched: avoid div in rebalance_tick
On Fri, Jan 12, 2007 at 09:59:40AM +0000, Alan wrote:
> On Fri, 12 Jan 2007 07:02:13 +0100
> Nick Piggin <npiggin@...e.de> 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.
Well integer divide unit is non-pipelined on P4 K8 Core2 and probably
most processors, AFAIK. So the 3 divs would take 240 cycles on a P4,
perhaps.
> How about putting back scale = 1 and using
>
> scale += scale;
>
> instead of the shift and getting what ought to be even better results
Yes I gues we ccan do this as well, good idea. I'll make a
quick userspace benchmark and post some numbers with my next
submission.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists