netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC] don't copy the whole table to all the other CPUs
@ 2010-11-17 14:54 Changli Gao
  2010-11-17 14:56 ` Patrick McHardy
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Changli Gao @ 2010-11-17 14:54 UTC (permalink / raw)
  To: Patrick McHardy; +Cc: Netfilter Developer Mailing List

When reviewing the iptables code, I find there is one exact copy of
table on every possible CPU for parallel processing. However, only
counters are private, and the others are the same. It is a wast of
memory. I know the current implementation maybe good for NUMA, but I
don't think NUMA is common, and I doubt its benefit. I'll try to
convert the code use one shared table, but private counters.

Any comment?

-- 
Regards,
Changli Gao(xiaosuo@gmail.com)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFC] don't copy the whole table to all the other CPUs
  2010-11-17 14:54 [RFC] don't copy the whole table to all the other CPUs Changli Gao
@ 2010-11-17 14:56 ` Patrick McHardy
  2010-11-17 14:57 ` Eric Dumazet
  2010-11-17 18:03 ` Rick Jones
  2 siblings, 0 replies; 4+ messages in thread
From: Patrick McHardy @ 2010-11-17 14:56 UTC (permalink / raw)
  To: Changli Gao; +Cc: Netfilter Developer Mailing List

On 17.11.2010 15:54, Changli Gao wrote:
> When reviewing the iptables code, I find there is one exact copy of
> table on every possible CPU for parallel processing. However, only
> counters are private, and the others are the same. It is a wast of
> memory. I know the current implementation maybe good for NUMA, but I
> don't think NUMA is common, and I doubt its benefit. I'll try to
> convert the code use one shared table, but private counters.

This was originally done because we used to keep the comefrom pointers
in the table and thus needed one private copy per CPU. This is not
done anymore since a few versions, so patches to get rid of the table
duplication are highly welcome.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFC] don't copy the whole table to all the other CPUs
  2010-11-17 14:54 [RFC] don't copy the whole table to all the other CPUs Changli Gao
  2010-11-17 14:56 ` Patrick McHardy
@ 2010-11-17 14:57 ` Eric Dumazet
  2010-11-17 18:03 ` Rick Jones
  2 siblings, 0 replies; 4+ messages in thread
From: Eric Dumazet @ 2010-11-17 14:57 UTC (permalink / raw)
  To: Changli Gao; +Cc: Patrick McHardy, Netfilter Developer Mailing List

Le mercredi 17 novembre 2010 à 22:54 +0800, Changli Gao a écrit :
> When reviewing the iptables code, I find there is one exact copy of
> table on every possible CPU for parallel processing. However, only
> counters are private, and the others are the same. It is a wast of
> memory. I know the current implementation maybe good for NUMA, but I
> don't think NUMA is common, and I doubt its benefit. I'll try to
> convert the code use one shared table, but private counters.
> 
> Any comment?
> 

This idea is not new, and I believe Patrick is already working on it.



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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFC] don't copy the whole table to all the other CPUs
  2010-11-17 14:54 [RFC] don't copy the whole table to all the other CPUs Changli Gao
  2010-11-17 14:56 ` Patrick McHardy
  2010-11-17 14:57 ` Eric Dumazet
@ 2010-11-17 18:03 ` Rick Jones
  2 siblings, 0 replies; 4+ messages in thread
From: Rick Jones @ 2010-11-17 18:03 UTC (permalink / raw)
  To: Changli Gao; +Cc: Patrick McHardy, Netfilter Developer Mailing List

Changli Gao wrote:
> When reviewing the iptables code, I find there is one exact copy of
> table on every possible CPU for parallel processing. However, only
> counters are private, and the others are the same. It is a wast of
> memory. I know the current implementation maybe good for NUMA, but I
> don't think NUMA is common, and I doubt its benefit. I'll try to
> convert the code use one shared table, but private counters.
> 
> Any comment?

Others have already commented on how the code is changing and whether or not 
what is done is necessary for good performance in the face of NUMA, but I wanted 
to point-out that NUMA is quite common.  Just in the x86 space, virtually 
anything with two or more sockets sold starting with Nehalem-EP (?) is a NUMA 
system, and one can go farther back than that when one goes to Barcelona. 
Per-processor memory controllers and more than one processor implies NUMA.

rick jones


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-11-17 18:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-17 14:54 [RFC] don't copy the whole table to all the other CPUs Changli Gao
2010-11-17 14:56 ` Patrick McHardy
2010-11-17 14:57 ` Eric Dumazet
2010-11-17 18:03 ` Rick Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).