/Linux-v4.19/include/linux/ |
D | page-flags.h | 138 struct page; /* forward declaration */ 140 static inline struct page *compound_head(struct page *page) in compound_head() argument 142 unsigned long head = READ_ONCE(page->compound_head); in compound_head() 145 return (struct page *) (head - 1); in compound_head() 146 return page; in compound_head() 149 static __always_inline int PageTail(struct page *page) in PageTail() argument 151 return READ_ONCE(page->compound_head) & 1; in PageTail() 154 static __always_inline int PageCompound(struct page *page) in PageCompound() argument 156 return test_bit(PG_head, &page->flags) || PageTail(page); in PageCompound() 160 static inline int PagePoisoned(const struct page *page) in PagePoisoned() argument [all …]
|
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 | balloon_compaction.h | 66 int (*migratepage)(struct balloon_dev_info *, struct page *newpage, 67 struct page *page, enum migrate_mode mode); 71 extern struct page *balloon_page_alloc(void); 73 struct page *page); 74 extern struct page *balloon_page_dequeue(struct balloon_dev_info *b_dev_info); 87 extern bool balloon_page_isolate(struct page *page, 89 extern void balloon_page_putback(struct page *page); 91 struct page *newpage, 92 struct page *page, enum migrate_mode mode); 104 struct page *page) in balloon_page_insert() argument [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 | pagemap.h | 121 void release_pages(struct page **pages, int nr); 167 static inline int page_cache_get_speculative(struct page *page) in page_cache_get_speculative() argument 182 VM_BUG_ON_PAGE(page_count(page) == 0, page); in page_cache_get_speculative() 183 page_ref_inc(page); in page_cache_get_speculative() 186 if (unlikely(!get_page_unless_zero(page))) { in page_cache_get_speculative() 195 VM_BUG_ON_PAGE(PageTail(page), page); in page_cache_get_speculative() 203 static inline int page_cache_add_speculative(struct page *page, int count) in page_cache_add_speculative() argument 211 VM_BUG_ON_PAGE(page_count(page) == 0, page); in page_cache_add_speculative() 212 page_ref_add(page, count); in page_cache_add_speculative() 215 if (unlikely(!page_ref_add_unless(page, count, 0))) in page_cache_add_speculative() [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); 34 static inline struct page *new_page_nodemask(struct page *page, in new_page_nodemask() argument 39 struct page *new_page = NULL; in new_page_nodemask() 41 if (PageHuge(page)) in new_page_nodemask() 42 return alloc_huge_page_nodemask(page_hstate(compound_head(page)), in new_page_nodemask() 45 if (PageTransHuge(page)) { in new_page_nodemask() 50 if (PageHighMem(page) || (zone_idx(page_zone(page)) == ZONE_MOVABLE)) in new_page_nodemask() 66 struct page *newpage, struct page *page, 70 extern int isolate_movable_page(struct page *page, isolate_mode_t mode); [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 order); 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 | 105 #define mm_zero_struct_page(pp) ((void)memset((pp), 0, sizeof(struct page))) 141 #define nth_page(page,n) pfn_to_page(page_to_pfn((page)) + (n)) argument 356 struct page *cow_page; /* Page handler may use for COW fault */ 358 struct page *page; /* ->fault handlers should return a member 451 struct page *(*find_special_page)(struct vm_area_struct *vma, 476 #define page_private(page) ((page)->private) argument 477 #define set_page_private(page, v) ((page)->private = (v)) argument 517 static inline int put_page_testzero(struct page *page) in put_page_testzero() argument 519 VM_BUG_ON_PAGE(page_ref_count(page) == 0, page); in put_page_testzero() 520 return page_ref_dec_and_test(page); in put_page_testzero() [all …]
|
D | swap.h | 298 void *workingset_eviction(struct address_space *mapping, struct page *page); 300 void workingset_activation(struct page *page); 325 extern void lru_cache_add(struct page *); 326 extern void lru_cache_add_anon(struct page *page); 327 extern void lru_cache_add_file(struct page *page); 328 extern void lru_add_page_tail(struct page *page, struct page *page_tail, 330 extern void activate_page(struct page *); 331 extern void mark_page_accessed(struct page *); 335 extern void rotate_reclaimable_page(struct page *page); 336 extern void deactivate_file_page(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 43 struct page *kmap_to_page(void *addr); 49 static inline struct page *kmap_to_page(void *addr) in kmap_to_page() 57 static inline void *kmap(struct page *page) in kmap() argument 60 return page_address(page); in kmap() 63 static inline void kunmap(struct page *page) in kunmap() argument 67 static inline void *kmap_atomic(struct page *page) in kmap_atomic() argument 71 return page_address(page); in kmap_atomic() 73 #define kmap_atomic_prot(page, prot) kmap_atomic(page) argument [all …]
|
/Linux-v4.19/mm/ |
D | swap.c | 59 static void __page_cache_release(struct page *page) in __page_cache_release() argument 61 if (PageLRU(page)) { in __page_cache_release() 62 struct zone *zone = page_zone(page); in __page_cache_release() 67 lruvec = mem_cgroup_page_lruvec(page, zone->zone_pgdat); in __page_cache_release() 68 VM_BUG_ON_PAGE(!PageLRU(page), page); in __page_cache_release() 69 __ClearPageLRU(page); in __page_cache_release() 70 del_page_from_lru_list(page, lruvec, page_off_lru(page)); in __page_cache_release() 73 __ClearPageWaiters(page); in __page_cache_release() 74 mem_cgroup_uncharge(page); in __page_cache_release() 77 static void __put_single_page(struct page *page) in __put_single_page() argument [all …]
|
D | filemap.c | 115 struct page *page, void **shadowp) in page_cache_tree_insert() argument 121 error = __radix_tree_create(&mapping->i_pages, page->index, 0, in page_cache_tree_insert() 137 __radix_tree_replace(&mapping->i_pages, node, slot, page, in page_cache_tree_insert() 144 struct page *page, void *shadow) in page_cache_tree_delete() argument 149 nr = PageHuge(page) ? 1 : hpage_nr_pages(page); in page_cache_tree_delete() 151 VM_BUG_ON_PAGE(!PageLocked(page), page); in page_cache_tree_delete() 152 VM_BUG_ON_PAGE(PageTail(page), page); in page_cache_tree_delete() 153 VM_BUG_ON_PAGE(nr != 1 && shadow, page); in page_cache_tree_delete() 159 __radix_tree_lookup(&mapping->i_pages, page->index + i, in page_cache_tree_delete() 162 VM_BUG_ON_PAGE(!node && nr != 1, page); in page_cache_tree_delete() [all …]
|
D | migrate.c | 84 int isolate_movable_page(struct page *page, isolate_mode_t mode) in isolate_movable_page() argument 97 if (unlikely(!get_page_unless_zero(page))) in isolate_movable_page() 105 if (unlikely(!__PageMovable(page))) in isolate_movable_page() 118 if (unlikely(!trylock_page(page))) in isolate_movable_page() 121 if (!PageMovable(page) || PageIsolated(page)) in isolate_movable_page() 124 mapping = page_mapping(page); in isolate_movable_page() 125 VM_BUG_ON_PAGE(!mapping, page); in isolate_movable_page() 127 if (!mapping->a_ops->isolate_page(page, mode)) in isolate_movable_page() 131 WARN_ON_ONCE(PageIsolated(page)); in isolate_movable_page() 132 __SetPageIsolated(page); in isolate_movable_page() [all …]
|
D | rmap.c | 464 struct anon_vma *page_get_anon_vma(struct page *page) in page_get_anon_vma() argument 470 anon_mapping = (unsigned long)READ_ONCE(page->mapping); in page_get_anon_vma() 473 if (!page_mapped(page)) in page_get_anon_vma() 489 if (!page_mapped(page)) { in page_get_anon_vma() 507 struct anon_vma *page_lock_anon_vma_read(struct page *page) in page_lock_anon_vma_read() argument 514 anon_mapping = (unsigned long)READ_ONCE(page->mapping); in page_lock_anon_vma_read() 517 if (!page_mapped(page)) in page_lock_anon_vma_read() 528 if (!page_mapped(page)) { in page_lock_anon_vma_read() 541 if (!page_mapped(page)) { in page_lock_anon_vma_read() 687 unsigned long page_address_in_vma(struct page *page, struct vm_area_struct *vma) in page_address_in_vma() argument [all …]
|
D | page_isolation.c | 18 static int set_migratetype_isolate(struct page *page, int migratetype, in set_migratetype_isolate() argument 27 zone = page_zone(page); in set_migratetype_isolate() 36 if (is_migrate_isolate_page(page)) in set_migratetype_isolate() 39 pfn = page_to_pfn(page); in set_migratetype_isolate() 63 if (!has_unmovable_pages(zone, page, arg.pages_found, migratetype, in set_migratetype_isolate() 75 int mt = get_pageblock_migratetype(page); in set_migratetype_isolate() 77 set_pageblock_migratetype(page, MIGRATE_ISOLATE); in set_migratetype_isolate() 79 nr_pages = move_freepages_block(zone, page, MIGRATE_ISOLATE, in set_migratetype_isolate() 91 static void unset_migratetype_isolate(struct page *page, unsigned migratetype) in unset_migratetype_isolate() argument 98 struct page *buddy; in unset_migratetype_isolate() [all …]
|
D | page_io.c | 30 struct page *page, bio_end_io_t end_io) in get_swap_bio() argument 32 int i, nr = hpage_nr_pages(page); in get_swap_bio() 39 bio->bi_iter.bi_sector = map_swap_page(page, &bdev); in get_swap_bio() 45 bio_add_page(bio, page + i, PAGE_SIZE, 0); in get_swap_bio() 53 struct page *page = bio_first_page_all(bio); in end_swap_bio_write() local 56 SetPageError(page); in end_swap_bio_write() 65 set_page_dirty(page); in end_swap_bio_write() 69 ClearPageReclaim(page); in end_swap_bio_write() 71 end_page_writeback(page); in end_swap_bio_write() 75 static void swap_slot_free_notify(struct page *page) in swap_slot_free_notify() argument [all …]
|
D | truncate.c | 85 struct page *page = pvec->pages[i]; in truncate_exceptional_pvec_entries() local 88 if (!radix_tree_exceptional_entry(page)) { in truncate_exceptional_pvec_entries() 89 pvec->pages[j++] = page; in truncate_exceptional_pvec_entries() 101 __clear_shadow_entry(mapping, index, page); in truncate_exceptional_pvec_entries() 154 void do_invalidatepage(struct page *page, unsigned int offset, in do_invalidatepage() argument 157 void (*invalidatepage)(struct page *, unsigned int, unsigned int); in do_invalidatepage() 159 invalidatepage = page->mapping->a_ops->invalidatepage; in do_invalidatepage() 165 (*invalidatepage)(page, offset, length); in do_invalidatepage() 179 truncate_cleanup_page(struct address_space *mapping, struct page *page) in truncate_cleanup_page() argument 181 if (page_mapped(page)) { in truncate_cleanup_page() [all …]
|
D | balloon_compaction.c | 22 struct page *balloon_page_alloc(void) in balloon_page_alloc() 24 struct page *page = alloc_page(balloon_mapping_gfp_mask() | in balloon_page_alloc() local 26 return page; in balloon_page_alloc() 42 struct page *page) in balloon_page_enqueue() argument 51 BUG_ON(!trylock_page(page)); in balloon_page_enqueue() 53 balloon_page_insert(b_dev_info, page); in balloon_page_enqueue() 56 unlock_page(page); in balloon_page_enqueue() 71 struct page *balloon_page_dequeue(struct balloon_dev_info *b_dev_info) in balloon_page_dequeue() 73 struct page *page, *tmp; in balloon_page_dequeue() local 79 list_for_each_entry_safe(page, tmp, &b_dev_info->pages, lru) { in balloon_page_dequeue() [all …]
|
/Linux-v4.19/fs/9p/ |
D | cache.h | 45 extern int __v9fs_fscache_release_page(struct page *page, gfp_t gfp); 46 extern void __v9fs_fscache_invalidate_page(struct page *page); 48 struct page *page); 53 extern void __v9fs_readpage_to_fscache(struct inode *inode, struct page *page); 55 struct page *page); 57 static inline int v9fs_fscache_release_page(struct page *page, in v9fs_fscache_release_page() argument 60 return __v9fs_fscache_release_page(page, gfp); in v9fs_fscache_release_page() 63 static inline void v9fs_fscache_invalidate_page(struct page *page) in v9fs_fscache_invalidate_page() argument 65 __v9fs_fscache_invalidate_page(page); in v9fs_fscache_invalidate_page() 69 struct page *page) in v9fs_readpage_from_fscache() argument [all …]
|
D | vfs_addr.c | 53 static int v9fs_fid_readpage(struct p9_fid *fid, struct page *page) in v9fs_fid_readpage() argument 55 struct inode *inode = page->mapping->host; in v9fs_fid_readpage() 56 struct bio_vec bvec = {.bv_page = page, .bv_len = PAGE_SIZE}; in v9fs_fid_readpage() 62 BUG_ON(!PageLocked(page)); in v9fs_fid_readpage() 64 retval = v9fs_readpage_from_fscache(inode, page); in v9fs_fid_readpage() 70 retval = p9_client_read(fid, page_offset(page), &to, &err); in v9fs_fid_readpage() 72 v9fs_uncache_page(inode, page); in v9fs_fid_readpage() 77 zero_user(page, retval, PAGE_SIZE - retval); in v9fs_fid_readpage() 78 flush_dcache_page(page); in v9fs_fid_readpage() 79 SetPageUptodate(page); in v9fs_fid_readpage() [all …]
|
/Linux-v4.19/net/core/ |
D | page_pool.c | 69 static struct page *__page_pool_get_cached(struct page_pool *pool) in __page_pool_get_cached() 72 struct page *page; in __page_pool_get_cached() local 82 page = pool->alloc.cache[--pool->alloc.count]; in __page_pool_get_cached() 83 return page; in __page_pool_get_cached() 95 while ((page = __ptr_ring_consume(r))) { in __page_pool_get_cached() 98 pool->alloc.cache[pool->alloc.count++] = page; in __page_pool_get_cached() 101 return page; in __page_pool_get_cached() 105 page = ptr_ring_consume(&pool->ring); in __page_pool_get_cached() 106 return page; in __page_pool_get_cached() 111 static struct page *__page_pool_alloc_pages_slow(struct page_pool *pool, in __page_pool_alloc_pages_slow() [all …]
|
/Linux-v4.19/fs/jfs/ |
D | jfs_metapage.c | 61 unlock_page(mp->page); in __lock_metapage() 63 lock_page(mp->page); in __lock_metapage() 92 #define mp_anchor(page) ((struct meta_anchor *)page_private(page)) argument 94 static inline struct metapage *page_to_mp(struct page *page, int offset) in page_to_mp() argument 96 if (!PagePrivate(page)) in page_to_mp() 98 return mp_anchor(page)->mp[offset >> L2PSIZE]; in page_to_mp() 101 static inline int insert_metapage(struct page *page, struct metapage *mp) in insert_metapage() argument 107 if (PagePrivate(page)) in insert_metapage() 108 a = mp_anchor(page); in insert_metapage() 113 set_page_private(page, (unsigned long)a); in insert_metapage() [all …]
|
/Linux-v4.19/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 …]
|
/Linux-v4.19/arch/s390/mm/ |
D | page-states.c | 66 static inline unsigned char get_page_state(struct page *page) in get_page_state() argument 72 : "a" (page_to_phys(page)), in get_page_state() 77 static inline void set_page_unused(struct page *page, int order) in set_page_unused() argument 84 : "a" (page_to_phys(page + i)), in set_page_unused() 88 static inline void set_page_stable_dat(struct page *page, int order) in set_page_stable_dat() argument 95 : "a" (page_to_phys(page + i)), in set_page_stable_dat() 99 static inline void set_page_stable_nodat(struct page *page, int order) in set_page_stable_nodat() argument 106 : "a" (page_to_phys(page + i)), in set_page_stable_nodat() 113 struct page *page; in mark_kernel_pmd() local 121 page = virt_to_page(pmd_val(*pmd)); in mark_kernel_pmd() [all …]
|
/Linux-v4.19/sound/pci/trident/ |
D | trident_memory.c | 37 #define __set_tlb_bus(trident,page,ptr,addr) \ argument 38 do { (trident)->tlb.entries[page] = cpu_to_le32((addr) & ~(SNDRV_TRIDENT_PAGE_SIZE-1)); \ 39 (trident)->tlb.shadow_entries[page] = (ptr); } while (0) 40 #define __tlb_to_ptr(trident,page) \ argument 41 (void*)((trident)->tlb.shadow_entries[page]) 42 #define __tlb_to_addr(trident,page) \ argument 43 (dma_addr_t)le32_to_cpu((trident->tlb.entries[page]) & ~(SNDRV_TRIDENT_PAGE_SIZE - 1)) 50 #define set_tlb_bus(trident,page,ptr,addr) __set_tlb_bus(trident,page,ptr,addr) argument 52 #define set_silent_tlb(trident,page) __set_tlb_bus(trident, page, (unsigned long)trident->tlb.silen… argument 56 #define aligned_page_offset(page) ((page) << 12) argument [all …]
|