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

TOMOYO Linux Cross Reference
Linux/include/linux/page_owner.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 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 */
  2 #ifndef __LINUX_PAGE_OWNER_H
  3 #define __LINUX_PAGE_OWNER_H
  4 
  5 #include <linux/jump_label.h>
  6 
  7 #ifdef CONFIG_PAGE_OWNER
  8 extern struct static_key_false page_owner_inited;
  9 extern struct page_ext_operations page_owner_ops;
 10 
 11 extern void __reset_page_owner(struct page *page, unsigned short order);
 12 extern void __set_page_owner(struct page *page,
 13                         unsigned short order, gfp_t gfp_mask);
 14 extern void __split_page_owner(struct page *page, int old_order,
 15                         int new_order);
 16 extern void __folio_copy_owner(struct folio *newfolio, struct folio *old);
 17 extern void __set_page_owner_migrate_reason(struct page *page, int reason);
 18 extern void __dump_page_owner(const struct page *page);
 19 extern void pagetypeinfo_showmixedcount_print(struct seq_file *m,
 20                                         pg_data_t *pgdat, struct zone *zone);
 21 
 22 static inline void reset_page_owner(struct page *page, unsigned short order)
 23 {
 24         if (static_branch_unlikely(&page_owner_inited))
 25                 __reset_page_owner(page, order);
 26 }
 27 
 28 static inline void set_page_owner(struct page *page,
 29                         unsigned short order, gfp_t gfp_mask)
 30 {
 31         if (static_branch_unlikely(&page_owner_inited))
 32                 __set_page_owner(page, order, gfp_mask);
 33 }
 34 
 35 static inline void split_page_owner(struct page *page, int old_order,
 36                         int new_order)
 37 {
 38         if (static_branch_unlikely(&page_owner_inited))
 39                 __split_page_owner(page, old_order, new_order);
 40 }
 41 static inline void folio_copy_owner(struct folio *newfolio, struct folio *old)
 42 {
 43         if (static_branch_unlikely(&page_owner_inited))
 44                 __folio_copy_owner(newfolio, old);
 45 }
 46 static inline void set_page_owner_migrate_reason(struct page *page, int reason)
 47 {
 48         if (static_branch_unlikely(&page_owner_inited))
 49                 __set_page_owner_migrate_reason(page, reason);
 50 }
 51 static inline void dump_page_owner(const struct page *page)
 52 {
 53         if (static_branch_unlikely(&page_owner_inited))
 54                 __dump_page_owner(page);
 55 }
 56 #else
 57 static inline void reset_page_owner(struct page *page, unsigned short order)
 58 {
 59 }
 60 static inline void set_page_owner(struct page *page,
 61                         unsigned short order, gfp_t gfp_mask)
 62 {
 63 }
 64 static inline void split_page_owner(struct page *page, int old_order,
 65                         int new_order)
 66 {
 67 }
 68 static inline void folio_copy_owner(struct folio *newfolio, struct folio *folio)
 69 {
 70 }
 71 static inline void set_page_owner_migrate_reason(struct page *page, int reason)
 72 {
 73 }
 74 static inline void dump_page_owner(const struct page *page)
 75 {
 76 }
 77 #endif /* CONFIG_PAGE_OWNER */
 78 #endif /* __LINUX_PAGE_OWNER_H */
 79 

~ [ 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