Netdev List
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Li Yu <raise.sail@gmail.com>
Cc: Linux Netdev List <netdev@vger.kernel.org>
Subject: Re: [PATCH 1/4 net-next] net: allow skb->head to be a page fragment
Date: Wed, 07 Nov 2012 03:04:24 -0800	[thread overview]
Message-ID: <1352286264.3140.3575.camel@edumazet-glaptop> (raw)
In-Reply-To: <509A1D49.4080306@gmail.com>

On Wed, 2012-11-07 at 16:35 +0800, Li Yu wrote:
> 于 2012年11月07日 16:20, Li Yu 写道:
> > 于 2012年04月27日 18:33, Eric Dumazet 写道:
> >> From: Eric Dumazet <edumazet@google.com>
> >>
> >> skb->head is currently allocated from kmalloc(). This is convenient but
> >> has the drawback the data cannot be converted to a page fragment if
> >> needed.
> >>
> >
> > Hi, Eric,
> >
> > I have a question about this patch, why data are allocated from
> > kmalloc() can not be converted to page fragment ? We have its kernel
> > mapped address and length, so we can get its page and offset in the
> > page. If the skb is not cloned (shared with others), such page and its
> > offset should be can use safely, in my words.
> >
> > I suspected that I may lost important something in slab internals, is
> > right?
> >
> > Thanks
> >
> > Yu
> >
> 
> Or since slab allocated object may be across multiple pages?
> I saw __netdev_alloc_skb() only use build_skb() with non-zero
> fragsz if it is less than PAGE_SIZE.
> 

SLAB allocators have their own way to handle a page, we cant interfere
with it.

So no, a kmalloced() object cannot be converted to a page fragment.

  reply	other threads:[~2012-11-07 11:04 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-27 10:33 [PATCH 1/4 net-next] net: allow skb->head to be a page fragment Eric Dumazet
2012-04-28  0:27 ` Alexander Duyck
2012-04-28  6:30   ` Eric Dumazet
2012-04-28  7:16   ` Eric Dumazet
2012-04-28  8:27     ` Alexander Duyck
2012-04-28  9:22       ` David Miller
2012-05-01  1:48 ` David Miller
2012-11-07  8:20 ` Li Yu
2012-11-07  8:35   ` Li Yu
2012-11-07 11:04     ` Eric Dumazet [this message]
2012-11-08  7:46       ` Li Yu
2012-11-08 13:30         ` Eric Dumazet
2012-11-09  2:31           ` Li Yu
2012-11-09  2:37             ` Eric Dumazet
2012-11-09  2:50               ` Li Yu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1352286264.3140.3575.camel@edumazet-glaptop \
    --to=eric.dumazet@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=raise.sail@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox