[lkml]   [2011]   [Nov]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 21/62] net: remove the second argument of k[un]map_atomic()
Le lundi 28 novembre 2011 à 10:06 -0800, Alexander Duyck a écrit :
> On 11/27/2011 12:07 AM, Eric Dumazet wrote:
> > But why are these drivers using kmap_atomic() in first place, since
> > their fragments are allocated in regular zone (GFP_ATOMIC or
> I was asking the same thing myself recently when I started working on
> some copy-break like code for the ixgbe driver. I believe the main
> reason is a lack of documentation. This code is based loosely on the
> skb_copy_bits code which will use kmap_skb_frag over all of the paged
> portions of the sk_buff. As such it was decided to map things via
> kmap_atomic in order to guarantee the pages had a valid virtual address.
> If I understand things correctly, what you are brining up is that pages
> allocated with either GFP_ATOMIC or GFP_KERNEL will always be allocated
> from the lowmem pool and as such page_address should always succeed. Is
> that correct?


Either you could :

A) allocate high memory pages to lower pressure on LOWMEM area on 32bit

B) avoid using kmap_atomic() & kunmap_atomic() and be faster on 32bit

skb_put(skb, length);
memcpy(skb->data, page_address(buffer_info->page), length);

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2011-11-28 19:29    [W:0.074 / U:0.556 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site