Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:include\linux\percpu-refcount.h Create Date:2022-07-28 05:38:01
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:percpu_ref_tryget - try to increment a percpu refcount*@ref: percpu_ref to try-get* Increment a percpu refcount unless its count already reached zero.* Returns %true on success; %false on failure.

Proto:static inline bool percpu_ref_tryget(struct percpu_ref *ref)

Type:bool

Parameter:

TypeParameterName
struct percpu_ref *ref
223  __percpu * percpu_count
226  _read_lock() - mark the beginning of an RCU read-side critical section* When synchronize_rcu() is invoked on one CPU while other CPUs* are within RCU read-side critical sections, then the* synchronize_rcu() is guaranteed to block until after all the other
228  If Internal helper. Don't use outside percpu-refcount proper. The* function doesn't return the pointer and let the caller test it for NULL* because doing so forces the compiler to generate two conditional Then
229  this_cpu_inc( * percpu_count)
230  ret = true
231  Else
232  ret = atomic_long_inc_not_zero( & count)
235  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
237  Return ret
Caller
NameDescribe
blk_mq_timeout_work
blk_mq_queue_tag_busy_iterlk_mq_queue_tag_busy_iter - iterate over all requests with a driver tag*@q: Request queue to examine
io_get_req
SYSCALL_DEFINE6