From: Eric Dumazet <eric.dumazet@gmail.com>
To: Simon Horman <horms@verge.net.au>
Cc: netdev@vger.kernel.org, Ben Hutchings <bhutchings@solarflare.com>
Subject: Re: [PATCH] rfc: ethtool: early-orphan control
Date: Sat, 11 Dec 2010 09:03:38 +0100 [thread overview]
Message-ID: <1292054618.2746.48.camel@edumazet-laptop> (raw)
In-Reply-To: <20101211042434.GB32453@verge.net.au>
Le samedi 11 décembre 2010 à 13:24 +0900, Simon Horman a écrit :
> On Sat, Dec 11, 2010 at 01:13:35PM +0900, Simon Horman wrote:
> > Early orphaning is an optimisation which avoids unnecessary cache misses by
> > orphaning an skb just before it is handed to a device for transmit thus
> > avoiding the case where the orphaning occurs on a different CPU.
> >
> > In the case of bonded devices this has the unfortunate side-effect of
> > breaking down flow control allowing a socket to send UDP packets as fast as
> > the CPU will allow. This is particularly undesirable in virtualised
> > network environments.
> >
> > This patch introduces ethtool control of early orphaning.
> > It remains on by default by it now may be disabled on a per-interface basis.
> >
> > I have implemented this as a generic flag.
> > As it seems to be the first generic flag that requires
> > no driver awareness I also supplied a default flag handler.
> > I am unsure if any aspect of this approach is acceptable.
> >
> > I believe Eric has it in mind that some of the calls
> > to skb_orphan() in drivers can be removed with the addition
> > of this feature. I need to discuss that with him further.
> >
> > A patch for the ethtool user-space utility accompanies this patch.
>
> The following results were measured using kvm using virto without vhost net.
> The virtio device is bridged to a bond device which has one gigabit slave.
>
As you know, vhost net does the orphaning, as well as some NIC drivers,
so one UDP flood would have same problem.
I wonder if this problem could not be solved in other ways.
We might do early orphaning only for sockets with SOCK_USE_WRITE_QUEUE
flag asserted. (tcp sets it)
Then, we could also say : Why tcp use sock_wfree() at all...
Hmm...
next prev parent reply other threads:[~2010-12-11 8:03 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-11 4:13 [PATCH] rfc: ethtool: early-orphan control Simon Horman
2010-12-11 4:24 ` Simon Horman
2010-12-11 8:03 ` Eric Dumazet [this message]
[not found] ` <1292087480.2746.54.camel@edumazet-laptop>
2010-12-11 22:40 ` Simon Horman
2010-12-11 4:37 ` Ben Hutchings
2010-12-11 5:04 ` Simon Horman
2010-12-11 5:39 ` Simon Horman
2010-12-11 5:46 ` Ben Hutchings
2010-12-14 19:30 ` Ben Hutchings
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=1292054618.2746.48.camel@edumazet-laptop \
--to=eric.dumazet@gmail.com \
--cc=bhutchings@solarflare.com \
--cc=horms@verge.net.au \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox