Re: [PATCH 3/3] iptables: lock free counters (alternate version)
From: Eric Dumazet <hidden>
Date: 2009-02-03 21:08:33
From: Eric Dumazet <hidden>
Date: 2009-02-03 21:08:33
Stephen Hemminger a écrit :
quoted
General/intuitive idea would be : switch pointers to a newly allocated table (and zeroed counters) wait one RCU grace period collect/sum all counters of "old" table + (all cpus) into user provided table restore previous table wait one RCU grace period disable_bh() collect/sum all counters of "new and temporary" table (all cpus) and reinject them into local cpu table (this cpu should not be interrupted) enable_bh() This way, "iptables -L" is not too expensive and doesnt block packet processing at all.Pretty much what I said.
Cool then, sorry for misunderstanding your patch.