Re: readprofile from 2.5.25 web server benchmark

From: Andrew Morton (akpm@zip.com.au)
Date: Tue Jul 09 2002 - 15:25:02 EST


kuznet@ms2.inr.ac.ru wrote:
>
> Hello!
>
> > --- 2.5.25/kernel/timer.c~timer-speedup Tue Jul 9 00:04:33 2002
> > +++ 2.5.25-akpm/kernel/timer.c Tue Jul 9 00:06:09 2002
> > @@ -211,6 +211,9 @@ int mod_timer(struct timer_list *timer,
> > int ret;
> > unsigned long flags;
> >
> > + if (timer_pending(timer) && timer->expires == expires)
> > + return 1;
> > +
> > spin_lock_irqsave(&timerlist_lock, flags);
> > timer->expires = expires;
> > ret = detach_timer(timer);
>
> Does this not lose timer sometimes?
>

Well I've thought about it long and hard, but I can't see a
hole. But there probably is one. Somewhere.

It reduces mod_timer() load by 30% in a netperf run, so it's
worth thinking about.

-
-
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/



This archive was generated by hypermail 2b29 : Mon Jul 15 2002 - 22:00:16 EST