Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name: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

Proto:bool fprop_new_period(struct fprop_global *p, int periods)

Type:bool

Parameter:

TypeParameterName
struct fprop_global *p
intperiods
69  local_irq_save(flags)
70  events = percpu_counter_sum( & Number of events in the current period )
74  If events <= 1 Then
75  local_irq_restore(flags)
76  Return false
78  write_seqcount_begin( & Synchronization with period transitions )
79  If periods < 64 Then 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  Return true