Thread (17 messages) 17 messages, 3 authors, 2007-12-18

Re: [PATCH 4/4] udp: memory accounting in IPv4

From: Herbert Xu <herbert@gondor.apana.org.au>
Date: 2007-12-01 13:16:55

On Sat, Dec 01, 2007 at 02:08:31PM +0100, Eric Dumazet wrote:
I agree adding yet another atomics ops is a big problem.

Another idea, coupled with recent work on percpu storage done by Christoph 
Lameter, would be to use kind of a percpu_counter :
Yes that's an interesting idea.
We dont really need strong and precise memory accounting (UDP , but TCP as 
well), just some kind of limit to avoid memory to be too much used.
BTW it's no big deal for TCP because it's completely serialised so it
doesn't use atomic ops for the accounting.  More importantly, it uses
sk_forward_alloc so not every packet needs to touch the global counter.

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} [off-list ref]
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help