lkml.org 
[lkml]   [2003]   [Oct]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: simple mod_timer patch
Forgot to mention.. please leave me on the CC list. Thanks!
Steve



Steve Modica wrote:
> I pulled this back from the 2.6 kernel to reduce some serious contention
> on the timerlist_lock when I had 8 gigabit cards runnings.
>
>
> diff -u -r1.23 -r1.24
> --- linux/linux/kernel/timer.c 2003/08/11 20:16:19 1.23
> +++ linux/linux/kernel/timer.c 2003/10/01 21:09:20 1.24
> @@ -207,6 +207,14 @@
> int ret;
> unsigned long flags;
>
> + /*
> + * This is a common optimization triggered by the
> + * networking code - if the timer is re-modified
> + * to be the same thing then just return:
> + */
> + if (timer->expires == expires && timer_pending(timer))
> + return 1;
> +
> spin_lock_irqsave(&timerlist_lock, flags);
> timer->expires = expires;
> ret = detach_timer(timer);
>
>
>


--
Steve Modica
work: 651-683-3224
MTS-Technical Lead
"Give a man a fish, and he will eat for a day, hit him with a fish and
he leaves you alone" - me

-
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: 2005-03-22 13:49    [from the cache]
©2003-2011 Jasper Spaans