函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\flex_proportions.c Create Date:2022-07-27 07:11:22
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:fprop_reflect_period_percpu

函数原型:static void fprop_reflect_period_percpu(struct fprop_global *p, struct fprop_local_percpu *pl)

返回类型:void

参数:

类型参数名称
struct fprop_global *p
struct fprop_local_percpu *pl
192  period等于Current period
196  如果Period in which we last updated events 恒等于period则返回
198  raw_spin_lock_irqsave( & Protect period and numerator , flags)
200  如果Period in which we last updated events 大于等于period
201  raw_spin_unlock_irqrestore( & Protect period and numerator , flags)
202  返回
205  如果periodPeriod in which we last updated events 小于BITS_PER_LONG
206  val等于percpu_counter_read( & he local events counter )
208  如果val小于nr_cpu_ids---- PERCPU ----val等于percpu_counter_sum( & he local events counter )
211  percpu_counter_add_batch( & he local events counter , - val + (val >> (period - Period in which we last updated events )), ---- PERCPU ----)
213  否则percpu_counter_set( & he local events counter , 0)
215  Period in which we last updated events 等于period
216  raw_spin_unlock_irqrestore( & Protect period and numerator , flags)
调用者
名称描述
__fprop_inc_percpuEvent of type pl happened
fprop_fraction_percpu
__fprop_inc_percpu_maxLike __fprop_inc_percpu() except that event is counted only if the given* type has fraction smaller than @max_frac/FPROP_FRAC_BASE