/kernel/linux/linux-5.10/include/linux/ |
D | page_ref.h | 29 extern void __page_ref_set(struct page *page, int v); 30 extern void __page_ref_mod(struct page *page, int v); 31 extern void __page_ref_mod_and_test(struct page *page, int v, int ret); 32 extern void __page_ref_mod_and_return(struct page *page, int v, int ret); 33 extern void __page_ref_mod_unless(struct page *page, int v, int u); 34 extern void __page_ref_freeze(struct page *page, int v, int ret); 35 extern void __page_ref_unfreeze(struct page *page, int v); 41 static inline void __page_ref_set(struct page *page, int v) in __page_ref_set() argument 44 static inline void __page_ref_mod(struct page *page, int v) in __page_ref_mod() argument 47 static inline void __page_ref_mod_and_test(struct page *page, int v, int ret) in __page_ref_mod_and_test() argument [all …]
|
D | page-flags.h | 192 struct page; /* forward declaration */ 194 static inline struct page *compound_head(struct page *page) in compound_head() argument 196 unsigned long head = READ_ONCE(page->compound_head); in compound_head() 199 return (struct page *) (head - 1); in compound_head() 200 return page; in compound_head() 203 static __always_inline int PageTail(struct page *page) in PageTail() argument 205 return READ_ONCE(page->compound_head) & 1; in PageTail() 208 static __always_inline int PageCompound(struct page *page) in PageCompound() argument 210 return test_bit(PG_head, &page->flags) || PageTail(page); in PageCompound() 214 static inline int PagePoisoned(const struct page *page) in PagePoisoned() argument [all …]
|
D | pagemap.h | 158 void release_pages(struct page **pages, int nr); 204 static inline int __page_cache_add_speculative(struct page *page, int count) in __page_cache_add_speculative() argument 219 VM_BUG_ON_PAGE(page_count(page) == 0, page); in __page_cache_add_speculative() 220 page_ref_add(page, count); in __page_cache_add_speculative() 223 if (unlikely(!page_ref_add_unless(page, count, 0))) { in __page_cache_add_speculative() 232 VM_BUG_ON_PAGE(PageTail(page), page); in __page_cache_add_speculative() 237 static inline int page_cache_get_speculative(struct page *page) in page_cache_get_speculative() argument 239 return __page_cache_add_speculative(page, 1); in page_cache_get_speculative() 242 static inline int page_cache_add_speculative(struct page *page, int count) in page_cache_add_speculative() argument 244 return __page_cache_add_speculative(page, count); in page_cache_add_speculative() [all …]
|
D | page_idle.h | 12 static inline bool page_is_young(struct page *page) in page_is_young() argument 14 return PageYoung(page); in page_is_young() 17 static inline void set_page_young(struct page *page) in set_page_young() argument 19 SetPageYoung(page); in set_page_young() 22 static inline bool test_and_clear_page_young(struct page *page) in test_and_clear_page_young() argument 24 return TestClearPageYoung(page); in test_and_clear_page_young() 27 static inline bool page_is_idle(struct page *page) in page_is_idle() argument 29 return PageIdle(page); in page_is_idle() 32 static inline void set_page_idle(struct page *page) in set_page_idle() argument 34 SetPageIdle(page); in set_page_idle() [all …]
|
D | balloon_compaction.h | 58 int (*migratepage)(struct balloon_dev_info *, struct page *newpage, 59 struct page *page, enum migrate_mode mode); 63 extern struct page *balloon_page_alloc(void); 65 struct page *page); 66 extern struct page *balloon_page_dequeue(struct balloon_dev_info *b_dev_info); 83 extern bool balloon_page_isolate(struct page *page, 85 extern void balloon_page_putback(struct page *page); 87 struct page *newpage, 88 struct page *page, enum migrate_mode mode); 100 struct page *page) in balloon_page_insert() argument [all …]
|
D | migrate.h | 10 typedef struct page *new_page_t(struct page *page, unsigned long private); 11 typedef void free_page_t(struct page *page, unsigned long private); 40 struct page *newpage, struct page *page, 43 struct page *newpage, struct page *page, 47 extern struct page *alloc_migration_target(struct page *page, unsigned long private); 48 extern int isolate_movable_page(struct page *page, isolate_mode_t mode); 49 extern void putback_movable_page(struct page *page); 53 extern void migrate_page_states(struct page *newpage, struct page *page); 54 extern void migrate_page_copy(struct page *newpage, struct page *page); 56 struct page *newpage, struct page *page); [all …]
|
D | highmem.h | 15 static inline void flush_anon_page(struct vm_area_struct *vma, struct page *page, unsigned long vma… in flush_anon_page() argument 21 static inline void flush_kernel_dcache_page(struct page *page) in flush_kernel_dcache_page() argument 35 extern void *kmap_atomic_high_prot(struct page *page, pgprot_t prot); 47 void *kmap_high(struct page *page); 48 static inline void *kmap(struct page *page) in kmap() argument 53 if (!PageHighMem(page)) in kmap() 54 addr = page_address(page); in kmap() 56 addr = kmap_high(page); in kmap() 61 void kunmap_high(struct page *page); 63 static inline void kunmap(struct page *page) in kunmap() argument [all …]
|
D | page_owner.h | 11 extern void __reset_page_owner(struct page *page, unsigned int order); 12 extern void __set_page_owner(struct page *page, 14 extern void __split_page_owner(struct page *page, unsigned int nr); 15 extern void __copy_page_owner(struct page *oldpage, struct page *newpage); 16 extern void __set_page_owner_migrate_reason(struct page *page, int reason); 17 extern void __dump_page_owner(struct page *page); 21 static inline void reset_page_owner(struct page *page, unsigned int order) in reset_page_owner() argument 24 __reset_page_owner(page, order); in reset_page_owner() 27 static inline void set_page_owner(struct page *page, in set_page_owner() argument 31 __set_page_owner(page, order, gfp_mask); in set_page_owner() [all …]
|
D | mm.h | 161 static inline void __mm_zero_struct_page(struct page *page) in __mm_zero_struct_page() argument 163 unsigned long *_pp = (void *)page; in __mm_zero_struct_page() 166 BUILD_BUG_ON(sizeof(struct page) & 7); in __mm_zero_struct_page() 167 BUILD_BUG_ON(sizeof(struct page) < 56); in __mm_zero_struct_page() 168 BUILD_BUG_ON(sizeof(struct page) > 80); in __mm_zero_struct_page() 170 switch (sizeof(struct page)) { in __mm_zero_struct_page() 191 #define mm_zero_struct_page(pp) ((void)memset((pp), 0, sizeof(struct page))) 229 #define nth_page(page,n) pfn_to_page(page_to_pfn((page)) + (n)) argument 237 #define lru_to_page(head) (list_entry((head)->prev, struct page, lru)) 551 struct page *cow_page; /* Page handler may use for COW fault */ [all …]
|
D | hugetlb_cgroup.h | 62 __hugetlb_cgroup_from_page(struct page *page, bool rsvd) in __hugetlb_cgroup_from_page() argument 64 VM_BUG_ON_PAGE(!PageHuge(page), page); in __hugetlb_cgroup_from_page() 66 if (compound_order(page) < HUGETLB_CGROUP_MIN_ORDER) in __hugetlb_cgroup_from_page() 69 return (struct hugetlb_cgroup *)page[3].private; in __hugetlb_cgroup_from_page() 71 return (struct hugetlb_cgroup *)page[2].private; in __hugetlb_cgroup_from_page() 74 static inline struct hugetlb_cgroup *hugetlb_cgroup_from_page(struct page *page) in hugetlb_cgroup_from_page() argument 76 return __hugetlb_cgroup_from_page(page, false); in hugetlb_cgroup_from_page() 80 hugetlb_cgroup_from_page_rsvd(struct page *page) in hugetlb_cgroup_from_page_rsvd() argument 82 return __hugetlb_cgroup_from_page(page, true); in hugetlb_cgroup_from_page_rsvd() 85 static inline int __set_hugetlb_cgroup(struct page *page, in __set_hugetlb_cgroup() argument [all …]
|
D | swap.h | 317 void *workingset_eviction(struct page *page, struct mem_cgroup *target_memcg); 318 void workingset_refault(struct page *page, void *shadow); 319 void workingset_activation(struct page *page); 339 extern void lru_note_cost_page(struct page *); 340 extern void lru_cache_add(struct page *); 341 extern void lru_add_page_tail(struct page *page, struct page *page_tail, 343 extern void mark_page_accessed(struct page *); 348 extern void rotate_reclaimable_page(struct page *page); 349 extern void deactivate_file_page(struct page *page); 350 extern void deactivate_page(struct page *page); [all …]
|
D | huge_mm.h | 28 struct page *follow_trans_huge_pmd(struct vm_area_struct *vma, 187 void prep_transhuge_page(struct page *page); 188 void free_transhuge_page(struct page *page); 189 bool is_transparent_hugepage(struct page *page); 191 bool can_split_huge_page(struct page *page, int *pextra_pins); 192 int split_huge_page_to_list(struct page *page, struct list_head *list); 193 static inline int split_huge_page(struct page *page) in split_huge_page() argument 195 return split_huge_page_to_list(page, NULL); in split_huge_page() 197 void deferred_split_huge_page(struct page *page); 200 unsigned long address, bool freeze, struct page *page); [all …]
|
/kernel/linux/linux-5.10/mm/ |
D | swap.c | 79 static void __page_cache_release(struct page *page) in __page_cache_release() argument 81 if (PageLRU(page)) { in __page_cache_release() 82 pg_data_t *pgdat = page_pgdat(page); in __page_cache_release() 87 lruvec = mem_cgroup_page_lruvec(page, pgdat); in __page_cache_release() 88 VM_BUG_ON_PAGE(!PageLRU(page), page); in __page_cache_release() 89 __ClearPageLRU(page); in __page_cache_release() 90 del_page_from_lru_list(page, lruvec, page_off_lru(page)); in __page_cache_release() 93 __ClearPageWaiters(page); in __page_cache_release() 96 static void __put_single_page(struct page *page) in __put_single_page() argument 98 __page_cache_release(page); in __put_single_page() [all …]
|
D | filemap.c | 121 struct page *page, void *shadow) in page_cache_delete() argument 123 XA_STATE(xas, &mapping->i_pages, page->index); in page_cache_delete() 129 if (!PageHuge(page)) { in page_cache_delete() 130 xas_set_order(&xas, page->index, compound_order(page)); in page_cache_delete() 131 nr = compound_nr(page); in page_cache_delete() 134 VM_BUG_ON_PAGE(!PageLocked(page), page); in page_cache_delete() 135 VM_BUG_ON_PAGE(PageTail(page), page); in page_cache_delete() 136 VM_BUG_ON_PAGE(nr != 1 && shadow, page); in page_cache_delete() 141 page->mapping = NULL; in page_cache_delete() 158 struct page *page) in unaccount_page_cache_page() argument [all …]
|
D | migrate.c | 86 int isolate_movable_page(struct page *page, isolate_mode_t mode) in isolate_movable_page() argument 99 if (unlikely(!get_page_unless_zero(page))) in isolate_movable_page() 107 if (unlikely(!__PageMovable(page))) in isolate_movable_page() 120 if (unlikely(!trylock_page(page))) in isolate_movable_page() 123 if (!PageMovable(page) || PageIsolated(page)) in isolate_movable_page() 126 mapping = page_mapping(page); in isolate_movable_page() 127 VM_BUG_ON_PAGE(!mapping, page); in isolate_movable_page() 129 if (!mapping->a_ops->isolate_page(page, mode)) in isolate_movable_page() 133 WARN_ON_ONCE(PageIsolated(page)); in isolate_movable_page() 134 __SetPageIsolated(page); in isolate_movable_page() [all …]
|
D | rmap.c | 489 struct anon_vma *page_get_anon_vma(struct page *page) in page_get_anon_vma() argument 495 anon_mapping = (unsigned long)READ_ONCE(page->mapping); in page_get_anon_vma() 498 if (!page_mapped(page)) in page_get_anon_vma() 514 if (!page_mapped(page)) { in page_get_anon_vma() 532 struct anon_vma *page_lock_anon_vma_read(struct page *page) in page_lock_anon_vma_read() argument 539 anon_mapping = (unsigned long)READ_ONCE(page->mapping); in page_lock_anon_vma_read() 542 if (!page_mapped(page)) in page_lock_anon_vma_read() 553 if (!page_mapped(page)) { in page_lock_anon_vma_read() 566 if (!page_mapped(page)) { in page_lock_anon_vma_read() 712 unsigned long page_address_in_vma(struct page *page, struct vm_area_struct *vma) in page_address_in_vma() argument [all …]
|
D | page_io.c | 30 struct page *page, bio_end_io_t end_io) in get_swap_bio() argument 38 bio->bi_iter.bi_sector = map_swap_page(page, &bdev); in get_swap_bio() 43 bio_add_page(bio, page, thp_size(page), 0); in get_swap_bio() 50 struct page *page = bio_first_page_all(bio); in end_swap_bio_write() local 53 SetPageError(page); in end_swap_bio_write() 62 set_page_dirty(page); in end_swap_bio_write() 66 ClearPageReclaim(page); in end_swap_bio_write() 68 end_page_writeback(page); in end_swap_bio_write() 74 struct page *page = bio_first_page_all(bio); in end_swap_bio_read() local 78 SetPageError(page); in end_swap_bio_read() [all …]
|
D | truncate.c | 83 struct page *page = pvec->pages[i]; in truncate_exceptional_pvec_entries() local 86 if (!xa_is_value(page)) { in truncate_exceptional_pvec_entries() 87 pvec->pages[j++] = page; in truncate_exceptional_pvec_entries() 99 __clear_shadow_entry(mapping, index, page); in truncate_exceptional_pvec_entries() 152 void do_invalidatepage(struct page *page, unsigned int offset, in do_invalidatepage() argument 155 void (*invalidatepage)(struct page *, unsigned int, unsigned int); in do_invalidatepage() 157 invalidatepage = page->mapping->a_ops->invalidatepage; in do_invalidatepage() 163 (*invalidatepage)(page, offset, length); in do_invalidatepage() 176 static void truncate_cleanup_page(struct page *page) in truncate_cleanup_page() argument 178 if (page_mapped(page)) in truncate_cleanup_page() [all …]
|
D | page_isolation.c | 18 static int set_migratetype_isolate(struct page *page, int migratetype, int isol_flags) in set_migratetype_isolate() argument 20 struct zone *zone = page_zone(page); in set_migratetype_isolate() 21 struct page *unmovable; in set_migratetype_isolate() 31 if (is_migrate_isolate_page(page)) { in set_migratetype_isolate() 40 unmovable = has_unmovable_pages(zone, page, migratetype, isol_flags); in set_migratetype_isolate() 43 int mt = get_pageblock_migratetype(page); in set_migratetype_isolate() 45 set_pageblock_migratetype(page, MIGRATE_ISOLATE); in set_migratetype_isolate() 47 nr_pages = move_freepages_block(zone, page, MIGRATE_ISOLATE, in set_migratetype_isolate() 68 static void unset_migratetype_isolate(struct page *page, unsigned migratetype) in unset_migratetype_isolate() argument 75 struct page *buddy; in unset_migratetype_isolate() [all …]
|
/kernel/linux/linux-5.10/fs/9p/ |
D | cache.h | 30 extern int __v9fs_fscache_release_page(struct page *page, gfp_t gfp); 31 extern void __v9fs_fscache_invalidate_page(struct page *page); 33 struct page *page); 38 extern void __v9fs_readpage_to_fscache(struct inode *inode, struct page *page); 40 struct page *page); 42 static inline int v9fs_fscache_release_page(struct page *page, in v9fs_fscache_release_page() argument 45 return __v9fs_fscache_release_page(page, gfp); in v9fs_fscache_release_page() 48 static inline void v9fs_fscache_invalidate_page(struct page *page) in v9fs_fscache_invalidate_page() argument 50 __v9fs_fscache_invalidate_page(page); in v9fs_fscache_invalidate_page() 54 struct page *page) in v9fs_readpage_from_fscache() argument [all …]
|
D | vfs_addr.c | 38 static int v9fs_fid_readpage(void *data, struct page *page) in v9fs_fid_readpage() argument 41 struct inode *inode = page->mapping->host; in v9fs_fid_readpage() 42 struct bio_vec bvec = {.bv_page = page, .bv_len = PAGE_SIZE}; in v9fs_fid_readpage() 48 BUG_ON(!PageLocked(page)); in v9fs_fid_readpage() 50 retval = v9fs_readpage_from_fscache(inode, page); in v9fs_fid_readpage() 56 retval = p9_client_read(fid, page_offset(page), &to, &err); in v9fs_fid_readpage() 58 v9fs_uncache_page(inode, page); in v9fs_fid_readpage() 63 zero_user(page, retval, PAGE_SIZE - retval); in v9fs_fid_readpage() 64 flush_dcache_page(page); in v9fs_fid_readpage() 65 SetPageUptodate(page); in v9fs_fid_readpage() [all …]
|
/kernel/linux/linux-5.10/fs/jfs/ |
D | jfs_metapage.c | 48 unlock_page(mp->page); in __lock_metapage() 50 lock_page(mp->page); in __lock_metapage() 79 #define mp_anchor(page) ((struct meta_anchor *)page_private(page)) argument 81 static inline struct metapage *page_to_mp(struct page *page, int offset) in page_to_mp() argument 83 if (!PagePrivate(page)) in page_to_mp() 85 return mp_anchor(page)->mp[offset >> L2PSIZE]; in page_to_mp() 88 static inline int insert_metapage(struct page *page, struct metapage *mp) in insert_metapage() argument 94 if (PagePrivate(page)) in insert_metapage() 95 a = mp_anchor(page); in insert_metapage() 100 set_page_private(page, (unsigned long)a); in insert_metapage() [all …]
|
/kernel/linux/linux-5.10/fs/sysv/ |
D | dir.c | 31 static inline void dir_put_page(struct page *page) in dir_put_page() argument 33 kunmap(page); in dir_put_page() 34 put_page(page); in dir_put_page() 37 static int dir_commit_chunk(struct page *page, loff_t pos, unsigned len) in dir_commit_chunk() argument 39 struct address_space *mapping = page->mapping; in dir_commit_chunk() 43 block_write_end(NULL, mapping, pos, len, len, page, NULL); in dir_commit_chunk() 49 err = write_one_page(page); in dir_commit_chunk() 51 unlock_page(page); in dir_commit_chunk() 55 static struct page * dir_get_page(struct inode *dir, unsigned long n) in dir_get_page() 58 struct page *page = read_mapping_page(mapping, n, NULL); in dir_get_page() local [all …]
|
/kernel/linux/linux-5.10/net/core/ |
D | page_pool.c | 101 static void page_pool_return_page(struct page_pool *pool, struct page *page); 104 static struct page *page_pool_refill_alloc_cache(struct page_pool *pool) in page_pool_refill_alloc_cache() 107 struct page *page; in page_pool_refill_alloc_cache() local 129 page = __ptr_ring_consume(r); in page_pool_refill_alloc_cache() 130 if (unlikely(!page)) in page_pool_refill_alloc_cache() 133 if (likely(page_to_nid(page) == pref_nid)) { in page_pool_refill_alloc_cache() 134 pool->alloc.cache[pool->alloc.count++] = page; in page_pool_refill_alloc_cache() 141 page_pool_return_page(pool, page); in page_pool_refill_alloc_cache() 142 page = NULL; in page_pool_refill_alloc_cache() 149 page = pool->alloc.cache[--pool->alloc.count]; in page_pool_refill_alloc_cache() [all …]
|
/kernel/linux/linux-5.10/arch/s390/mm/ |
D | page-states.c | 60 static inline unsigned char get_page_state(struct page *page) in get_page_state() argument 66 : "a" (page_to_phys(page)), in get_page_state() 71 static inline void set_page_unused(struct page *page, int order) in set_page_unused() argument 78 : "a" (page_to_phys(page + i)), in set_page_unused() 82 static inline void set_page_stable_dat(struct page *page, int order) in set_page_stable_dat() argument 89 : "a" (page_to_phys(page + i)), in set_page_stable_dat() 93 static inline void set_page_stable_nodat(struct page *page, int order) in set_page_stable_nodat() argument 100 : "a" (page_to_phys(page + i)), in set_page_stable_nodat() 107 struct page *page; in mark_kernel_pmd() local 115 page = virt_to_page(pmd_val(*pmd)); in mark_kernel_pmd() [all …]
|