Re: [PATCH] sched: remove sched_find_first_bit()

From: Ingo Molnar
Date: Thu May 18 2017 - 03:14:27 EST



* Yury Norov <ynorov@xxxxxxxxxxxxxxxxxx> wrote:

> On Tue, May 16, 2017 at 10:30:42AM +0200, Ingo Molnar wrote:
> >
> > * Yury Norov <ynorov@xxxxxxxxxxxxxxxxxx> wrote:
> >
> > > I collected about 700 results in dmesg, and took 600 fastest.
> > > For the vanilla kernel, the average value is 368, and for patched
> > > kernel it is 388. It's 5% slower. But the standard deviation is
> > > really big for both series' - 131 and 106 cycles respectively, which
> > > is ~ 30%. And so, my conclusion is: there's no benefit in using
> > > sched_find_first_bit() comparing to find_first_bit().
> >
> > Erm, so you in essence claim:
> >
> > "according to measurements the new code is 5% slower, with a high, 30%
> > stddev, hence the new code is better!"
> >
> > Basic logic fail...
> >
> > Thanks,
> >
> > Ingo
>
> No, in essence I claim that scatter is so big (in both cases, and in
> case of vanilla kernel even bigger) that 5% is not a meaningful
> difference. To be specific - new measured value is inside the
> confidence interval of previous one.

Firstly, the high spread is due to the poor measurement method: by increasing the
number of measurements the standard deviation can be reduced.

Secondly, and most importantly, the claim you made based on the numbers is simply
false:

> > > And so, my conclusion is: there's no benefit in using
> > > sched_find_first_bit() comparing to find_first_bit().

you _measured no benefit_, and in fact the result you got is leaning towards it
being a benefit.

When doing a proper measurement it might strengthen, vanish or turn around - we
simply don't know.

Thanks,

Ingo