All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/10] skb paged fragment destructors
@ 2012-04-10 14:26 Ian Campbell
  2012-04-10 14:26 ` [PATCH 01/10] net: add and use SKB_ALLOCSIZE Ian Campbell
                   ` (24 more replies)
  0 siblings, 25 replies; 70+ messages in thread
From: Ian Campbell @ 2012-04-10 14:26 UTC (permalink / raw)
  To: netdev
  Cc: David Miller, Eric Dumazet, Michael S. Tsirkin, Wei Liu,
	David VomLehn, Bart Van Assche, xen-devel, Ian Campbell

I think this is v4, but I've sort of lost count, sorry that it's taken
me so long to get back to this stuff.

The following series makes use of the skb fragment API (which is in 3.2
+) to add a per-paged-fragment destructor callback. This can be used by
creators of skbs who are interested in the lifecycle of the pages
included in that skb after they have handed it off to the network stack.

The mail at [0] contains some more background and rationale but
basically the completed series will allow entities which inject pages
into the networking stack to receive a notification when the stack has
really finished with those pages (i.e. including retransmissions,
clones, pull-ups etc) and not just when the original skb is finished
with, which is beneficial to many subsystems which wish to inject pages
into the network stack without giving up full ownership of those page's
lifecycle. It implements something broadly along the lines of what was
described in [1].

I have also included a patch to the RPC subsystem which uses this API to
fix the bug which I describe at [2].

I've also had some interest from David VemLehn and Bart Van Assche
regarding using this functionality in the context of vmsplice and iSCSI
targets respectively (I think).

Changes since last time:

      * Added skb_orphan_frags API for the use of recipients of SKBs who
        may hold onto the SKB for a long time (this is analogous to
        skb_orphan). This was pointed out by Michael. The TUN driver is
        currently the only user.
              * I can't for the life of me get anything to actually hit
                this code path. I've been trying with an NFS server
                running in a Xen HVM domain with emulated (e.g. tap)
                networking and a client in domain 0, using the NFS fix
                in this series which generates SKBs with destructors
                set, so far -- nothing. I suspect that lack of TSO/GSO
                etc on the TAP interface is causing the frags to be
                copied to normal pages during skb_segment().
      * Various fixups related to the change of alignment/padding in
        shinfo, in particular to build_skb as pointed out by Eric.
      * Tweaked ordering of shinfo members to ensure that all hotpath
        variables up to and including the first frag fit within (and are
        aligned to) a single 64 byte cache line. (Eric again)

I ran a monothread UDP benchmark (similar to that described by Eric in
e52fcb2462ac) and don't see any difference in pps throughput, it was
~810,000 pps both before and after.

Cheers,
Ian.

[0] http://marc.info/?l=linux-netdev&m=131072801125521&w=2
[1] http://marc.info/?l=linux-netdev&m=130925719513084&w=2
[2] http://marc.info/?l=linux-nfs&m=122424132729720&w=2

^ permalink raw reply	[flat|nested] 70+ messages in thread

end of thread, other threads:[~2012-04-26 20:50 UTC | newest]

Thread overview: 70+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-10 14:26 [PATCH v4 0/10] skb paged fragment destructors Ian Campbell
2012-04-10 14:26 ` [PATCH 01/10] net: add and use SKB_ALLOCSIZE Ian Campbell
2012-04-10 14:57   ` Eric Dumazet
2012-04-10 14:57   ` Eric Dumazet
2012-04-10 14:26 ` Ian Campbell
2012-04-10 14:26 ` [PATCH 02/10] net: Use SKB_WITH_OVERHEAD in build_skb Ian Campbell
2012-04-10 14:58   ` Eric Dumazet
2012-04-10 14:58   ` Eric Dumazet
2012-04-10 14:26 ` Ian Campbell
2012-04-10 14:26 ` [PATCH 03/10] chelsio: use SKB_WITH_OVERHEAD Ian Campbell
2012-04-10 14:59   ` Eric Dumazet
2012-04-10 14:59   ` Eric Dumazet
2012-04-10 14:26 ` Ian Campbell
2012-04-10 14:26 ` [PATCH 04/10] net: pad skb data and shinfo as a whole rather than individually Ian Campbell
2012-04-10 15:01   ` Eric Dumazet
2012-04-10 15:01   ` Eric Dumazet
2012-04-10 14:26 ` Ian Campbell
2012-04-10 14:26 ` [PATCH 05/10] net: move destructor_arg to the front of sk_buff Ian Campbell
2012-04-10 14:26 ` Ian Campbell
2012-04-10 15:05   ` Eric Dumazet
2012-04-10 15:19     ` Ian Campbell
2012-04-10 15:19     ` Ian Campbell
2012-04-10 15:05   ` Eric Dumazet
2012-04-10 18:33   ` Alexander Duyck
2012-04-10 18:41     ` Eric Dumazet
2012-04-10 18:41     ` Eric Dumazet
2012-04-10 19:15       ` Alexander Duyck
2012-04-11  8:00         ` Ian Campbell
2012-04-11  8:00         ` Ian Campbell
2012-04-11 16:31           ` Alexander Duyck
2012-04-11 17:00             ` Ian Campbell
2012-04-11 17:00             ` Ian Campbell
2012-04-11 16:31           ` Alexander Duyck
2012-04-11  8:20         ` Eric Dumazet
2012-04-11 16:05           ` Alexander Duyck
2012-04-11 16:05           ` Alexander Duyck
2012-04-11  8:20         ` Eric Dumazet
2012-04-10 19:15       ` Alexander Duyck
2012-04-11  7:56     ` Ian Campbell
2012-04-11  7:56     ` Ian Campbell
2012-04-10 18:33   ` Alexander Duyck
2012-04-10 14:26 ` [PATCH 06/10] net: add support for per-paged-fragment destructors Ian Campbell
2012-04-10 14:26 ` Ian Campbell
2012-04-26 20:44   ` [Xen-devel] " Konrad Rzeszutek Wilk
2012-04-26 20:44   ` Konrad Rzeszutek Wilk
2012-04-10 14:26 ` [PATCH 07/10] net: only allow paged fragments with the same destructor to be coalesced Ian Campbell
2012-04-10 14:26 ` Ian Campbell
2012-04-10 20:11   ` Ben Hutchings
2012-04-10 20:11   ` Ben Hutchings
2012-04-11  7:45     ` Ian Campbell
2012-04-11  7:45     ` Ian Campbell
2012-04-10 14:26 ` [PATCH 08/10] net: add skb_orphan_frags to copy aside frags with destructors Ian Campbell
2012-04-10 14:26 ` Ian Campbell
2012-04-10 14:26 ` [PATCH 09/10] net: add paged frag destructor support to kernel_sendpage Ian Campbell
2012-04-10 14:26 ` [PATCH 10/10] sunrpc: use SKB fragment destructors to delay completion until page is released by network stack Ian Campbell
     [not found] ` <1334067965.5394.22.camel-o4Be2W7LfRlXesXXhkcM7miJhflN2719@public.gmane.org>
2012-04-10 14:26   ` [PATCH 09/10] net: add paged frag destructor support to kernel_sendpage Ian Campbell
2012-04-10 14:26     ` [Ocfs2-devel] " Ian Campbell
2012-04-10 14:26     ` Ian Campbell
2012-04-10 14:26   ` [PATCH 10/10] sunrpc: use SKB fragment destructors to delay completion until page is released by network stack Ian Campbell
2012-04-10 14:26     ` Ian Campbell
2012-04-10 14:58 ` [PATCH v4 0/10] skb paged fragment destructors Michael S. Tsirkin
2012-04-10 14:58 ` Michael S. Tsirkin
2012-04-10 15:00 ` Michael S. Tsirkin
2012-04-10 15:00 ` Michael S. Tsirkin
2012-04-10 15:46 ` Bart Van Assche
2012-04-10 15:46 ` Bart Van Assche
2012-04-10 15:50   ` Ian Campbell
2012-04-10 15:50   ` Ian Campbell
2012-04-11 10:02     ` Bart Van Assche
2012-04-11 10:02     ` Bart Van Assche

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.