[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <499BDDFE.5010101@trash.net>
Date: Wed, 18 Feb 2009 11:07:58 +0100
From: Patrick McHardy <kaber@...sh.net>
To: Ingo Molnar <mingo@...e.hu>
CC: Stephen Hemminger <shemminger@...tta.com>,
David Miller <davem@...emloft.net>,
Rick Jones <rick.jones2@...com>,
Eric Dumazet <dada1@...mosbay.com>, netdev@...r.kernel.org,
netfilter-devel@...r.kernel.org, tglx@...utronix.de,
Martin Josefsson <gandalf@...g.westbo.se>
Subject: Re: [RFT 2/4] Add mod_timer_noact
Ingo Molnar wrote:
>> -extern int __mod_timer(struct timer_list *timer, unsigned long expires);
>> +extern int __mod_timer(struct timer_list *timer, unsigned long expires, int activate);
>
> This is not really acceptable, it slows down every single
> add_timer() and mod_timer() call in the kernel with a flag that
> has one specific value in all but your case. There's more than
> 2000 such callsites in the kernel.
>
> Why dont you use something like this instead:
>
> if (del_timer(timer))
> add_timer(timer);
We need to avoid having a timer that was deleted by one CPU
getting re-added by another, but want to avoid taking the
conntrack lock for every timer update. The timer-internal
locking is enough for this as long as we have a mod_timer
variant that forwards a timer, but doesn't activate it in
case it isn't active already.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists