Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\percpu-refcount.c Create Date:2022-07-28 06:24:49
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:percpu_ref_switch_to_atomic_rcu

Proto:static void percpu_ref_switch_to_atomic_rcu(struct rcu_head *rcu)

Type:void

Parameter:

TypeParameterName
struct rcu_head *rcu
135  ref = container_of - cast a member of a structure out to the containing structure*@ptr: the pointer to the member.*@type: the type of the container struct this is embedded in.*@member: the name of the member within the struct.(rcu, structpercpu_ref, rcu)
136  __percpu * percpu_count = percpu_count_ptr(ref)
137  count = 0
140  for_each_possible_cpu(cpu)
141  count += per_cpu_ptr(percpu_count, cpu)
143  pr_debug("global %ld percpu %ld", atomic_long_read( & count), (long)count)
158  atomic_long_add((long)count - Initially, a percpu refcount is just a set of percpu counters, & count)
160  WARN_ONCE(atomic_long_read( & count) <= 0, "percpu ref (%ps) <= 0 (%ld) after switching to atomic", release, atomic_long_read( & count))
165  percpu_ref_call_confirm_rcu(rcu)