函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:psi_poll_work

函数原型:static void psi_poll_work(struct kthread_work *work)

返回类型:void

参数:

类型参数名称
struct kthread_work *work
586  dwork等于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.(work, structkthread_delayed_work, work)
587  group等于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.(dwork, structpsi_group, poll_work)
589  atomic_set( & poll_scheduled, 0)
591  mutex_lock( & trigger_lock)
593  now等于Scheduler clock - returns current time in nanosec units.* This is default implementation.* Architectures and sub-architectures can override this.
595  collect_percpu_times(group, PSI_POLL, & changed_states)
597  如果changed_states按位与poll_states
599  如果now大于polling_untilinit_triggers(group, now)
607  polling_until等于nowpoll_min_period10 updates per window
611  如果now大于polling_until
612  polling_next_update等于ULLONG_MAX
613  转到:out
616  如果now大于等于polling_next_updatepolling_next_update等于update_triggers(group, now)
619  Schedule polling if it's not already scheduled. It's safe to call even from* hotpath because even though kthread_queue_delayed_work takes worker->lock* spinlock that spinlock is never contended due to poll_scheduled atomic* preventing such competition.
622  out :
623  mutex_unlock( & trigger_lock)