public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: David Vrabel <david.vrabel@citrix•com>
To: Wei Liu <wei.liu2@citrix•com>
Cc: <xen-devel@lists•xen.org>,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle•com>,
	Boris Ostrovsky <boris.ostrovsky@oracle•com>,
	Ian Campbell <ian.campbell@citrix•com>, <netdev@vger•kernel.org>,
	<msw@amazon•com>, <annie.li@oracle•com>
Subject: Re: [PATCH] xen-netback: count number required slots for an skb more carefully
Date: Thu, 5 Sep 2013 11:12:11 +0100	[thread overview]
Message-ID: <522858FB.807@citrix.com> (raw)
In-Reply-To: <20130904154400.GS14104@zion.uk.xensource.com>

On 04/09/13 16:44, Wei Liu wrote:
> On Wed, Sep 04, 2013 at 03:02:01PM +0100, David Vrabel wrote:
> [...]
>>>>
>>>> I think I prefer fixing the counting for backporting to stable kernels.
>>>
>>> The original patch has coding style change. Sans that contextual change
>>> it's not a very long patch.
>>
>> The size of the patch isn't the main concern for backport-ability.  It's
>> the frontend visible changes and thus any (unexpected) impacts on
>> frontends -- this is especially important as only a small fraction of
>> frontends in use will be tested with these changes.
>>
>>>>  Xi's approach of packing the ring differently is a change in frontend
>>>> visible behaviour and seems more risky. e.g., possible performance
>>>> impact so I would like to see some performance analysis of that approach.
>>>>
>>>
>>> With Xi's approach it is more efficient for backend to process. As we
>>> now use one less grant copy operation which means we copy the same
>>> amount of data with less grant ops.
>>
>> It think it uses more grant ops because the copies of the linear
>> portion are in chunks that do not cross source page boundaries.
>>
>> i.e., in netbk_gop_skb():
>>
>> 	data = skb->data;
>> 	while (data < skb_tail_pointer(skb)) {
>> 		unsigned int offset = offset_in_page(data);
>> 		unsigned int len = PAGE_SIZE - offset;
>>                 [...]
>>
>> It wasn't clear from the patch that this had been considered and that
>> any extra space needed in the grant op array was made available.
>>
> 
> If I'm not mistaken the grant op array is already enormous. See the
> comment in struct xen_netbk for grant_copy_op. The case that a buffer
> straddles two slots was taken into consideration long ago -- that's
> why you don't see any comment or code change WRT that..

I'm not convinced that even that is enough for the current
implementation in the (very) worse case.

Consider a skb with 8 frags all 512 in length.  The linear data will be
placed into 1 slot, and the frags will be packed into 1 slot so 9 grant
ops and 2 slots.

I definitely think we do not want to potentially regress any further in
this area.

David

  reply	other threads:[~2013-09-05 10:12 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-03 17:29 [PATCH] xen-netback: count number required slots for an skb more carefully David Vrabel
2013-09-03 21:53 ` Wei Liu
2013-09-04  2:25   ` annie li
2013-09-04  6:04     ` Matt Wilson
2013-09-04  6:56       ` [Xen-devel] " annie li
2013-09-04  7:38         ` Wei Liu
2013-09-04  8:06           ` annie li
2013-09-04  8:20             ` Wei Liu
2013-09-04  8:36       ` Ian Campbell
2013-09-04  8:41         ` Wei Liu
2013-09-04 11:48   ` [PATCH] " David Vrabel
2013-09-04 12:41     ` Ian Campbell
2013-09-04 13:35       ` Wei Liu
2013-09-09  9:20       ` Wei Liu
2013-09-04 13:14     ` Wei Liu
2013-09-04 14:02       ` David Vrabel
2013-09-04 15:44         ` Wei Liu
2013-09-05 10:12           ` David Vrabel [this message]
2013-09-05 10:27             ` Wei Liu
2013-09-04 18:48 ` David Miller
2013-09-05  7:35   ` Ian Campbell

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=522858FB.807@citrix.com \
    --to=david.vrabel@citrix$(echo .)com \
    --cc=annie.li@oracle$(echo .)com \
    --cc=boris.ostrovsky@oracle$(echo .)com \
    --cc=ian.campbell@citrix$(echo .)com \
    --cc=konrad.wilk@oracle$(echo .)com \
    --cc=msw@amazon$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=wei.liu2@citrix$(echo .)com \
    --cc=xen-devel@lists$(echo .)xen.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