From: David Miller <davem@davemloft.net>
To: yi.zhu@intel.com
Cc: netdev@vger.kernel.org
Subject: Re: [RFC PATCH] accounting for socket backlog
Date: Thu, 25 Feb 2010 00:31:24 -0800 (PST) [thread overview]
Message-ID: <20100225.003124.183011848.davem@davemloft.net> (raw)
In-Reply-To: <1267067593.16986.1583.camel@debian>
From: Zhu Yi <yi.zhu@intel.com>
Date: Thu, 25 Feb 2010 11:13:13 +0800
> @@ -1372,8 +1372,13 @@ int udp_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
> bh_lock_sock(sk);
> if (!sock_owned_by_user(sk))
> rc = __udp_queue_rcv_skb(sk, skb);
> - else
> + else {
> + if (atomic_read(&sk->sk_backlog.len) >= sk->sk_rcvbuf) {
> + bh_unlock_sock(sk);
> + goto drop;
> + }
> sk_add_backlog(sk, skb);
> + }
We have to address this issue, of course, but I bet this method of
handling it negatively impacts performance in normal cases.
Right now we can queue up a lot and still get it to the application
if it is slow getting scheduled onto a cpu, but if you put this
limit here it could result in lots of drops.
next prev parent reply other threads:[~2010-02-25 8:31 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-25 3:13 [RFC PATCH] accounting for socket backlog Zhu Yi
2010-02-25 8:31 ` David Miller [this message]
2010-02-26 2:44 ` Zhu Yi
2010-02-26 5:52 ` David Miller
2010-02-25 11:24 ` Eric Dumazet
2010-02-26 2:34 ` Zhu Yi
2010-02-26 13:12 ` Eric Dumazet
2010-03-01 2:17 ` Zhu Yi
2010-03-01 2:29 ` Eric Dumazet
2010-03-01 3:03 ` Zhu Yi
2010-03-01 3:12 ` Eric Dumazet
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=20100225.003124.183011848.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=yi.zhu@intel.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 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).