| To: | netdev@xxxxxxxxxxx |
|---|---|
| Subject: | mod_timer improvement |
| From: | Steve Modica <modica@xxxxxxx> |
| Date: | Thu, 02 Oct 2003 11:54:59 -0500 |
| Organization: | SGI |
| Sender: | netdev-bounce@xxxxxxxxxxx |
| User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4b) Gecko/20030425 |
This improves mod_timer scaling quite drastically. It's already in the 2.6 kernel. I've been testing with 8 cpus, 8 threads and 8 cards and mod_timer ends up taking up more time than tg_poll without this change. *** /hosts/bonnie.engr.sgi.com//proj/sgilinux/lbs/isms/linux/linux/kernel/timer.c 2003/08/11 20:16:19 1.23 --- /hosts/bonnie.engr.sgi.com//proj/sgilinux/lbs/isms/linux/linux/kernel/timer.c 2003/10/01 21:09:20 1.24 *************** *** 207,212 **** --- 207,220 ---- 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 mobile: 651-261-3201 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 |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: Fw: [BUG/PATCH] CONFIG_NET_HW_FLOWCONTROL and SMP, Robert Olsson |
|---|---|
| Next by Date: | Re: mod_timer improvement, Steve Modica |
| Previous by Thread: | Re: Fw: [BUG/PATCH] CONFIG_NET_HW_FLOWCONTROL and SMP, Robert Olsson |
| Next by Thread: | Re: mod_timer improvement, Steve Modica |
| Indexes: | [Date] [Thread] [Top] [All Lists] |