/linux/Documentation/translations/zh_CN/core-api/ |
H A D | xarray.rst | 162 内部使用xa_lock: 186 假设进入时持有xa_lock: 195 如果你想利用锁来保护你存储在XArray中的数据结构,你可以在调用xa_load()之前调用xa_lock(),然后在 225 xa_lock(&foo->array); 234 上面的例子还显示了一个常见的模式,即希望在存储端扩展xa_lock的覆盖范围,以保护与数组相关的一些统计 238 在进程上下文中使用xa_lock_irq(),在中断处理程序中使用xa_lock()。一些更常见的模式有一些辅助函数, 242 意味着你有权使用像__xa_erase()这样的函数而不占用xa_lock;xa_lock是用来进行lockdep验证的,将来也 252 你需要在修改数组的时候使用xa_lock。在对数组进行只读操作时,你可以选择使用xa_lock或RCU锁。你可以在 267 存在xa_state中供下一次尝试。这个想法是,你拿着xa_lock,尝试操作,然后放弃锁。该操作试图在持有锁的情 295 - 这个条目目前正在被一个拥有xa_lock的线程修改。在这个RCU周期结束时,包含该条目的节点可能会被释放。 [all …]
|
/linux/include/linux/ |
H A D | xarray.h | 301 spinlock_t xa_lock; member 308 .xa_lock = __SPIN_LOCK_UNLOCKED(name.xa_lock), \ 384 spin_lock_init(&xa->xa_lock); in xa_init_flags() 536 #define xa_lock(xa) spin_lock(&(xa)->xa_lock) macro 698 xa_lock(xa); in xa_cmpxchg() 784 xa_lock(xa); in xa_insert() 877 xa_lock(xa); in xa_alloc() 980 xa_lock(xa); in xa_alloc_cyclic() 1205 lockdep_is_held(&xa->xa_lock)); in xa_head() 1212 lockdep_is_held(&xa->xa_lock)); in xa_head_locked() [all …]
|
H A D | idr.h | 101 #define idr_lock(idr) xa_lock(&(idr)->idr_rt)
|
H A D | backing-dev.h | 253 !lockdep_is_held(&inode->i_mapping->i_pages.xa_lock) && in inode_to_wb()
|
/linux/tools/testing/radix-tree/ |
H A D | regression1.c | 128 xa_lock(&mt_tree); in regression1_fn() 133 xa_lock(&mt_tree); in regression1_fn() 137 xa_lock(&mt_tree); in regression1_fn() 145 xa_lock(&mt_tree); in regression1_fn()
|
/linux/drivers/infiniband/core/ |
H A D | ib_core_uverbs.c | 125 xa_lock(&ucontext->mmap_xa); in rdma_user_mmap_entry_get_pgoff() 190 xa_lock(&ucontext->mmap_xa); in rdma_user_mmap_entry_free() 235 xa_lock(&entry->ucontext->mmap_xa); in rdma_user_mmap_entry_remove() 287 xa_lock(&ucontext->mmap_xa); in rdma_user_mmap_entry_insert_range()
|
H A D | restrack.c | 72 xa_lock(&rt->xa); in rdma_restrack_count() 249 xa_lock(&rt->xa); in rdma_restrack_get_byid()
|
H A D | counters.c | 290 xa_lock(&rt->xa); in rdma_get_counter_auto_mode() 402 xa_lock(&rt->xa); in get_running_counters_hwstat_sum() 417 xa_lock(&rt->xa); in get_running_counters_hwstat_sum()
|
H A D | ucma.c | 143 xa_lock(&ctx_table); in ucma_get_ctx() 360 xa_lock(&ctx_table); in ucma_event_handler() 491 xa_lock(&multicast_table); in ucma_cleanup_multicast() 604 xa_lock(&ctx_table); in ucma_destroy_id() 1474 xa_lock(&multicast_table); in ucma_process_join() 1509 xa_lock(&multicast_table); in ucma_process_join() 1573 xa_lock(&multicast_table); in ucma_leave_multicast() 1648 xa_lock(&ctx_table); in ucma_migrate_id()
|
/linux/drivers/gpu/drm/imagination/ |
H A D | pvr_free_list.h | 142 xa_lock(&pvr_file->free_list_handles); in pvr_free_list_lookup() 165 xa_lock(&pvr_dev->free_list_ids); in pvr_free_list_lookup_id()
|
H A D | pvr_context.h | 143 xa_lock(&pvr_file->ctx_handles); in pvr_context_lookup() 167 xa_lock(&pvr_dev->ctx_ids); in pvr_context_lookup_id()
|
H A D | pvr_hwrt.h | 104 xa_lock(&pvr_file->hwrt_handles); in pvr_hwrt_dataset_lookup()
|
/linux/drivers/net/ethernet/intel/ice/ |
H A D | ice_adapter.c | 74 xa_lock(&ice_adapters); in DEFINE_FREE() 104 xa_lock(&ice_adapters); in ice_adapter_put()
|
/linux/drivers/iommu/iommufd/ |
H A D | vfio_compat.c | 19 xa_lock(&ictx->objects); in get_compat_ioas() 59 xa_lock(&ictx->objects); in iommufd_vfio_compat_set_no_iommu() 89 xa_lock(&ictx->objects); in iommufd_vfio_compat_ioas_create() 143 xa_lock(&ucmd->ictx->objects); in iommufd_vfio_ioas() 150 xa_lock(&ucmd->ictx->objects); in iommufd_vfio_ioas()
|
H A D | device.c | 75 xa_lock(&ictx->groups); in iommufd_get_group() 108 xa_lock(&ictx->groups); in iommufd_get_group() 254 xa_lock(&ictx->objects); in iommufd_ctx_has_group() 936 xa_lock(&ioas->iopt.access_list); in iommufd_access_notify_unmap() 945 xa_lock(&ioas->iopt.access_list); in iommufd_access_notify_unmap()
|
H A D | main.c | 115 xa_lock(&ictx->objects); in iommufd_get_object() 173 xa_lock(&ictx->objects); in iommufd_object_remove()
|
/linux/Documentation/core-api/ |
H A D | xarray.rst | 203 Takes xa_lock internally: 227 Assumes xa_lock held on entry: 237 that you are storing in the XArray, you can call xa_lock() 272 xa_lock(&foo->array); 283 coverage of the xa_lock on the store side to protect some statistics 288 context, or xa_lock_irq() in process context and xa_lock() 297 the xa_lock; the xa_lock is used for lockdep validation and will be used 311 to use the xa_lock while modifying the array. You can choose whether 312 to use the xa_lock or the RCU lock while doing read-only operations on 340 the xa_lock, attempt the operation and drop the lock. The operation [all …]
|
/linux/fs/erofs/ |
H A D | zutil.c | 260 xa_lock(&sbi->managed_pslots); in erofs_insert_workgroup() 336 xa_lock(&sbi->managed_pslots); in erofs_shrink_workstation() 346 xa_lock(&sbi->managed_pslots); in erofs_shrink_workstation()
|
/linux/arch/arm64/kernel/ |
H A D | hibernate.c | 246 xa_lock(&mte_pages); in swsusp_mte_free_storage() 297 xa_lock(&mte_pages); in swsusp_mte_restore_tags()
|
/linux/arch/arm64/mm/ |
H A D | mteswap.c | 86 xa_lock(&mte_pages); in mte_invalidate_tags_area()
|
/linux/drivers/infiniband/hw/mlx4/ |
H A D | cm.c | 366 xa_lock(&sriov->xa_rej_tmout); in alloc_rej_tmout() 411 xa_lock(&sriov->xa_rej_tmout); in lookup_rej_tmout_slave() 501 xa_lock(&sriov->xa_rej_tmout); in rej_tmout_xa_cleanup()
|
/linux/drivers/block/ |
H A D | brd.c | 71 xa_lock(&brd->brd_pages); in brd_insert_page() 231 xa_lock(&brd->brd_pages); in brd_do_discard()
|
/linux/fs/cachefiles/ |
H A D | ondemand.c | 17 xa_lock(&cache->reqs); in cachefiles_ondemand_fd_release() 307 xa_lock(&cache->reqs); in cachefiles_ondemand_daemon_read()
|
/linux/lib/ |
H A D | xarray.c | 327 __must_hold(xas->xa->xa_lock) in __xas_nomem() 1531 xa_lock(xa); in xa_erase() 1595 xa_lock(xa); in xa_store() 2005 xa_lock(xa); in xa_set_mark() 2023 xa_lock(xa); in xa_clear_mark()
|
/linux/net/devlink/ |
H A D | region.c | 285 xa_lock(&devlink->snapshot_ids); in __devlink_snapshot_id_increment() 327 xa_lock(&devlink->snapshot_ids); in __devlink_snapshot_id_decrement() 369 xa_lock(&devlink->snapshot_ids); in __devlink_snapshot_id_insert()
|