diff options
| author | Tejun Heo <tj@kernel.org> | 2024-07-30 09:30:11 -1000 |
|---|---|---|
| committer | Tejun Heo <tj@kernel.org> | 2024-07-30 09:30:11 -1000 |
| commit | c8faf11cd192214e231626c3ee973a35d8fc33f2 (patch) | |
| tree | 4c3fcfddf4c7c311e1856dbf4dac1240564731f1 /include/linux/mmzone.h | |
| parent | 8bb30798fd6ee79e4041a32ca85b9f70345d8671 (diff) | |
| parent | 8400291e289ee6b2bf9779ff1c83a291501f017b (diff) | |
Merge tag 'v6.11-rc1' into for-6.12
Linux 6.11-rc1
Diffstat (limited to 'include/linux/mmzone.h')
| -rw-r--r-- | include/linux/mmzone.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 8f9c9590a42c..41458892bc8a 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h @@ -220,6 +220,8 @@ enum node_stat_item { PGDEMOTE_KSWAPD, PGDEMOTE_DIRECT, PGDEMOTE_KHUGEPAGED, + NR_MEMMAP, /* page metadata allocated through buddy allocator */ + NR_MEMMAP_BOOT, /* page metadata allocated through boot allocator */ NR_VM_NODE_STAT_ITEMS }; @@ -654,13 +656,12 @@ enum zone_watermarks { }; /* - * One per migratetype for each PAGE_ALLOC_COSTLY_ORDER. One additional list - * for THP which will usually be GFP_MOVABLE. Even if it is another type, - * it should not contribute to serious fragmentation causing THP allocation - * failures. + * One per migratetype for each PAGE_ALLOC_COSTLY_ORDER. Two additional lists + * are added for THP. One PCP list is used by GPF_MOVABLE, and the other PCP list + * is used by GFP_UNMOVABLE and GFP_RECLAIMABLE. */ #ifdef CONFIG_TRANSPARENT_HUGEPAGE -#define NR_PCP_THP 1 +#define NR_PCP_THP 2 #else #define NR_PCP_THP 0 #endif @@ -1980,8 +1981,9 @@ static inline int subsection_map_index(unsigned long pfn) static inline int pfn_section_valid(struct mem_section *ms, unsigned long pfn) { int idx = subsection_map_index(pfn); + struct mem_section_usage *usage = READ_ONCE(ms->usage); - return test_bit(idx, READ_ONCE(ms->usage)->subsection_map); + return usage ? test_bit(idx, usage->subsection_map) : 0; } #else static inline int pfn_section_valid(struct mem_section *ms, unsigned long pfn) |
