lkml.org 
[lkml]   [2010]   [May]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
DateMon, 10 May 2010 19:43:29 -0400
FromAndrew Morton <>
SubjectRe: [PATCH 2/2] cpuidle: Add a repeating pattern detector to the menu governor
On Mon, 10 May 2010 18:27:46 -0700 Arjan van de Ven <arjan@infradead.org> wrote:

> On Mon, 10 May 2010 14:38:50 -0700
> Andrew Morton <akpm@linux-foundation.org> wrote:
>
> > > + if (avg && stddev < STDDEV_THRESH)
> > > + data->predicted_us = avg;
> > > +}
> >
> > You got lucky there, because INTERVALS is a power of two. If someone
> > changes INTERVALS to 7, this code will ask for __udivdi3 and won't
> > link on i364.
>
> yeah you'd think it almost isn't an accident ;-)

If it was deliberate the code would read

avg >>= INTERVALS_SHIFT;

:-p


\
 
 \ /
  Last update: 2010-05-12 10:15    [from the cache]
©2003-2010