Searched refs:xa_state (Results 1 – 9 of 9) sorted by relevance
| /linux/Documentation/translations/zh_CN/core-api/ |
| H A D | xarray.rst | 256 高级API是基于xa_state的。这是一个不透明的数据结构,你使用XA_STATE()宏在堆栈中声明。这个宏初始化了 257 xa_state,准备开始在XArray上移动。它被用作一个游标来保持在XArray中的位置,并让你把各种操作组合在一 258 起,而不必每次都从头开始。xa_state的内容受rcu_read_lock()或xas_lock()的保护。如果需要删除保护状态 261 xa_state也被用来存储错误(store errors)。你可以调用xas_error()来检索错误。所有的操作在进行之前都 262 会检查xa_state是否处于错误状态,所以你没有必要在每次调用之后检查错误;你可以连续进行多次调用,只在 266 如果xa_state持有 ``ENOMEM`` 错误,调用xas_nomem()将尝试使用指定的gfp标志分配更多的内存,并将其缓 267 存在xa_state中供下一次尝试。这个想法是,你拿着xa_lock,尝试操作,然后放弃锁。该操作试图在持有锁的情 287 - 一个XArray节点。 在使用多索引xa_state时可能是可见的。 309 xa_state中设置ENOMEM。 315 xas_load()会尽可能地将xa_state移动到该条目附近。如果你知道xa_state已经移动到了该条目,并且需要检查 [all …]
|
| /linux/include/linux/ |
| H A D | xarray.h | 1354 struct xa_state { struct 1397 struct xa_state name = __XA_STATE(array, index, 0, 0) 1411 struct xa_state name = __XA_STATE(array, \ 1435 static inline int xas_error(const struct xa_state *xas) in xas_error() 1449 static inline void xas_set_err(struct xa_state *xas, long err) in xas_set_err() 1460 static inline bool xas_invalid(const struct xa_state *xas) in xas_invalid() 1471 static inline bool xas_valid(const struct xa_state *xas) in xas_valid() 1482 static inline bool xas_is_node(const struct xa_state *xas) in xas_is_node() 1515 static inline void xas_reset(struct xa_state *xas) in xas_reset() 1532 static inline bool xas_retry(struct xa_state *xas, const void *entry) in xas_retry() [all …]
|
| /linux/lib/ |
| H A D | xarray.c | 22 * an xa_state, or an xa_state stored on the stack. This is an unfortunate 38 static inline void xas_lock_type(struct xa_state *xas, unsigned int lock_type) in xas_lock_type() 48 static inline void xas_unlock_type(struct xa_state *xas, unsigned int lock_type) in xas_unlock_type() 126 static void xas_squash_marks(const struct xa_state *xas) in xas_squash_marks() 150 static void xas_set_offset(struct xa_state *xas) in xas_set_offset() 156 static void xas_move_index(struct xa_state *xas, unsigned long offset) in xas_move_index() 163 static void xas_next_offset(struct xa_state *xas) in xas_next_offset() 169 static void *set_bounds(struct xa_state *xas) in set_bounds() 182 static void *xas_start(struct xa_state *xa [all...] |
| /linux/arch/arm64/kernel/ |
| H A D | hibernate.c | 257 XA_STATE(xa_state, &mte_pages, 0); in swsusp_mte_free_storage() 261 xas_for_each(&xa_state, tags, ULONG_MAX) { in swsusp_mte_free_storage() 313 XA_STATE(xa_state, &mte_pages, 0); in swsusp_mte_restore_tags() 318 xas_for_each(&xa_state, tags, ULONG_MAX) { in swsusp_mte_restore_tags() 319 unsigned long pfn = xa_state.xa_index; in swsusp_mte_restore_tags()
|
| /linux/Documentation/core-api/ |
| H A D | xarray.rst | 321 The advanced API is based around the xa_state. This is an opaque data 323 This macro initialises the xa_state ready to start walking around the 326 from the top every time. The contents of the xa_state are protected by 332 The xa_state is also used to store errors. You can call 334 the xa_state is in an error state before proceeding, so there's no need 341 If the xa_state is holding an ``ENOMEM`` error, calling xas_nomem() 343 cache it in the xa_state for the next attempt. The idea is that you take 370 - An XArray node. May be visible when using a multi-index xa_state. 398 to store every entry in a range. It will set ENOMEM in the xa_state if 408 The xas_load() will walk the xa_state as close to the entry [all …]
|
| /linux/fs/ |
| H A D | dax.c | 146 static wait_queue_head_t *dax_entry_waitqueue(struct xa_state *xas, in dax_entry_waitqueue() 184 static void dax_wake_entry(struct xa_state *xas, void *entry, in dax_wake_entry() 212 static void *get_next_unlocked_entry(struct xa_state *xas, unsigned int order) in get_next_unlocked_entry() 246 static void *wait_entry_unlocked_exclusive(struct xa_state *xas, void *entry) in wait_entry_unlocked_exclusive() 277 static void wait_entry_unlocked(struct xa_state *xas, void *entry) in wait_entry_unlocked() 298 static void put_unlocked_entry(struct xa_state *xas, void *entry, in put_unlocked_entry() 306 * We used the xa_state to get the entry, but then we locked the entry and 307 * dropped the xa_lock, so we know the xa_state is stale and must be reset 310 static void dax_unlock_entry(struct xa_state *xas, void *entry) in dax_unlock_entry() 326 static void *dax_lock_entry(struct xa_state *xa [all...] |
| /linux/mm/ |
| H A D | filemap.c | 2107 static inline struct folio *find_get_entry(struct xa_state *xas, pgoff_t max, in find_get_entry() 3200 static inline loff_t folio_seek_hole_data(struct xa_state *xas, in seek_folio_size() 3233 static inline size_t seek_folio_size(struct xa_state *xas, struct folio *folio) in mapping_seek_hole_data() 3768 static struct folio *next_uptodate_folio(struct xa_state *xas, in next_uptodate_folio()
|
| H A D | huge_memory.c | 3939 * @xas: xa_state pointing to folio->mapping->i_pages and locked by caller in folio_check_splittable() 3971 struct page *split_at, struct xa_state *xas, in __folio_freeze_and_split_unmapped()
|
| /linux/fs/btrfs/ |
| H A D | extent_io.c | 2317 static inline struct extent_buffer *find_get_eb(struct xa_state *xas, unsigned long max, in eb_batch_next()
|