From: Hideo AOKI <haoki@redhat.com>
To: Herbert Xu <herbert@gondor.apana.org.au>,
netdev <netdev@vger.kernel.org>,
David Miller <davem@davemloft.net>
Cc: Eric Dumazet <dada1@cosmosbay.com>,
Satoshi Oshima <satoshi.oshima.fk@hitachi.com>,
Bill Fink <billfink@mindspring.com>,
Andi Kleen <andi@firstfloor.org>,
Evgeniy Polyakov <johnpol@2ka.mipt.ru>,
Stephen Hemminger <shemminger@linux-foundation.org>,
yoshfuji@linux-ipv6.org,
Yumiko Sugita <yumiko.sugita.yf@hitachi.com>,
haoki@redhat.com
Subject: Re: [PATCH 4/4] udp: memory accounting in IPv4
Date: Wed, 05 Dec 2007 23:28:34 -0500 [thread overview]
Message-ID: <47577A72.10205@redhat.com> (raw)
In-Reply-To: <20071204002644.GA28982@gondor.apana.org.au>
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 socket lock).
>
> So it's either going to be the atomic op or per-cpu counters. For
> me the atomic op isn't the issue, it's the SMP cache-line bouncing
> that's more important so having something that did atomic ops on a
> socket counter which then feeds into the global counter would solve
> my concerns.
>
> But let's wait and see what Dave has to say about this too.
Hello,
I suppose that he also wants to have per-socket accounting to avoid
global counter access.
To achieve this, I think I have three ideas at present. I'd
appreciate if you let me know acceptable idea or any suggestions.
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 receive processing.
I understand performance issue might occur, but ...
2. Adding new atomic_t variable for memory accounting
Datagram protocols will use the variable for per-socket memory
accounting. Stream protocols continue to use sk_forward_alloc.
3. Replacing current sk_forward_alloc with union type
Stream protocols use the union as int, and datagram protocols use
it as atomic_t.
Best regards,
Hideo
--
Hitachi Computer Products (America) Inc.
next prev parent reply other threads:[~2007-12-06 4:30 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-28 18:48 [PATCH 0/4] UDP memory accounting and limitation (take 9) Hideo AOKI
2007-11-28 18:52 ` [PATCH 1/4] udp: fix send buffer check Hideo AOKI
2007-11-28 18:52 ` [PATCH 2/4] datagram: mem_scheudle functions Hideo AOKI
2007-12-01 12:09 ` Herbert Xu
2007-12-04 0:10 ` Hideo AOKI
2007-12-15 14:45 ` Herbert Xu
2007-12-18 17:02 ` Hideo AOKI
2007-11-28 18:53 ` [PATCH 3/4] udp: add udp_mem, udp_rmem_min and udp_wmem_min Hideo AOKI
2007-11-28 18:53 ` [PATCH 4/4] udp: memory accounting in IPv4 Hideo AOKI
2007-12-01 12:21 ` Herbert Xu
2007-12-01 13:08 ` Eric Dumazet
2007-12-01 13:16 ` Herbert Xu
2007-12-04 0:14 ` Hideo AOKI
2007-12-04 0:26 ` Herbert Xu
2007-12-06 4:28 ` Hideo AOKI [this message]
2007-12-10 9:22 ` Herbert Xu
2007-12-11 1:28 ` Hideo AOKI
-- strict thread matches above, loose matches on Subject: below --
2007-12-15 5:07 [PATCH 0/4] [UDP]: memory accounting and limitation (take 10) Hideo AOKI
2007-12-15 5:15 ` [PATCH 4/4] [UDP]: memory accounting in IPv4 Hideo AOKI
2007-12-18 2:33 [PATCH 0/4] [UDP]: memory accounting and limitation (take 11) Hideo AOKI
2007-12-18 2:38 ` [PATCH 4/4] [UDP]: memory accounting in IPv4 Hideo AOKI
2007-12-20 11:44 ` David Miller
2007-12-21 3:58 ` Hideo AOKI
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47577A72.10205@redhat.com \
--to=haoki@redhat.com \
--cc=andi@firstfloor.org \
--cc=billfink@mindspring.com \
--cc=dada1@cosmosbay.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=johnpol@2ka.mipt.ru \
--cc=netdev@vger.kernel.org \
--cc=satoshi.oshima.fk@hitachi.com \
--cc=shemminger@linux-foundation.org \
--cc=yoshfuji@linux-ipv6.org \
--cc=yumiko.sugita.yf@hitachi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.