函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Declare @periods new periods. It is upto the caller to make sure period* transitions cannot happen in parallel.* The function returns true if the proportions are still defined and false* if aging zeroed out all events

函数原型:bool fprop_new_period(struct fprop_global *p, int periods)

返回类型:bool

参数:

类型参数名称
struct fprop_global *p
intperiods
69  local_irq_save(flags)
70  events等于percpu_counter_sum( & Number of events in the current period )
74  如果events小于等于1则
75  local_irq_restore(flags)
76  返回:false
78  write_seqcount_begin( & Synchronization with period transitions )
79  如果periods小于64则events减等于events右移periods
82  percpu_counter_add( & Number of events in the current period , - events)
83  Current period 加等于periods
84  write_seqcount_end( & Synchronization with period transitions )
85  local_irq_restore(flags)
87  返回:true
调用者
名称描述
writeout_periodOn idle system, we can be called long after we scheduled because we use* deferred timers so count with missed periods.