mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-11-08 10:31:43 +01:00
The include/linux/pgtable.h is going to be the home of generic page table manipulation functions. Start with moving asm-generic/pgtable.h to include/linux/pgtable.h and make the latter include asm/pgtable.h. Signed-off-by: Mike Rapoport <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Cc: Arnd Bergmann <[email protected]> Cc: Borislav Petkov <[email protected]> Cc: Brian Cain <[email protected]> Cc: Catalin Marinas <[email protected]> Cc: Chris Zankel <[email protected]> Cc: "David S. Miller" <[email protected]> Cc: Geert Uytterhoeven <[email protected]> Cc: Greentime Hu <[email protected]> Cc: Greg Ungerer <[email protected]> Cc: Guan Xuetao <[email protected]> Cc: Guo Ren <[email protected]> Cc: Heiko Carstens <[email protected]> Cc: Helge Deller <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Ley Foon Tan <[email protected]> Cc: Mark Salter <[email protected]> Cc: Matthew Wilcox <[email protected]> Cc: Matt Turner <[email protected]> Cc: Max Filippov <[email protected]> Cc: Michael Ellerman <[email protected]> Cc: Michal Simek <[email protected]> Cc: Nick Hu <[email protected]> Cc: Paul Walmsley <[email protected]> Cc: Richard Weinberger <[email protected]> Cc: Rich Felker <[email protected]> Cc: Russell King <[email protected]> Cc: Stafford Horne <[email protected]> Cc: Thomas Bogendoerfer <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Tony Luck <[email protected]> Cc: Vincent Chen <[email protected]> Cc: Vineet Gupta <[email protected]> Cc: Will Deacon <[email protected]> Cc: Yoshinori Sato <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Linus Torvalds <[email protected]>
55 lines
1.6 KiB
C
55 lines
1.6 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef _MM_PAGE_REPORTING_H
|
|
#define _MM_PAGE_REPORTING_H
|
|
|
|
#include <linux/mmzone.h>
|
|
#include <linux/pageblock-flags.h>
|
|
#include <linux/page-isolation.h>
|
|
#include <linux/jump_label.h>
|
|
#include <linux/slab.h>
|
|
#include <linux/pgtable.h>
|
|
#include <linux/scatterlist.h>
|
|
|
|
#define PAGE_REPORTING_MIN_ORDER pageblock_order
|
|
|
|
#ifdef CONFIG_PAGE_REPORTING
|
|
DECLARE_STATIC_KEY_FALSE(page_reporting_enabled);
|
|
void __page_reporting_notify(void);
|
|
|
|
static inline bool page_reported(struct page *page)
|
|
{
|
|
return static_branch_unlikely(&page_reporting_enabled) &&
|
|
PageReported(page);
|
|
}
|
|
|
|
/**
|
|
* page_reporting_notify_free - Free page notification to start page processing
|
|
*
|
|
* This function is meant to act as a screener for __page_reporting_notify
|
|
* which will determine if a give zone has crossed over the high-water mark
|
|
* that will justify us beginning page treatment. If we have crossed that
|
|
* threshold then it will start the process of pulling some pages and
|
|
* placing them in the batch list for treatment.
|
|
*/
|
|
static inline void page_reporting_notify_free(unsigned int order)
|
|
{
|
|
/* Called from hot path in __free_one_page() */
|
|
if (!static_branch_unlikely(&page_reporting_enabled))
|
|
return;
|
|
|
|
/* Determine if we have crossed reporting threshold */
|
|
if (order < PAGE_REPORTING_MIN_ORDER)
|
|
return;
|
|
|
|
/* This will add a few cycles, but should be called infrequently */
|
|
__page_reporting_notify();
|
|
}
|
|
#else /* CONFIG_PAGE_REPORTING */
|
|
#define page_reported(_page) false
|
|
|
|
static inline void page_reporting_notify_free(unsigned int order)
|
|
{
|
|
}
|
|
#endif /* CONFIG_PAGE_REPORTING */
|
|
#endif /*_MM_PAGE_REPORTING_H */
|