/mm/ |
D | memfd.c | 31 static void memfd_tag_pins(struct xa_state *xas) in memfd_tag_pins() argument 39 xas_lock_irq(xas); in memfd_tag_pins() 40 xas_for_each(xas, page, ULONG_MAX) { in memfd_tag_pins() 48 xas_set_mark(xas, MEMFD_TAG_PINNED); in memfd_tag_pins() 50 xas_set(xas, page->index + cache_count); in memfd_tag_pins() 57 xas_pause(xas); in memfd_tag_pins() 58 xas_unlock_irq(xas); in memfd_tag_pins() 60 xas_lock_irq(xas); in memfd_tag_pins() 62 xas_unlock_irq(xas); in memfd_tag_pins() 76 XA_STATE(xas, &mapping->i_pages, 0); in memfd_wait_for_pins() [all …]
|
D | filemap.c | 128 XA_STATE(xas, &mapping->i_pages, page->index); in page_cache_delete() 131 mapping_set_update(&xas, mapping); in page_cache_delete() 135 xas_set_order(&xas, page->index, compound_order(page)); in page_cache_delete() 143 xas_store(&xas, shadow); in page_cache_delete() 144 xas_init_marks(&xas); in page_cache_delete() 303 XA_STATE(xas, &mapping->i_pages, pvec->pages[0]->index); in page_cache_delete_batch() 308 mapping_set_update(&xas, mapping); in page_cache_delete_batch() 309 xas_for_each(&xas, page, ULONG_MAX) { in page_cache_delete_batch() 331 if (page->index == xas.xa_index) in page_cache_delete_batch() 340 if (page->index + compound_nr(page) - 1 == xas.xa_index) in page_cache_delete_batch() [all …]
|
D | khugepaged.c | 1695 XA_STATE_ORDER(xas, &mapping->i_pages, start, HPAGE_PMD_ORDER); in collapse_file() 1719 xas_lock_irq(&xas); in collapse_file() 1720 xas_create_range(&xas); in collapse_file() 1721 if (!xas_error(&xas)) in collapse_file() 1723 xas_unlock_irq(&xas); in collapse_file() 1724 if (!xas_nomem(&xas, GFP_KERNEL)) { in collapse_file() 1742 xas_set(&xas, start); in collapse_file() 1744 struct page *page = xas_next(&xas); in collapse_file() 1746 VM_BUG_ON(index != xas.xa_index); in collapse_file() 1755 if (!xas_next_entry(&xas, end - 1)) { in collapse_file() [all …]
|
D | swap_state.c | 134 XA_STATE_ORDER(xas, &address_space->i_pages, idx, compound_order(page)); in add_to_swap_cache() 148 xas_lock_irq(&xas); in add_to_swap_cache() 149 xas_create_range(&xas); in add_to_swap_cache() 150 if (xas_error(&xas)) in add_to_swap_cache() 153 VM_BUG_ON_PAGE(xas.xa_index != idx + i, page); in add_to_swap_cache() 154 old = xas_load(&xas); in add_to_swap_cache() 161 xas_store(&xas, page); in add_to_swap_cache() 162 xas_next(&xas); in add_to_swap_cache() 169 xas_unlock_irq(&xas); in add_to_swap_cache() 170 } while (xas_nomem(&xas, gfp)); in add_to_swap_cache() [all …]
|
D | page-writeback.c | 2124 XA_STATE(xas, &mapping->i_pages, start); in tag_pages_for_writeback() 2128 xas_lock_irq(&xas); in tag_pages_for_writeback() 2129 xas_for_each_marked(&xas, page, end, PAGECACHE_TAG_DIRTY) { in tag_pages_for_writeback() 2130 xas_set_mark(&xas, PAGECACHE_TAG_TOWRITE); in tag_pages_for_writeback() 2134 xas_pause(&xas); in tag_pages_for_writeback() 2135 xas_unlock_irq(&xas); in tag_pages_for_writeback() 2137 xas_lock_irq(&xas); in tag_pages_for_writeback() 2139 xas_unlock_irq(&xas); in tag_pages_for_writeback() 2779 XA_STATE(xas, &mapping->i_pages, page_index(page)); in __test_set_page_writeback() 2784 xas_lock_irqsave(&xas, flags); in __test_set_page_writeback() [all …]
|
D | shmem.c | 424 XA_STATE(xas, &mapping->i_pages, index); in shmem_replace_entry() 429 item = xas_load(&xas); in shmem_replace_entry() 432 xas_store(&xas, replacement); in shmem_replace_entry() 684 XA_STATE_ORDER(xas, &mapping->i_pages, index, compound_order(page)); in shmem_add_to_page_cache() 713 xas_lock_irq(&xas); in shmem_add_to_page_cache() 714 entry = xas_find_conflict(&xas); in shmem_add_to_page_cache() 716 xas_set_err(&xas, -EEXIST); in shmem_add_to_page_cache() 717 xas_create_range(&xas); in shmem_add_to_page_cache() 718 if (xas_error(&xas)) in shmem_add_to_page_cache() 721 xas_store(&xas, page); in shmem_add_to_page_cache() [all …]
|
D | migrate.c | 385 XA_STATE(xas, &mapping->i_pages, page_index(page)); in migrate_page_move_mapping() 408 xas_lock_irq(&xas); in migrate_page_move_mapping() 409 if (page_count(page) != expected_count || xas_load(&xas) != page) { in migrate_page_move_mapping() 410 xas_unlock_irq(&xas); in migrate_page_move_mapping() 415 xas_unlock_irq(&xas); in migrate_page_move_mapping() 443 xas_store(&xas, newpage); in migrate_page_move_mapping() 448 xas_next(&xas); in migrate_page_move_mapping() 449 xas_store(&xas, newpage); in migrate_page_move_mapping() 460 xas_unlock(&xas); in migrate_page_move_mapping() 507 XA_STATE(xas, &mapping->i_pages, page_index(page)); in migrate_huge_page_move_mapping() [all …]
|
D | truncate.c | 37 XA_STATE(xas, &mapping->i_pages, index); in __clear_shadow_entry() 39 xas_set_update(&xas, workingset_update_node); in __clear_shadow_entry() 40 if (xas_load(&xas) != entry) in __clear_shadow_entry() 42 xas_store(&xas, NULL); in __clear_shadow_entry()
|
D | madvise.c | 232 XA_STATE(xas, &mapping->i_pages, linear_page_index(vma, start)); in force_shm_swapin_readahead() 237 xas_for_each(&xas, page, end_index) { in force_shm_swapin_readahead() 242 xas_pause(&xas); in force_shm_swapin_readahead()
|
D | huge_memory.c | 2734 XA_STATE(xas, &mapping->i_pages, page_index(head)); in split_huge_page_to_list() 2741 if (xas_load(&xas) != head) in split_huge_page_to_list()
|