lkml.org 
[lkml]   [2007]   [Jan]   [12]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateFri, 12 Jan 2007 09:59:40 +0000
FromAlan <>
SubjectRe: [patch] sched: avoid div in rebalance_tick
On Fri, 12 Jan 2007 07:02:13 +0100
Nick Piggin <npiggin@suse.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.

How about putting back scale = 1 and using

scale += scale;

instead of the shift and getting what ought to be even better results

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-01-12 10:19    [from the cache]
©2003-2008