From: Zhu Yi <yi.zhu@intel.com>
To: David Miller <davem@davemloft.net>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"Shi, Alex" <alex.shi@intel.com>
Subject: Re: [RFC PATCH] accounting for socket backlog
Date: Fri, 26 Feb 2010 10:44:13 +0800 [thread overview]
Message-ID: <1267152253.16986.1655.camel@debian> (raw)
In-Reply-To: <20100225.003124.183011848.davem@davemloft.net>
On Thu, 2010-02-25 at 16:31 +0800, David Miller wrote:
> > @@ -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.
Eric mentioned atomic is not required here. I don't think performance
will be impacted any more with the above if clause. Right?
> 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.
Or we can replace the sk->sk_rcvbuf limit with a backlog own limit. We
can queue "a lot", but not endless. We have to have a limit anyway.
Thanks,
-yi
next prev parent reply other threads:[~2010-02-26 2:42 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
2010-02-26 2:44 ` Zhu Yi [this message]
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=1267152253.16986.1655.camel@debian \
--to=yi.zhu@intel.com \
--cc=alex.shi@intel.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/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.