Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Cluster Development (http://www.linux-archive.org/cluster-development/)
-   -   net: add paged frag destructor support to kernel_sendpage. (http://www.linux-archive.org/cluster-development/617645-net-add-paged-frag-destructor-support-kernel_sendpage.html)

David Miller 01-05-2012 06:15 PM

net: add paged frag destructor support to kernel_sendpage.
 
From: Ian Campbell <ian.campbell@citrix.com>
Date: Thu, 5 Jan 2012 17:13:43 +0000

> -static ssize_t do_tcp_sendpages(struct sock *sk, struct page **pages, int poffset,
> +static ssize_t do_tcp_sendpages(struct sock *sk,
> + struct page **pages,
> + struct skb_frag_destructor **destructors,
> + int poffset,
> size_t psize, int flags)
> {
> struct tcp_sock *tp = tcp_sk(sk);

An array of destructors is madness, and the one call site that specifies this
passes an address of a single entry.

This also would never even have to occur if you put the destructor inside of
struct page instead.

Finally, except for the skb_shared_info() layout optimization in patch #1 which
I alreayd applied, this stuff is not baked enough for the 3.3 merge window.


All times are GMT. The time now is 04:04 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.