From: Chris Wright <chrisw@sous-sol•org>
To: Herbert Xu <herbert@gondor•hengli.com.au>
Cc: "David S. Miller" <davem@davemloft•net>,
netdev@vger•kernel.org, Arnd Bergmann <arnd@arndb•de>,
Mark Wagner <mwagner@redhat•com>,
Chris Wright <chrisw@sous-sol•org>
Subject: Re: macvtap: Limit packet queue length
Date: Thu, 22 Jul 2010 00:47:32 -0700 [thread overview]
Message-ID: <20100722074732.GA24905@sequoia.sous-sol.org> (raw)
In-Reply-To: <20100722074431.GA26744@gondor.apana.org.au>
* Herbert Xu (herbert@gondor•hengli.com.au) wrote:
> On Thu, Jul 22, 2010 at 02:41:57PM +0800, Herbert Xu wrote:
> > Hi:
> >
> > macvtap: Limit packet queue length
>
> Chris has informed me that he's already tried a similar patch
> and it only makes the problem worse :)
>
> The issue is that the macvtap TX queue length defaults to zero.
>
> So here is an updated patch which addresses this:
>
> macvtap: Limit packet queue length
>
> Mark Wagner reported OOM symptoms when sending UDP traffic over
> a macvtap link to a kvm receiver.
>
> This appears to be caused by the fact that macvtap packet queues
> are unlimited in length. This means that if the receiver can't
> keep up with the rate of flow, then we will hit OOM. Of course
> it gets worse if the OOM killer then decides to kill the receiver.
>
> This patch imposes a cap on the packet queue length, in the same
> way as the tuntap driver, using the device TX queue length.
>
> Please note that macvtap currently has no way of giving congestion
> notification, that means the software device TX queue cannot be
> used and packets will always be dropped once the macvtap driver
> queue fills up.
>
> This shouldn't be a great problem for the scenario where macvtap
> is used to feed a kvm receiver, as the traffic is most likely
> external in origin so congestion notification can't be applied
> anyway.
>
> Of course, if anybody decides to complain about guest-to-guest
> UDP packet loss down the track, then we may have to revisit this.
>
> Incidentally, this patch also fixes a real memory leak when
> macvtap_get_queue fails.
>
> Chris Wright noticed that for this patch to work, we need a
> non-zero TX queue length. This patch includes his work to change
> the default macvtap TX queue length to 500.
>
> Reported-by: Mark Wagner <mwagner@redhat•com>
> Signed-off-by: Herbert Xu <herbert@gondor•apana.org.au>
Acked-by: Chris Wright <chrisw@sous-sol•org>
Thanks Herbert.
-chris
next prev parent reply other threads:[~2010-07-22 7:47 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-22 6:41 macvtap: Limit packet queue length Herbert Xu
2010-07-22 7:44 ` Herbert Xu
2010-07-22 7:47 ` Chris Wright [this message]
2010-07-22 9:30 ` Arnd Bergmann
2010-07-22 16:05 ` Shirley Ma
2010-07-22 16:08 ` Herbert Xu
2010-07-22 18:42 ` Shirley Ma
2010-07-22 20:09 ` David Miller
2010-07-22 15:59 ` Shirley Ma
2010-07-22 16:07 ` Herbert Xu
2010-07-22 19:58 ` David Miller
2010-07-23 7:28 ` Arnd Bergmann
2010-07-23 7:58 ` Herbert Xu
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=20100722074732.GA24905@sequoia.sous-sol.org \
--to=chrisw@sous-sol$(echo .)org \
--cc=arnd@arndb$(echo .)de \
--cc=davem@davemloft$(echo .)net \
--cc=herbert@gondor$(echo .)hengli.com.au \
--cc=mwagner@redhat$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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