Home
last modified time | relevance | path

Searched refs:xas (Results 1 – 10 of 10) sorted by relevance

/mm/
Dmemfd.c31 static void memfd_tag_pins(struct xa_state *xas) in memfd_tag_pins() argument
38 xas_lock_irq(xas); in memfd_tag_pins()
39 xas_for_each(xas, page, ULONG_MAX) { in memfd_tag_pins()
42 page = find_subpage(page, xas->xa_index); in memfd_tag_pins()
44 xas_set_mark(xas, MEMFD_TAG_PINNED); in memfd_tag_pins()
49 xas_pause(xas); in memfd_tag_pins()
50 xas_unlock_irq(xas); in memfd_tag_pins()
52 xas_lock_irq(xas); in memfd_tag_pins()
54 xas_unlock_irq(xas); in memfd_tag_pins()
68 XA_STATE(xas, &mapping->i_pages, 0); in memfd_wait_for_pins()
[all …]
Dfilemap.c122 XA_STATE(xas, &mapping->i_pages, page->index); in page_cache_delete()
125 mapping_set_update(&xas, mapping); in page_cache_delete()
129 xas_set_order(&xas, page->index, compound_order(page)); in page_cache_delete()
137 xas_store(&xas, shadow); in page_cache_delete()
138 xas_init_marks(&xas); in page_cache_delete()
297 XA_STATE(xas, &mapping->i_pages, pvec->pages[0]->index); in page_cache_delete_batch()
302 mapping_set_update(&xas, mapping); in page_cache_delete_batch()
303 xas_for_each(&xas, page, ULONG_MAX) { in page_cache_delete_batch()
325 if (page->index == xas.xa_index) in page_cache_delete_batch()
334 if (page->index + compound_nr(page) - 1 == xas.xa_index) in page_cache_delete_batch()
[all …]
Dkhugepaged.c1502 XA_STATE_ORDER(xas, &mapping->i_pages, start, HPAGE_PMD_ORDER); in collapse_file()
1525 xas_lock_irq(&xas); in collapse_file()
1526 xas_create_range(&xas); in collapse_file()
1527 if (!xas_error(&xas)) in collapse_file()
1529 xas_unlock_irq(&xas); in collapse_file()
1530 if (!xas_nomem(&xas, GFP_KERNEL)) { in collapse_file()
1549 xas_set(&xas, start); in collapse_file()
1551 struct page *page = xas_next(&xas); in collapse_file()
1553 VM_BUG_ON(index != xas.xa_index); in collapse_file()
1562 if (!xas_next_entry(&xas, end - 1)) { in collapse_file()
[all …]
Dswap_state.c118 XA_STATE_ORDER(xas, &address_space->i_pages, idx, compound_order(page)); in add_to_swap_cache()
129 xas_lock_irq(&xas); in add_to_swap_cache()
130 xas_create_range(&xas); in add_to_swap_cache()
131 if (xas_error(&xas)) in add_to_swap_cache()
134 VM_BUG_ON_PAGE(xas.xa_index != idx + i, page); in add_to_swap_cache()
136 xas_store(&xas, page); in add_to_swap_cache()
137 xas_next(&xas); in add_to_swap_cache()
143 xas_unlock_irq(&xas); in add_to_swap_cache()
144 } while (xas_nomem(&xas, gfp)); in add_to_swap_cache()
146 if (!xas_error(&xas)) in add_to_swap_cache()
[all …]
Dworkingset.c455 XA_STATE(xas, node->array, 0); in shadow_lru_isolate()
495 xas.xa_node = xa_parent_locked(&mapping->i_pages, node); in shadow_lru_isolate()
496 xas.xa_offset = node->offset; in shadow_lru_isolate()
497 xas.xa_shift = node->shift + XA_CHUNK_SHIFT; in shadow_lru_isolate()
498 xas_set_update(&xas, workingset_update_node); in shadow_lru_isolate()
503 xas_store(&xas, NULL); in shadow_lru_isolate()
Dpage-writeback.c2108 XA_STATE(xas, &mapping->i_pages, start); in tag_pages_for_writeback()
2112 xas_lock_irq(&xas); in tag_pages_for_writeback()
2113 xas_for_each_marked(&xas, page, end, PAGECACHE_TAG_DIRTY) { in tag_pages_for_writeback()
2114 xas_set_mark(&xas, PAGECACHE_TAG_TOWRITE); in tag_pages_for_writeback()
2118 xas_pause(&xas); in tag_pages_for_writeback()
2119 xas_unlock_irq(&xas); in tag_pages_for_writeback()
2121 xas_lock_irq(&xas); in tag_pages_for_writeback()
2123 xas_unlock_irq(&xas); in tag_pages_for_writeback()
2771 XA_STATE(xas, &mapping->i_pages, page_index(page)); in __test_set_page_writeback()
2776 xas_lock_irqsave(&xas, flags); in __test_set_page_writeback()
[all …]
Dmigrate.c400 XA_STATE(xas, &mapping->i_pages, page_index(page)); in migrate_page_move_mapping()
422 xas_lock_irq(&xas); in migrate_page_move_mapping()
423 if (page_count(page) != expected_count || xas_load(&xas) != page) { in migrate_page_move_mapping()
424 xas_unlock_irq(&xas); in migrate_page_move_mapping()
429 xas_unlock_irq(&xas); in migrate_page_move_mapping()
457 xas_store(&xas, newpage); in migrate_page_move_mapping()
462 xas_next(&xas); in migrate_page_move_mapping()
463 xas_store(&xas, newpage); in migrate_page_move_mapping()
474 xas_unlock(&xas); in migrate_page_move_mapping()
514 XA_STATE(xas, &mapping->i_pages, page_index(page)); in migrate_huge_page_move_mapping()
[all …]
Dshmem.c356 XA_STATE(xas, &mapping->i_pages, index); in shmem_replace_entry()
361 item = xas_load(&xas); in shmem_replace_entry()
364 xas_store(&xas, replacement); in shmem_replace_entry()
610 XA_STATE_ORDER(xas, &mapping->i_pages, index, compound_order(page)); in shmem_add_to_page_cache()
626 xas_lock_irq(&xas); in shmem_add_to_page_cache()
627 entry = xas_find_conflict(&xas); in shmem_add_to_page_cache()
629 xas_set_err(&xas, -EEXIST); in shmem_add_to_page_cache()
630 xas_create_range(&xas); in shmem_add_to_page_cache()
631 if (xas_error(&xas)) in shmem_add_to_page_cache()
634 xas_store(&xas, page); in shmem_add_to_page_cache()
[all …]
Dtruncate.c37 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()
Dhuge_memory.c2782 XA_STATE(xas, &mapping->i_pages, page_index(head)); in split_huge_page_to_list()
2789 if (xas_load(&xas) != head) in split_huge_page_to_list()