Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:get_recent_times

Proto:static void get_recent_times(struct psi_group *group, int cpu, enum psi_aggregators aggregator, unsigned int *times, unsigned int *pchanged_states)

Type:void

Parameter:

TypeParameterName
struct psi_group *group
intcpu
enum psi_aggregatorsaggregator
unsigned int *times
unsigned int *pchanged_states
241  groupc = per_cpu_ptr(pcpu, cpu)
247  pchanged_states = 0
250  Do
251  seq = ad_seqcount_begin - begin a seq-read critical section*@s: pointer to seqcount_t* Returns: count to be passed to read_seqcount_retry* read_seqcount_begin opens a read critical section of the given seqcount
252  now = cpu_clock(cpu)
253  No 3D Now!(times, times, size of times )
254  state_mask = state_mask
255  state_start = state_start
256  When ad_seqcount_retry - end a seq-read critical section*@s: pointer to seqcount_t*@start: count, from read_seqcount_begin* Returns: 1 if retry is required, else 0* read_seqcount_retry closes a read critical section of the given seqcount cycle
259  When s < NR_PSI_STATES cycle
270  If state_mask & 1 << s Then times[s] += now - state_start
273  delta = times[s] - times_prev[aggregator][s]
274  times_prev[aggregator][s] = times[s]
276  times[s] = delta
277  If delta Then pchanged_states |= 1 << s
Caller
NameDescribe
collect_percpu_times