]> git.baikalelectronics.ru Git - kernel.git/commit
mm/net: Rename and move page fragment handling from net/ to mm/
authorAlexander Duyck <alexander.h.duyck@redhat.com>
Thu, 7 May 2015 04:11:57 +0000 (21:11 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 12 May 2015 14:39:26 +0000 (10:39 -0400)
commit649921518ad245923b3f095e881c595c52ce3123
treefb9a8648b7e68712d0e0009fcc8cc845cbb95507
parent22ad7aac235b6f45eef7644b030bde52af05a471
mm/net: Rename and move page fragment handling from net/ to mm/

This change moves the __alloc_page_frag functionality out of the networking
stack and into the page allocation portion of mm.  The idea it so help make
this maintainable by placing it with other page allocation functions.

Since we are moving it from skbuff.c to page_alloc.c I have also renamed
the basic defines and structure from netdev_alloc_cache to page_frag_cache
to reflect that this is now part of a different kernel subsystem.

I have also added a simple __free_page_frag function which can handle
freeing the frags based on the skb->head pointer.  The model for this is
based off of __free_pages since we don't actually need to deal with all of
the cases that put_page handles.  I incorporated the virt_to_head_page call
and compound_order into the function as it actually allows for a signficant
size reduction by reducing code duplication.

Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/gfp.h
include/linux/mm_types.h
include/linux/skbuff.h
mm/page_alloc.c
net/core/skbuff.c