Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753415AbYLTGPJ (ORCPT ); Sat, 20 Dec 2008 01:15:09 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751990AbYLTGOw (ORCPT ); Sat, 20 Dec 2008 01:14:52 -0500 Received: from gw.goop.org ([64.81.55.164]:32862 "EHLO mail.goop.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751980AbYLTGOv (ORCPT ); Sat, 20 Dec 2008 01:14:51 -0500 Message-ID: <494C8D57.7040808@goop.org> Date: Fri, 19 Dec 2008 22:14:47 -0800 From: Jeremy Fitzhardinge User-Agent: Thunderbird 2.0.0.18 (X11/20081119) MIME-Version: 1.0 To: Herbert Xu CC: Evgeniy Polyakov , Vladislav Bolkhovitin , linux-scsi@vger.kernel.org, James Bottomley , Andrew Morton , FUJITA Tomonori , Mike Christie , Jeff Garzik , Boaz Harrosh , Linus Torvalds , linux-kernel@vger.kernel.org, scst-devel@lists.sourceforge.net, Bart Van Assche , "Nicholas A. Bellinger" , netdev@vger.kernel.org, Rusty Russell , David Miller Subject: Re: [PATCH][RFC 23/23]: Support for zero-copy TCP transmit of user space data References: <494009D7.4020602@vlnb.net> <494012C4.7090304@vlnb.net> <494C0255.8010208@goop.org> <20081219220452.GB704@ioremap.net> <494C1E5E.7070809@goop.org> <20081219223314.GA2736@ioremap.net> <494C50BB.5030809@goop.org> <20081220020250.GA15064@gondor.apana.org.au> In-Reply-To: <20081220020250.GA15064@gondor.apana.org.au> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1598 Lines: 35 Herbert Xu wrote: > On Fri, Dec 19, 2008 at 05:56:11PM -0800, Jeremy Fitzhardinge wrote: > >> Evgeniy Polyakov wrote: >> >>> Shared info is freed when there are no skbs referring to the shared info >>> in question. Skb holds all pages in shared info in the fraglist array, >>> so when it is about to be freed, it means that network stack does not >>> use it (particulary it will putpage every page in fraglist). Usually >>> there are two skbs in the network stack per packet in TCP (allocated at >>> once though via fastclone mechanims): one is provided to the device >>> (and will be freed there) and another one is placed into retransmit >>> queue, where it will be located and freed when ack has been received. >>> >>> There may be another layers which may clone skb, but its shared info >>> structure (shared between the clones) will only be freed when all users >>> freed appropriate cloned skbs. >>> > > This is all correct. However, please note that that if any clone > does a pskb_expand_head then it will get its own private copy of > of the shared info. So you can't use the shared info to ref count > the pages in it. Ah, so the lifetime of the shared_info structure doesn't match the lifetime of the underlying pages, and this mechanism would be insufficient for my purposes? If so, how can it be solved? Thanks, J -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/