forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'akpm' (patches from Andrew)
Merge fixes from Andrew Morton: "27 fixes. There are three patches that aren't actually fixes. They're simple function renamings which are nice-to-have in mainline as ongoing net development depends on them." * akpm: (27 commits) timerfd: export defines to userspace mm/hugetlb.c: fix reservation race when freeing surplus pages mm/slab.c: fix SLAB freelist randomization duplicate entries zram: support BDI_CAP_STABLE_WRITES zram: revalidate disk under init_lock mm: support anonymous stable page mm: add documentation for page fragment APIs mm: rename __page_frag functions to __page_frag_cache, drop order from drain mm: rename __alloc_page_frag to page_frag_alloc and __free_page_frag to page_frag_free mm, memcg: fix the active list aging for lowmem requests when memcg is enabled mm: don't dereference struct page fields of invalid pages mailmap: add codeaurora.org names for nameless email commits signal: protect SIGNAL_UNKILLABLE from unintentional clearing. mm: pmd dirty emulation in page fault handler ipc/sem.c: fix incorrect sem_lock pairing lib/Kconfig.debug: fix frv build failure mm: get rid of __GFP_OTHER_NODE mm: fix remote numa hits statistics mm: fix devm_memremap_pages crash, use mem_hotplug_{begin, done} ocfs2: fix crash caused by stale lvb with fsdlm plugin ...
- Loading branch information
Showing
39 changed files
with
355 additions
and
182 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -137,6 +137,7 @@ Ricardo Ribalda Delgado <[email protected]> | |
Rudolf Marek <[email protected]> | ||
Rui Saraiva <[email protected]> | ||
Sachin P Sant <[email protected]> | ||
Sarangdhar Joshi <[email protected]> | ||
Sam Ravnborg <[email protected]> | ||
Santosh Shilimkar <[email protected]> | ||
Santosh Shilimkar <[email protected]> | ||
|
@@ -150,10 +151,13 @@ Shuah Khan <[email protected]> <[email protected]> | |
Simon Kelley <[email protected]> | ||
Stéphane Witzmann <[email protected]> | ||
Stephen Hemminger <[email protected]> | ||
Subash Abhinov Kasiviswanathan <[email protected]> | ||
Subhash Jadavani <[email protected]> | ||
Sudeep Holla <[email protected]> Sudeep KarkadaNagesha <[email protected]> | ||
Sumit Semwal <[email protected]> | ||
Tejun Heo <[email protected]> | ||
Thomas Graf <[email protected]> | ||
Thomas Pedersen <[email protected]> | ||
Tony Luck <[email protected]> | ||
Tsuneo Yoshioka <[email protected]> | ||
Uwe Kleine-König <[email protected]> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
Page fragments | ||
-------------- | ||
|
||
A page fragment is an arbitrary-length arbitrary-offset area of memory | ||
which resides within a 0 or higher order compound page. Multiple | ||
fragments within that page are individually refcounted, in the page's | ||
reference counter. | ||
|
||
The page_frag functions, page_frag_alloc and page_frag_free, provide a | ||
simple allocation framework for page fragments. This is used by the | ||
network stack and network device drivers to provide a backing region of | ||
memory for use as either an sk_buff->head, or to be used in the "frags" | ||
portion of skb_shared_info. | ||
|
||
In order to make use of the page fragment APIs a backing page fragment | ||
cache is needed. This provides a central point for the fragment allocation | ||
and tracks allows multiple calls to make use of a cached page. The | ||
advantage to doing this is that multiple calls to get_page can be avoided | ||
which can be expensive at allocation time. However due to the nature of | ||
this caching it is required that any calls to the cache be protected by | ||
either a per-cpu limitation, or a per-cpu limitation and forcing interrupts | ||
to be disabled when executing the fragment allocation. | ||
|
||
The network stack uses two separate caches per CPU to handle fragment | ||
allocation. The netdev_alloc_cache is used by callers making use of the | ||
__netdev_alloc_frag and __netdev_alloc_skb calls. The napi_alloc_cache is | ||
used by callers of the __napi_alloc_frag and __napi_alloc_skb calls. The | ||
main difference between these two calls is the context in which they may be | ||
called. The "netdev" prefixed functions are usable in any context as these | ||
functions will disable interrupts, while the "napi" prefixed functions are | ||
only usable within the softirq context. | ||
|
||
Many network device drivers use a similar methodology for allocating page | ||
fragments, but the page fragments are cached at the ring or descriptor | ||
level. In order to enable these cases it is necessary to provide a generic | ||
way of tearing down a page cache. For this reason __page_frag_cache_drain | ||
was implemented. It allows for freeing multiple references from a single | ||
page via a single call. The advantage to doing this is that it allows for | ||
cleaning up the multiple references that were added to a page in order to | ||
avoid calling get_page per allocation. | ||
|
||
Alexander Duyck, Nov 29, 2016. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.