netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: Ian.Campbell@citrix.com
Cc: eric.dumazet@gmail.com, jesse.brandeburg@intel.com,
	netdev@vger.kernel.org
Subject: Re: [PATCH 0/4] skb paged fragment destructors
Date: Thu, 22 Dec 2011 13:20:24 -0500 (EST)	[thread overview]
Message-ID: <20111222.132024.2100751924070475608.davem@davemloft.net> (raw)
In-Reply-To: <1324550017.7877.77.camel@zakaz.uk.xensource.com>

From: Ian Campbell <Ian.Campbell@citrix.com>
Date: Thu, 22 Dec 2011 10:33:36 +0000

> On Wed, 2011-12-21 at 19:28 +0000, David Miller wrote:
>> From: Eric Dumazet <eric.dumazet@gmail.com>
>> Date: Wed, 21 Dec 2011 15:02:18 +0100
>> 
>> > No idea on this +2 point.
>> 
>> I think I know, and I believe I instructed Alexey Kuznetsov to do
>> this.
>> 
>> When sendfile() is performed, we might start the SKB with the last few
>> bytes of one page, and end the SKB with the first few bytes of another
>> page.
>> 
>> In order to fit a full 64K frame into an SKB in this situation we have
>> to accomodate this case.
> 
> Thanks David, that makes sense.
> 
> However I think you only actually need 1 extra page for that. If the
> data in frag[0] starts at $offset then frag[16] will need to have
> $offset bytes in it. e.g.
> 	4096-$offset + 4096*15 + $offset = 65536
> which == 17 pages rather than 18.
> 
> The following documents the status quo but I could update to switch to +
> 1 instead if there are no flaws in the above logic...

Indeed, you're right.  Please change this to 1 and document it, and we
can put that change into net-next, thanks a lot!

  reply	other threads:[~2011-12-22 18:20 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-09 15:01 [PATCH 0/4] skb paged fragment destructors Ian Campbell
2011-11-09 15:02 ` [PATCH 1/4] net: add support for per-paged-fragment destructors Ian Campbell
2011-11-09 15:33   ` Michał Mirosław
2011-11-09 16:25     ` Ian Campbell
2011-11-09 17:24       ` Michał Mirosław
2011-11-09 17:28         ` Ian Campbell
2011-11-09 15:02 ` [PATCH 2/4] net: only allow paged fragments with the same destructor to be coalesced Ian Campbell
     [not found] ` <1320850895.955.172.camel-o4Be2W7LfRlXesXXhkcM7miJhflN2719@public.gmane.org>
2011-11-09 15:02   ` [PATCH 3/4] net: add paged frag destructor support to kernel_sendpage Ian Campbell
2011-11-09 18:02     ` Michał Mirosław
2011-11-09 15:02   ` [PATCH 4/4] sunrpc: use SKB fragment destructors to delay completion until page is released by network stack Ian Campbell
     [not found]     ` <1320850927-30240-4-git-send-email-ian.campbell-Sxgqhf6Nn4DQT0dZR+AlfA@public.gmane.org>
2011-11-11 12:38       ` Michael S. Tsirkin
     [not found]         ` <20111111123824.GA23902-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2011-11-11 13:20           ` Ian Campbell
     [not found]             ` <1321017627.955.254.camel-o4Be2W7LfRlXesXXhkcM7miJhflN2719@public.gmane.org>
2011-11-11 20:00               ` J. Bruce Fields
2011-11-13 10:17             ` Michael S. Tsirkin
     [not found]               ` <20111113101713.GB15322-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2011-11-14 13:07                 ` Ian Campbell
2011-11-14 13:25                   ` David Laight
2011-11-09 17:49 ` [PATCH 0/4] skb paged fragment destructors Eric Dumazet
2011-11-10 10:39   ` Ian Campbell
2011-11-17 14:45   ` Ian Campbell
2011-11-17 14:51     ` Eric Dumazet
2011-11-17 20:22     ` Michał Mirosław
2011-12-06 11:57 ` Ian Campbell
2011-12-06 13:24   ` Eric Dumazet
2011-12-07 13:35     ` Ian Campbell
2011-12-09 13:47       ` Ian Campbell
2011-12-09 18:34         ` David Miller
2011-12-21 11:03           ` Ian Campbell
2011-12-21 11:08             ` Eric Dumazet
2011-12-21 11:18               ` Ian Campbell
2011-12-21 12:30                 ` Eric Dumazet
2011-12-21 13:48                   ` Ian Campbell
2011-12-21 14:02                     ` Eric Dumazet
2011-12-21 19:28                       ` David Miller
2011-12-22 10:33                         ` Ian Campbell
2011-12-22 18:20                           ` David Miller [this message]
2011-12-23  9:35                             ` Ian Campbell
2012-01-03  9:36                               ` David Laight
     [not found]                             ` <45B8991A987A4149B40F1A061BF49097B96C9EFF05@LONPMAILBOX01.citrite.net>
2011-12-23  9:39                               ` Ian Campbell
2011-12-23 21:52                                 ` David Miller
2011-12-22 18:34                           ` Michał Mirosław
2011-12-22 18:43                             ` David Miller
2011-12-22 19:29                               ` Michał Mirosław
2011-12-22 19:34                                 ` David Miller
2011-12-23 18:10                                   ` Michał Mirosław

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=20111222.132024.2100751924070475608.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=Ian.Campbell@citrix.com \
    --cc=eric.dumazet@gmail.com \
    --cc=jesse.brandeburg@intel.com \
    --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;
as well as URLs for NNTP newsgroup(s).