~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/mm/page_reporting.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /mm/page_reporting.h (Version linux-6.11.5) and /mm/page_reporting.h (Version linux-5.10.228)


  1 /* SPDX-License-Identifier: GPL-2.0 */              1 /* SPDX-License-Identifier: GPL-2.0 */
  2 #ifndef _MM_PAGE_REPORTING_H                        2 #ifndef _MM_PAGE_REPORTING_H
  3 #define _MM_PAGE_REPORTING_H                        3 #define _MM_PAGE_REPORTING_H
  4                                                     4 
  5 #include <linux/mmzone.h>                           5 #include <linux/mmzone.h>
  6 #include <linux/pageblock-flags.h>                  6 #include <linux/pageblock-flags.h>
  7 #include <linux/page-isolation.h>                   7 #include <linux/page-isolation.h>
  8 #include <linux/jump_label.h>                       8 #include <linux/jump_label.h>
  9 #include <linux/slab.h>                             9 #include <linux/slab.h>
 10 #include <linux/pgtable.h>                         10 #include <linux/pgtable.h>
 11 #include <linux/scatterlist.h>                     11 #include <linux/scatterlist.h>
 12                                                    12 
                                                   >>  13 #define PAGE_REPORTING_MIN_ORDER        pageblock_order
                                                   >>  14 
 13 #ifdef CONFIG_PAGE_REPORTING                       15 #ifdef CONFIG_PAGE_REPORTING
 14 DECLARE_STATIC_KEY_FALSE(page_reporting_enable     16 DECLARE_STATIC_KEY_FALSE(page_reporting_enabled);
 15 extern unsigned int page_reporting_order;      << 
 16 void __page_reporting_notify(void);                17 void __page_reporting_notify(void);
 17                                                    18 
 18 static inline bool page_reported(struct page *     19 static inline bool page_reported(struct page *page)
 19 {                                                  20 {
 20         return static_branch_unlikely(&page_re     21         return static_branch_unlikely(&page_reporting_enabled) &&
 21                PageReported(page);                 22                PageReported(page);
 22 }                                                  23 }
 23                                                    24 
 24 /**                                                25 /**
 25  * page_reporting_notify_free - Free page noti     26  * page_reporting_notify_free - Free page notification to start page processing
 26  *                                                 27  *
 27  * This function is meant to act as a screener     28  * This function is meant to act as a screener for __page_reporting_notify
 28  * which will determine if a give zone has cro     29  * which will determine if a give zone has crossed over the high-water mark
 29  * that will justify us beginning page treatme     30  * that will justify us beginning page treatment. If we have crossed that
 30  * threshold then it will start the process of     31  * threshold then it will start the process of pulling some pages and
 31  * placing them in the batch list for treatmen     32  * placing them in the batch list for treatment.
 32  */                                                33  */
 33 static inline void page_reporting_notify_free(     34 static inline void page_reporting_notify_free(unsigned int order)
 34 {                                                  35 {
 35         /* Called from hot path in __free_one_     36         /* Called from hot path in __free_one_page() */
 36         if (!static_branch_unlikely(&page_repo     37         if (!static_branch_unlikely(&page_reporting_enabled))
 37                 return;                            38                 return;
 38                                                    39 
 39         /* Determine if we have crossed report     40         /* Determine if we have crossed reporting threshold */
 40         if (order < page_reporting_order)      !!  41         if (order < PAGE_REPORTING_MIN_ORDER)
 41                 return;                            42                 return;
 42                                                    43 
 43         /* This will add a few cycles, but sho     44         /* This will add a few cycles, but should be called infrequently */
 44         __page_reporting_notify();                 45         __page_reporting_notify();
 45 }                                                  46 }
 46 #else /* CONFIG_PAGE_REPORTING */                  47 #else /* CONFIG_PAGE_REPORTING */
 47 #define page_reported(_page)    false              48 #define page_reported(_page)    false
 48                                                    49 
 49 static inline void page_reporting_notify_free(     50 static inline void page_reporting_notify_free(unsigned int order)
 50 {                                                  51 {
 51 }                                                  52 }
 52 #endif /* CONFIG_PAGE_REPORTING */                 53 #endif /* CONFIG_PAGE_REPORTING */
 53 #endif /*_MM_PAGE_REPORTING_H */                   54 #endif /*_MM_PAGE_REPORTING_H */
 54                                                    55 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php