lkml.org 
[lkml]   [2008]   [Dec]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH][RFC 23/23]: Support for zero-copy TCP transmit of user space data
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


\
 
 \ /
  Last update: 2008-12-20 07:17    [W:1.258 / U:0.600 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site