Home
last modified time | relevance | path

Searched refs:xa_state (Results 1 – 11 of 11) sorted by relevance

/linux-6.15/Documentation/translations/zh_CN/core-api/
H A Dxarray.rst256 高级API是基于xa_state的。这是一个不透明的数据结构,你使用XA_STATE()宏在堆栈中声明。这个宏初始化了
257 xa_state,准备开始在XArray上移动。它被用作一个游标来保持在XArray中的位置,并让你把各种操作组合在一
262 会检查xa_state是否处于错误状态,所以你没有必要在每次调用之后检查错误;你可以连续进行多次调用,只在
267 存在xa_state中供下一次尝试。这个想法是,你拿着xa_lock,尝试操作,然后放弃锁。该操作试图在持有锁的情
287 - 一个XArray节点。 在使用多索引xa_state时可能是可见的。
309 xa_state中设置ENOMEM。
315 xas_load()会尽可能地将xa_state移动到该条目附近。如果你知道xa_state已经移动到了该条目,并且需要检查
323 一个条目,那么它将找到当前引用的条目之后的下一个条目。如果没有,它将返回xa_state索引处的条目。使用
327 xas_find_marked()函数也是如此。如果xa_state没有被移动过,它将返回xa_state的索引处的条目,如果它
332 xas_pause()函数的存在就是为了这个目的。在你完成了必要的工作并希望恢复后,xa_state处于适当的状态,在
[all …]
/linux-6.15/include/linux/
H A Dxarray.h1348 struct xa_state { struct
1405 struct xa_state name = __XA_STATE(array, \
1536 void *xas_load(struct xa_state *);
1539 void *xas_find_conflict(struct xa_state *);
1547 bool xas_nomem(struct xa_state *, gfp_t);
1548 void xas_destroy(struct xa_state *);
1549 void xas_pause(struct xa_state *);
1551 void xas_create_range(struct xa_state *);
1555 int xas_get_order(struct xa_state *xas);
1848 void *__xas_next(struct xa_state *);
[all …]
/linux-6.15/lib/
H A Dxarray.c169 static void *set_bounds(struct xa_state *xas) in set_bounds()
182 static void *xas_start(struct xa_state *xas) in xas_start()
237 void *xas_load(struct xa_state *xas) in xas_load()
270 void xas_destroy(struct xa_state *xas) in xas_destroy()
445 static void xas_shrink(struct xa_state *xas) in xas_shrink()
712 void xas_create_range(struct xa_state *xas) in xas_create_range()
1275 void xas_pause(struct xa_state *xas) in xas_pause()
1306 void *__xas_prev(struct xa_state *xas) in __xas_prev()
1345 void *__xas_next(struct xa_state *xas) in __xas_next()
1913 int xas_get_order(struct xa_state *xas) in xas_get_order()
[all …]
/linux-6.15/arch/arm64/kernel/
H A Dhibernate.c243 XA_STATE(xa_state, &mte_pages, 0); in swsusp_mte_free_storage()
247 xas_for_each(&xa_state, tags, ULONG_MAX) { in swsusp_mte_free_storage()
299 XA_STATE(xa_state, &mte_pages, 0); in swsusp_mte_restore_tags()
304 xas_for_each(&xa_state, tags, ULONG_MAX) { in swsusp_mte_restore_tags()
305 unsigned long pfn = xa_state.xa_index; in swsusp_mte_restore_tags()
/linux-6.15/arch/arm64/mm/
H A Dmteswap.c84 XA_STATE(xa_state, &mte_pages, entry.val); in mte_invalidate_tags_area()
87 xas_for_each(&xa_state, tags, last_entry.val - 1) { in mte_invalidate_tags_area()
88 __xa_erase(&mte_pages, xa_state.xa_index); in mte_invalidate_tags_area()
/linux-6.15/Documentation/core-api/
H A Dxarray.rst321 This macro initialises the xa_state ready to start walking around the
330 The xa_state is also used to store errors. You can call
339 If the xa_state is holding an ``ENOMEM`` error, calling xas_nomem()
406 The xas_load() will walk the xa_state as close to the entry
407 as it can. If you know the xa_state has already been walked to the
423 entry at the index of the xa_state. Using xas_next_entry() to
428 The xas_find_marked() function is similar. If the xa_state has
431 the entry referenced by the xa_state. The xas_next_marked()
468 Calling xas_load() with a multi-index xa_state will walk the
477 in the xa_state will not be changed. When iterating over an XArray
[all …]
/linux-6.15/fs/
H A Ddax.c148 static wait_queue_head_t *dax_entry_waitqueue(struct xa_state *xas, in dax_entry_waitqueue()
186 static void dax_wake_entry(struct xa_state *xas, void *entry, in dax_wake_entry()
214 static void *get_next_unlocked_entry(struct xa_state *xas, unsigned int order) in get_next_unlocked_entry()
248 static void *wait_entry_unlocked_exclusive(struct xa_state *xas, void *entry) in wait_entry_unlocked_exclusive()
279 static void wait_entry_unlocked(struct xa_state *xas, void *entry) in wait_entry_unlocked()
300 static void put_unlocked_entry(struct xa_state *xas, void *entry, in put_unlocked_entry()
312 static void dax_unlock_entry(struct xa_state *xas, void *entry) in dax_unlock_entry()
328 static void *dax_lock_entry(struct xa_state *xas, void *entry) in dax_lock_entry()
657 static void *grab_mapping_entry(struct xa_state *xas, in grab_mapping_entry()
1055 static void *dax_insert_entry(struct xa_state *xas, struct vm_fault *vmf, in dax_insert_entry()
[all …]
/linux-6.15/fs/cachefiles/
H A Dondemand.c377 static struct cachefiles_req *cachefiles_ondemand_select_req(struct xa_state *xas, in cachefiles_ondemand_select_req()
402 struct xa_state *xas, int err) in cachefiles_ondemand_finish_req()
/linux-6.15/mm/
H A Dmemfd.c38 static void memfd_tag_pins(struct xa_state *xas) in memfd_tag_pins()
H A Dfilemap.c2018 static inline struct folio *find_get_entry(struct xa_state *xas, pgoff_t max, in find_get_entry()
3043 static inline loff_t folio_seek_hole_data(struct xa_state *xas, in folio_seek_hole_data()
3076 static inline size_t seek_folio_size(struct xa_state *xas, struct folio *folio) in seek_folio_size()
3550 static struct folio *next_uptodate_folio(struct xa_state *xas, in next_uptodate_folio()
H A Dhuge_memory.c3465 struct xa_state *xas, struct address_space *mapping, in __split_unmapped_folio()