Messages in this thread Patch in this message | | | From | Matthew Wilcox <> | Subject | [PATCH 1/7] mm: Document x86 uses a linked list of pgds | Date | Tue, 28 Apr 2020 12:44:43 -0700 |
| |
From: "Matthew Wilcox (Oracle)" <willy@infradead.org>
x86 uses page->lru of the pages used for pgds, but that's not immediately obvious to anyone looking to make changes. Add a struct list_head to the union so it's clearly in use for pgds.
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> --- include/linux/mm_types.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index 4aba6c0c2ba8..9bb34e2cd5a5 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h @@ -142,8 +142,13 @@ struct page { struct list_head deferred_list; }; struct { /* Page table pages */ - unsigned long _pt_pad_1; /* compound_head */ - pgtable_t pmd_huge_pte; /* protected by page->ptl */ + union { + struct list_head pgd_list; /* x86 */ + struct { + unsigned long _pt_pad_1; + pgtable_t pmd_huge_pte; + }; + }; unsigned long _pt_pad_2; /* mapping */ union { struct mm_struct *pt_mm; /* x86 pgds only */ -- 2.26.2
| |