From: Alexander Duyck <alexander.h.duyck@intel.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: David Miller <davem@davemloft.net>, netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next] net: use bigger pages in __netdev_alloc_frag
Date: Wed, 26 Sep 2012 09:36:22 -0700 [thread overview]
Message-ID: <50632F06.1040306@intel.com> (raw)
In-Reply-To: <1348676085.5093.361.camel@edumazet-glaptop>
On 09/26/2012 09:14 AM, Eric Dumazet wrote:
> On Wed, 2012-09-26 at 09:00 -0700, Alexander Duyck wrote:
>
>> One minor thought. Instead of tracking offset and size why not just
>> work from the top down instead of the bottom up?
>>
>> So instead of starting with the frag offset at 0, why not start it at
>> PAGE_SIZE << order, and then work your way down to 0. That way you
>> don't need to track both size and offset.
>>
> How do you refill then ?
>
> (ie setting xxx->offset back to PAGE_SIZE << order)
>
> I am not sure we have direct access to a page order given a struct page
> pointer.
>
> I also like struct page_frag abstraction, because it might allow us
> better code factorization with other frag allocators.
>
> ( skb_append_datato_frags(), sk_page_frag_refill(), ...)
I forgot about the page recycling portion of it. I was still thinking
of the original implementation that had a fixed page order. You are
correct, with the page order being dynamic you will have to store size
somewhere.
Thanks,
Alex
next prev parent reply other threads:[~2012-09-26 16:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-26 9:06 [PATCH net-next] net: use bigger pages in __netdev_alloc_frag Eric Dumazet
2012-09-26 13:11 ` Benjamin LaHaise
2012-09-26 13:57 ` Eric Dumazet
2012-09-26 16:00 ` Alexander Duyck
2012-09-26 16:14 ` Eric Dumazet
2012-09-26 16:36 ` Alexander Duyck [this message]
2012-09-26 16:46 ` [PATCH net-next v2] " Eric Dumazet
2012-09-27 23:30 ` David Miller
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=50632F06.1040306@intel.com \
--to=alexander.h.duyck@intel.com \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=netdev@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.