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

2007-12-20 Thread David Miller
From: Hideo AOKI [EMAIL PROTECTED] Date: Mon, 17 Dec 2007 21:38:47 -0500 This patch adds UDP memory usage accounting in IPv4. Send buffer accounting is performed by IP layer, because skbuff is allocated in the layer. Receive buffer is charged, when the buffer successfully received.

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

2007-12-20 Thread Hideo AOKI
David Miller wrote: From: Hideo AOKI [EMAIL PROTECTED] Date: Mon, 17 Dec 2007 21:38:47 -0500 This patch adds UDP memory usage accounting in IPv4. We can't accept these changes, even once the other issues are fixed, until IPV6 is supported as well. It's pointless to support proper UDP

[PATCH 4/4] [UDP]: memory accounting in IPv4

2007-12-17 Thread Hideo AOKI
This patch adds UDP memory usage accounting in IPv4. Send buffer accounting is performed by IP layer, because skbuff is allocated in the layer. Receive buffer is charged, when the buffer successfully received. Destructor of the buffer does uncharging and reclaiming, when the buffer is freed. To

[PATCH 4/4] [UDP]: memory accounting in IPv4

2007-12-14 Thread Hideo AOKI
This patch adds UDP memory usage accounting in IPv4. Send buffer accounting is performed by IP layer, because skbuff is allocated in the layer. Receive buffer is charged, when the buffer successfully received. Destructor of the buffer does un charging and reclaiming, when the buffer is freed.

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

2007-12-10 Thread Herbert Xu
On Wed, Dec 05, 2007 at 11:28:34PM -0500, Hideo AOKI wrote: 1. Using sk_forward_alloc and adding socket lock UDP already uses a socket lock to send message. However, it doesn't use the lock to receive message. I wonder if we can also use the lock when sk_forward_alloc is updated in

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

2007-12-10 Thread Hideo AOKI
Herbert Xu wrote: On Wed, Dec 05, 2007 at 11:28:34PM -0500, Hideo AOKI wrote: 1. Using sk_forward_alloc and adding socket lock UDP already uses a socket lock to send message. However, it doesn't use the lock to receive message. I wonder if we can also use the lock when

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

2007-12-05 Thread Hideo AOKI
Herbert Xu wrote: On Mon, Dec 03, 2007 at 07:14:26PM -0500, Hideo AOKI wrote: Let me try to use sk_forward_alloc at first, while percpu storage is an interesting idea. Actually I don't think sk_forward_alloc would work for UDP because it runs lockless (unlike TCP which is run under a the

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

2007-12-03 Thread Hideo AOKI
Eric Dumazet wrote: Herbert Xu a écrit : However, I'm still a little concerned about the effect of two more atomic op's per packet that we're adding here. Hang on a sec, that should've been Dave's line since atomic ops are cheap on x86 :) But seriously, it's not so much that we have two

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

2007-12-03 Thread Herbert Xu
On Mon, Dec 03, 2007 at 07:14:26PM -0500, Hideo AOKI wrote: Let me try to use sk_forward_alloc at first, while percpu storage is an interesting idea. Actually I don't think sk_forward_alloc would work for UDP because it runs lockless (unlike TCP which is run under a the socket lock). So it's

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

2007-12-01 Thread Herbert Xu
On Wed, Nov 28, 2007 at 01:53:36PM -0500, Hideo AOKI wrote: +/** + * __skb_queue_purge_and_sub_memory_allocated + * - empty a list and subtruct memory allocation counter + * @sk: sk + * @list: list to empty + * Delete all buffers on an sk_buff list and subtruct the + *

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

2007-12-01 Thread Eric Dumazet
Herbert Xu a écrit : On Wed, Nov 28, 2007 at 01:53:36PM -0500, Hideo AOKI wrote: +/** + * __skb_queue_purge_and_sub_memory_allocated + * - empty a list and subtruct memory allocation counter + * @sk: sk + * @list: list to empty + * Delete all buffers on an sk_buff

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

2007-12-01 Thread Herbert Xu
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

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

2007-11-28 Thread Hideo AOKI
This patch adds UDP memory usage accounting in IPv4. Cc: Satoshi Oshima [EMAIL PROTECTED] signed-off-by: Hideo Aoki [EMAIL PROTECTED] --- af_inet.c | 30 +- ip_output.c | 49 ++--- udp.c | 16