Re: RFC: conntrack: use mod_timer_pending()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Stephen Hemminger wrote:
On Wed, 10 Jun 2009 15:07:02 +0200
Patrick McHardy <kaber@xxxxxxxxx> wrote:

Patrick McHardy wrote:
This patch changes conntrack to use the new mod_timer_pending()
function, which only rearms the timer if it was still active.
This allows to only grab the lock in __nf_ct_refresh_acct when
accounting is used.

Anyone seing anything wrong with this?
 		if (acct) {
+			spin_lock_bh(&nf_conntrack_lock);
 			acct[CTINFO2DIR(ctinfo)].packets++;
 			acct[CTINFO2DIR(ctinfo)].bytes +=
 				skb->len - skb_network_offset(skb);
+			spin_unlock_bh(&nf_conntrack_lock);
 		}
In fact, we could additionally change it to use the per-conntrack lock.

That is what the conntrack RCU patch did.

Could you remind me which one exactly? There have been a lot of
patches passed around :)


--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux