atomic_add() --> refcount_add() 内存排序保证变更: 无(均完全无序) 基于减量的 RMW 操作,不返回值 函数变更: atomic_dec() --> refcount_dec() 内存排序保证变更: 完全无序 --> RELEASE 排序 基于增量的 RMW 操作,返回值 函数变更: atomic_inc_not_zero() --> refcount_inc_not_zero() 无原子...
atomic_add() --> refcount_add() 内存排序保证变更: 无(均完全无序) 基于减量的 RMW 操作,不返回值函数变更: atomic_dec() --> refcount_dec() 内存排序保证变更: 完全无序 --> RELEASE 排序 基于增量的 RMW 操作,返回值函数变更: atomic_inc_not_zero() --> refcount_inc_not_zero() 无原子对应...
static inline int __must_check kref_get_unless_zero(struct kref *kref) {return atomic_add_unless(&kref->refcount, 1, 0);return refcount_inc_not_zero(&kref->refcount); } #endif /* _KREF_H_ */0 comments on commit 10383ae Please sign in to comment. Footer...
static __always_inline __must_check bool refcount_add_not_zero(unsigned int i, refcount_t *r) { return __refcount_add_not_zero(i, &r->refs) != 0; } static __always_inline __must_check bool refcount_inc_not_zero(refcount_t *r) { return __refcount_add_not_zero(1, &r->refs...
detect that these pages should not be properly refcounted, and to detect when the refcount drops to one instead of zero. On the other hand get_user_pages(), etc. will properly refcount fs dax pages by taking a reference and dropping it when the page is ...
> Right. And actually that means I can't move the page_ref_inc(page) into > what will be called dax_create_folio(), because an entry may have been > created previously that had a failed vmf_insert_XXX() which will > therefore have a zero refcount folio associated with it. ...
atomic_inc_not_zero() --> refcount_inc_not_zero() 无原子对应项 --> refcount_add_not_zero() 内存排序保证变更: 完全有序 --> 成功时对存储进行控制依赖 注意 我们在这里真的假设获得对象指针时提供了必要的排序! 通用的减法/减量基于 RMW 操作,返回值函数变更: ...
with the following properties: - counter is initialized to 1 using atomic_set() - a resource is freed upon counter reaching zero - once counter reaches zero, its further increments aren't allowed - counter schema uses basic atomic operations (set, inc, inc_not_zero, dec_and_test, etc.)...
Search or jump to... Search code, repositories, users, issues, pull requests... Provide feedback We read every piece of feedback, and take your input very seriously. Include my email address so I can be contacted Cancel Submit feedback Saved searches Use saved searches to ...
>> *entry = dax_insert_entry(xas, vmf, iter, *entry, pfn, DAX_ZERO_PAGE); >> >> - ret = vmf_insert_mixed(vmf->vma, vaddr, pfn); >> + page_ref_inc(page); >> + ret = dax_insert_pfn(vmf, pfn, false); >> + put_page(page); ...