mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-26 04:20:23 +09:00
FROMLIST: BACKPORT: mm/page_alloc: Add page->buddy_list and page->pcp_list
The page allocator uses page->lru for storing pages on either buddy or PCP lists. Create page->buddy_list and page->pcp_list as a union with page->lru. This is simply to clarify what type of list a page is on in the page allocator. No functional change intended. Signed-off-by: Mel Gorman <mgorman@techsingularity.net> Link: https://lore.kernel.org/all/20220420095906.27349-2-mgorman@techsingularity.net/ Bug: 230899966 Signed-off-by: Minchan Kim <minchan@google.com> Change-Id: Ieef253fa28c2a411008da64b38716f6401a66961
This commit is contained in:
@@ -83,12 +83,18 @@ struct page {
|
||||
*/
|
||||
union {
|
||||
struct { /* Page cache and anonymous pages */
|
||||
/**
|
||||
* @lru: Pageout list, eg. active_list protected by
|
||||
* pgdat->lru_lock. Sometimes used as a generic list
|
||||
* by the page owner.
|
||||
*/
|
||||
struct list_head lru;
|
||||
union {
|
||||
/**
|
||||
* @lru: Pageout list, eg. active_list protected by
|
||||
* pgdat->lru_lock. Sometimes used as a generic list
|
||||
* by the page owner.
|
||||
*/
|
||||
struct list_head lru;
|
||||
|
||||
/* Or, free page */
|
||||
struct list_head buddy_list;
|
||||
struct list_head pcp_list;
|
||||
};
|
||||
/* See page-flags.h for PAGE_MAPPING_FLAGS */
|
||||
struct address_space *mapping;
|
||||
pgoff_t index; /* Our offset within mapping. */
|
||||
|
||||
Reference in New Issue
Block a user