From mboxrd@z Thu Jan 1 00:00:00 1970 From: Evgeniy Polyakov Subject: Re: [PATCH] TX_RING and packet mmap Date: Tue, 21 Apr 2009 13:41:49 +0400 Message-ID: <20090421094149.GA22907@ioremap.net> References: <20090412142451.GA2694@ioremap.net> <7e0dd21a0904121227n3b03f2c7v8bf30c45667603a1@mail.gmail.com> <20090412195203.GA11899@ioremap.net> <7e0dd21a0904121330p3fe9b27bx1cd16a6c8fb9b574@mail.gmail.com> <20090412205334.GA14345@ioremap.net> <7e0dd21a0904121631u3fc7c676r12eb7e71fe87e02b@mail.gmail.com> <20090415071023.GA26986@ioremap.net> <7e0dd21a0904150614y301a01e4rdec1fe4f9a14c13f@mail.gmail.com> <20090416111616.GB28509@ioremap.net> <7e0dd21a0904181438j251f4f8cnc210c6dee8ce5212@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Herbert Xu , netdev@vger.kernel.org, "David S. Miller" , Patrick McHardy , jamal To: Johann Baudy Return-path: Received: from corega.com.ru ([195.178.208.66]:34099 "EHLO tservice.net.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753155AbZDUJlv (ORCPT ); Tue, 21 Apr 2009 05:41:51 -0400 Content-Disposition: inline In-Reply-To: <7e0dd21a0904181438j251f4f8cnc210c6dee8ce5212@mail.gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: Hi Johann. On Sat, Apr 18, 2009 at 11:38:48PM +0200, Johann Baudy (johann.baudy@gnu-log.net) wrote: > > I think it should only be called when shared area is about to be freed > > and not when attached skb is freed. > During skb_linearize(). shared info is memcopied and freed in > pskb_expand_head() if not enough memory is available in current head. > Then, Do you expect this new destructor to be called twice? (during > skb_linearize() and kfree_skb()) It cals skb_release_data() which should invoke shared area destructor before being freed. > >Thus you can put your pages into > > fraglist and reuse them after the last reference to the shared area is > > gone. > > If my understanding is correct, skb can be linearized without calling > skb_release_data() (if enough space is available in head). Hence, In > this case, I will not have access to original frags[] from > skb_shared_info destructor. Yes, that's right. -- Evgeniy Polyakov