All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sander Eikelenboom <linux@eikelenboom.it>
To: Paul Durrant <Paul.Durrant@citrix.com>
Cc: David Laight <David.Laight@ACULAB.COM>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	Wei Liu <wei.liu2@citrix.com>,
	Ian Campbell <Ian.Campbell@citrix.com>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: [Xen-devel] [PATCH net v2 1/3] xen-netback: remove pointless clause from if statement
Date: Fri, 28 Mar 2014 11:53:24 +0100	[thread overview]
Message-ID: <902700975.20140328115324@eikelenboom.it> (raw)
In-Reply-To: <9AAE0902D5BC7E449B7C8E4E778ABCD029E25B@AMSPEX01CL01.citrite.net>


Friday, March 28, 2014, 11:47:04 AM, you wrote:

>> -----Original Message-----
>> From: netdev-owner@vger.kernel.org [mailto:netdev-
>> owner@vger.kernel.org] On Behalf Of Sander Eikelenboom
>> Sent: 28 March 2014 10:43
>> To: David Laight
>> Cc: Paul Durrant; netdev@vger.kernel.org; Wei Liu; Ian Campbell; xen-
>> devel@lists.xen.org
>> Subject: Re: [Xen-devel] [PATCH net v2 1/3] xen-netback: remove pointless
>> clause from if statement
>> 
>> 
>> Friday, March 28, 2014, 11:35:58 AM, you wrote:
>> 
>> > From: Paul Durrant
>> >> > A reasonable high estimate for the number of slots required for a
>> specific
>> >> > message is 'frag_count + total_size/4096'.
>> >> > So if that are that many slots free it is definitely ok to add the message.
>> >> >
>> >>
>> >> Hmm, that may work. By total_size, I assume you mean skb->len, so that
>> calculation is based on an
>> >> overhead of 1 non-optimally packed slot per frag. There'd still need to be
>> a +1 for the GSO 'extra'
>> >> though.
>> 
>> > Except I meant '2 * frag_count + size/4096' :-(
>> 
>> > You have to assume that every fragment starts at n*4096-1 (so need
>> > at least two slots). A third slot is only needed for fragments
>> > longer that 1+4096+2 - but an extra one is needed for every
>> > 4096 bytes after that.
>> 
>> He did that in his followup patch series .. that works .. for small packets
>> But for larger ones it's an extremely wasteful estimate and it quickly get
>> larger than the MAX_SKB_FRAGS
>> we had before and even to large causing stalls. I tried doing this type of
>> calculation with a CAP of
>> the old  MAX_SKB_FRAGS calculation and that works.
>> 

> Given that works for you and caps the estimate at the old constant value I guess that's the modification to go for to handle this regression. I'll try to come up with something better for net-next.

OK send the patch and i will retest immediately just to make sure.

>   Paul

>> However since the calculated max_needed_slots grow so fast (most of the
>> time unnecessary, i put a printk in there for that and it was quite often more
>> than 5 slots off),
>> that is also wasteful and it uses a more complex calculation.
>> 
>> 
>> >         David
>> 
>> 
>> 
>> 
>> 
>> --
>> To unsubscribe from this list: send the line "unsubscribe netdev" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2014-03-28 10:53 UTC|newest]

Thread overview: 71+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-27 12:56 [PATCH net v2 0/3] xen-netback: fix rx slot estimation Paul Durrant
2014-03-27 12:56 ` [PATCH net v2 1/3] xen-netback: remove pointless clause from if statement Paul Durrant
2014-03-27 12:56 ` Paul Durrant
2014-03-27 13:45   ` Sander Eikelenboom
2014-03-27 13:45   ` Sander Eikelenboom
2014-03-27 13:54     ` Paul Durrant
2014-03-27 13:54     ` Paul Durrant
2014-03-27 14:02       ` Sander Eikelenboom
2014-03-27 14:09         ` Paul Durrant
2014-03-27 14:29           ` Sander Eikelenboom
2014-03-27 14:29           ` Sander Eikelenboom
2014-03-27 14:38             ` Paul Durrant
2014-03-27 14:38             ` Paul Durrant
2014-03-27 16:46           ` Sander Eikelenboom
2014-03-27 16:54             ` Paul Durrant
2014-03-27 17:15               ` Sander Eikelenboom
2014-03-27 17:26                 ` Paul Durrant
2014-03-27 17:26                 ` Paul Durrant
2014-03-27 18:34                   ` Sander Eikelenboom
2014-03-27 19:22                     ` [Xen-devel] " Sander Eikelenboom
2014-03-28  9:30                       ` Paul Durrant
2014-03-28  9:30                       ` [Xen-devel] " Paul Durrant
2014-03-28  9:39                         ` Sander Eikelenboom
2014-03-28  9:47                           ` Paul Durrant
2014-03-28  9:59                             ` Sander Eikelenboom
2014-03-28 10:12                               ` Paul Durrant
2014-03-28 10:36                                 ` Sander Eikelenboom
2014-03-28 10:36                                 ` [Xen-devel] " Sander Eikelenboom
2014-03-28 10:12                               ` Paul Durrant
2014-03-28  9:59                             ` Sander Eikelenboom
2014-03-28 10:01                             ` David Laight
2014-03-28 10:01                             ` [Xen-devel] " David Laight
2014-03-28 10:20                               ` Paul Durrant
2014-03-28 10:35                                 ` David Laight
2014-03-28 10:35                                 ` [Xen-devel] " David Laight
2014-03-28 10:42                                   ` Sander Eikelenboom
2014-03-28 10:42                                   ` [Xen-devel] " Sander Eikelenboom
2014-03-28 10:47                                     ` Paul Durrant
2014-03-28 10:47                                     ` [Xen-devel] " Paul Durrant
2014-03-28 10:53                                       ` Sander Eikelenboom
2014-03-28 10:53                                       ` Sander Eikelenboom [this message]
2014-03-28 11:11                                     ` [Xen-devel] " David Laight
2014-03-28 11:35                                       ` Sander Eikelenboom
2014-03-28 11:35                                       ` Sander Eikelenboom
2014-03-28 11:11                                     ` David Laight
2014-03-28 10:44                                   ` Paul Durrant
2014-03-28 10:44                                   ` [Xen-devel] " Paul Durrant
2014-03-28 10:20                               ` Paul Durrant
2014-03-28  9:47                           ` Paul Durrant
2014-03-28  9:39                         ` Sander Eikelenboom
2014-03-27 19:22                     ` Sander Eikelenboom
2014-03-28  0:55                     ` Sander Eikelenboom
2014-03-28  0:55                     ` [Xen-devel] " Sander Eikelenboom
2014-03-28  9:36                       ` Paul Durrant
2014-03-28  9:36                       ` [Xen-devel] " Paul Durrant
2014-03-28  9:46                         ` Sander Eikelenboom
2014-03-28  9:46                         ` [Xen-devel] " Sander Eikelenboom
2014-03-27 18:34                   ` Sander Eikelenboom
2014-03-27 17:15               ` Sander Eikelenboom
2014-03-27 16:54             ` Paul Durrant
2014-03-27 16:46           ` Sander Eikelenboom
2014-03-27 14:09         ` Paul Durrant
2014-03-27 14:02       ` Sander Eikelenboom
2014-03-27 14:00     ` Paul Durrant
2014-03-27 14:05       ` Sander Eikelenboom
2014-03-27 14:05       ` Sander Eikelenboom
2014-03-27 14:00     ` Paul Durrant
2014-03-27 12:56 ` [PATCH net v2 2/3] xen-netback: worse-case estimate in xenvif_rx_action is underestimating Paul Durrant
2014-03-27 12:56 ` Paul Durrant
2014-03-27 12:56 ` [PATCH net v2 3/3] xen-netback: BUG_ON in xenvif_rx_action() not catching overflow Paul Durrant
2014-03-27 12:56 ` Paul Durrant

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=902700975.20140328115324@eikelenboom.it \
    --to=linux@eikelenboom.it \
    --cc=David.Laight@ACULAB.COM \
    --cc=Ian.Campbell@citrix.com \
    --cc=Paul.Durrant@citrix.com \
    --cc=netdev@vger.kernel.org \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.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.