mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-26 08:05:04 +07:00
1d40a5ea01
Define a new PageTable bit in the page_type and use it to mark pages in use as page tables. This can be helpful when debugging crashdumps or analysing memory fragmentation. Add a KPF flag to report these pages to userspace and update page-types.c to interpret that flag. Note that only pages currently accounted as NR_PAGETABLES are tracked as PageTable; this does not include pgd/p4d/pud/pmd pages. Those will be the subject of a later patch. Link: http://lkml.kernel.org/r/20180518194519.3820-4-willy@infradead.org Signed-off-by: Matthew Wilcox <mawilcox@microsoft.com> Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Acked-by: Vlastimil Babka <vbabka@suse.cz> Cc: Christoph Lameter <cl@linux.com> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: Jérôme Glisse <jglisse@redhat.com> Cc: Lai Jiangshan <jiangshanlai@gmail.com> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Pekka Enberg <penberg@kernel.org> Cc: Randy Dunlap <rdunlap@infradead.org> Cc: Andrey Ryabinin <aryabinin@virtuozzo.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
41 lines
915 B
C
41 lines
915 B
C
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
|
#ifndef _UAPILINUX_KERNEL_PAGE_FLAGS_H
|
|
#define _UAPILINUX_KERNEL_PAGE_FLAGS_H
|
|
|
|
/*
|
|
* Stable page flag bits exported to user space
|
|
*/
|
|
|
|
#define KPF_LOCKED 0
|
|
#define KPF_ERROR 1
|
|
#define KPF_REFERENCED 2
|
|
#define KPF_UPTODATE 3
|
|
#define KPF_DIRTY 4
|
|
#define KPF_LRU 5
|
|
#define KPF_ACTIVE 6
|
|
#define KPF_SLAB 7
|
|
#define KPF_WRITEBACK 8
|
|
#define KPF_RECLAIM 9
|
|
#define KPF_BUDDY 10
|
|
|
|
/* 11-20: new additions in 2.6.31 */
|
|
#define KPF_MMAP 11
|
|
#define KPF_ANON 12
|
|
#define KPF_SWAPCACHE 13
|
|
#define KPF_SWAPBACKED 14
|
|
#define KPF_COMPOUND_HEAD 15
|
|
#define KPF_COMPOUND_TAIL 16
|
|
#define KPF_HUGE 17
|
|
#define KPF_UNEVICTABLE 18
|
|
#define KPF_HWPOISON 19
|
|
#define KPF_NOPAGE 20
|
|
|
|
#define KPF_KSM 21
|
|
#define KPF_THP 22
|
|
#define KPF_BALLOON 23
|
|
#define KPF_ZERO_PAGE 24
|
|
#define KPF_IDLE 25
|
|
#define KPF_PGTABLE 26
|
|
|
|
#endif /* _UAPILINUX_KERNEL_PAGE_FLAGS_H */
|