page-flags.h (f10f1442c309ccef7a80ba3dc4abde0978e86fb4) page-flags.h (47010c040dec8af6347ec6259104fc13f7e7e30a)
1/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * Macros for manipulating and testing page->flags
4 */
5
6#ifndef PAGE_FLAGS_H
7#define PAGE_FLAGS_H
8

--- 176 unchanged lines hidden (view full) ---

185 /* Only valid for buddy pages. Used to track pages that are reported */
186 PG_reported = PG_uptodate,
187};
188
189#define PAGEFLAGS_MASK ((1UL << NR_PAGEFLAGS) - 1)
190
191#ifndef __GENERATING_BOUNDS_H
192
1/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * Macros for manipulating and testing page->flags
4 */
5
6#ifndef PAGE_FLAGS_H
7#define PAGE_FLAGS_H
8

--- 176 unchanged lines hidden (view full) ---

185 /* Only valid for buddy pages. Used to track pages that are reported */
186 PG_reported = PG_uptodate,
187};
188
189#define PAGEFLAGS_MASK ((1UL << NR_PAGEFLAGS) - 1)
190
191#ifndef __GENERATING_BOUNDS_H
192
193#ifdef CONFIG_HUGETLB_PAGE_FREE_VMEMMAP
194DECLARE_STATIC_KEY_MAYBE(CONFIG_HUGETLB_PAGE_FREE_VMEMMAP_DEFAULT_ON,
193#ifdef CONFIG_HUGETLB_PAGE_OPTIMIZE_VMEMMAP
194DECLARE_STATIC_KEY_MAYBE(CONFIG_HUGETLB_PAGE_OPTIMIZE_VMEMMAP_DEFAULT_ON,
195 hugetlb_optimize_vmemmap_key);
196
197static __always_inline bool hugetlb_optimize_vmemmap_enabled(void)
198{
195 hugetlb_optimize_vmemmap_key);
196
197static __always_inline bool hugetlb_optimize_vmemmap_enabled(void)
198{
199 return static_branch_maybe(CONFIG_HUGETLB_PAGE_FREE_VMEMMAP_DEFAULT_ON,
199 return static_branch_maybe(CONFIG_HUGETLB_PAGE_OPTIMIZE_VMEMMAP_DEFAULT_ON,
200 &hugetlb_optimize_vmemmap_key);
201}
202
203/*
204 * If the feature of optimizing vmemmap pages associated with each HugeTLB
205 * page is enabled, the head vmemmap page frame is reused and all of the tail
206 * vmemmap addresses map to the head vmemmap page frame (furture details can
207 * refer to the figure at the head of the mm/hugetlb_vmemmap.c). In other

--- 853 unchanged lines hidden ---
200 &hugetlb_optimize_vmemmap_key);
201}
202
203/*
204 * If the feature of optimizing vmemmap pages associated with each HugeTLB
205 * page is enabled, the head vmemmap page frame is reused and all of the tail
206 * vmemmap addresses map to the head vmemmap page frame (furture details can
207 * refer to the figure at the head of the mm/hugetlb_vmemmap.c). In other

--- 853 unchanged lines hidden ---