From: Hideo AOKI <haoki@redhat.com>
To: David Miller <davem@davemloft.net>
Cc: herbert@gondor.apana.org.au, netdev@vger.kernel.org,
tyasui@redhat.com, mhiramat@redhat.com,
satoshi.oshima.fk@hitachi.com, billfink@mindspring.com,
andi@firstfloor.org, johnpol@2ka.mipt.ru,
shemminger@linux-foundation.org, yoshfuji@linux-ipv6.org,
yumiko.sugita.yf@hitachi.com, haoki@redhat.com
Subject: Re: [PATCH 0/4] [UDP]: memory accounting and limitation (take 10)
Date: Sun, 16 Dec 2007 16:21:49 -0500 [thread overview]
Message-ID: <476596ED.7040304@redhat.com> (raw)
In-Reply-To: <20071215.213426.257974943.davem@davemloft.net>
David Miller wrote:
> From: Hideo AOKI <haoki@redhat.com>
> Date: Sat, 15 Dec 2007 00:07:44 -0500
>
>> Changelog take 9 -> take 10:
>> * supported using sk_forward_alloc
>> * introduced several memory accounting functions with spin lock
>> * changed detagram receive functions to be able to customize
>> destructor
>> * fixed accounting bugs in previous takes
>
> This is not what Herbert and I meant with our suggestion.
>
> We meant to convert all of UDP and datagram handling to lock
> sockets precisely like TCP does, by calling lock_sock()
> on entry to functions like udp_recvmsg() and release_sock()
> on exit from those functions.
>
> Then in the packet input processing, a sequence, just like
> TCP, such as:
>
> bh_lock_sock_nested(sk);
> if (!sock_owned_by_user(sk)) {
> udp_do_rcv(sk, skb);
> } else
> sk_add_backlog(sk, skb);
>
> Then a suitably defined ->backlog_rcv is hooked up for these
> protocols as well.
>
> Again, use TCP as a guide.
>
> There is much more work involved to implement this properly,
> and make the accounting code sharable with TCP, than the
> simplistic and minimal spin lock code you added here.
>
> Please do this correctly, thank you.
Hello,
I appreciate your suggestions.
I'll try to re-implement locking mechanism like TCP.
Regards,
Hideo
--
Hitachi Computer Products (America) Inc.
prev parent reply other threads:[~2007-12-16 21:24 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-15 5:07 [PATCH 0/4] [UDP]: memory accounting and limitation (take 10) Hideo AOKI
2007-12-15 5:14 ` [PATCH 1/4] [UDP]: fix send buffer check Hideo AOKI
2007-12-15 5:15 ` [PATCH 2/4] [CORE]: datagram: mem_scheudle functions Hideo AOKI
2007-12-15 15:32 ` Herbert Xu
2007-12-16 21:20 ` Hideo AOKI
2007-12-15 5:15 ` [PATCH 3/4] [UDP]: add udp_mem, udp_rmem_min and udp_wmem_min Hideo AOKI
2007-12-15 5:15 ` [PATCH 4/4] [UDP]: memory accounting in IPv4 Hideo AOKI
2007-12-16 5:34 ` [PATCH 0/4] [UDP]: memory accounting and limitation (take 10) David Miller
2007-12-16 21:21 ` Hideo AOKI [this message]
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=476596ED.7040304@redhat.com \
--to=haoki@redhat.com \
--cc=andi@firstfloor.org \
--cc=billfink@mindspring.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=johnpol@2ka.mipt.ru \
--cc=mhiramat@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=satoshi.oshima.fk@hitachi.com \
--cc=shemminger@linux-foundation.org \
--cc=tyasui@redhat.com \
--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.