函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:psi_trigger_destroy

函数原型:static void psi_trigger_destroy(struct kref *ref)

返回类型:void

参数:

类型参数名称
struct kref *ref
1084  t等于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.(ref, structpsi_trigger, refcount)
1085  group等于group
1086  struct kthread_worker * kworker_to_destroy = NULL
1088  如果static_branch_likely( & psi_disabled)则返回
1095  wake_up_interruptible( & event_wait)
1097  mutex_lock( & trigger_lock)
1099  如果非链表为空
1101  period等于ULLONG_MAX
1103  删除链表项
1104  nr_triggers[state]自减
1105  如果非nr_triggers[state]则poll_states与等于1左移state位的值的反
1108  list_for_each_entry - iterate over list of given type*@pos: the type * to use as a loop cursor.*@head: the head for your list.*@member: the name of the list_head within the struct.(tmp, & triggers, node)
1109  period等于两数取小(period, div_u64 - unsigned 64bit divide with 32bit divisor*@dividend: unsigned 64bit dividend*@divisor: unsigned 32bit divisor* This is the most common 64bit divide and should be used if possible,* as many 32bit archs can optimize this variant better than a full )
1111  poll_min_period等于period
1113  如果poll_states恒等于0则
1114  polling_until等于0
1122  mutex_unlock( & trigger_lock)
1129  synchronize_rcu()
1134  如果kworker_to_destroy
1141  kthread_cancel_delayed_work_sync - cancel a kthread delayed work and* wait for it to finish.*@dwork: the kthread delayed work to cancel* This is kthread_cancel_work_sync() for delayed works.* Return: %true if @dwork was pending, %false otherwise.
1142  atomic_set( & poll_scheduled, 0)
1144  kthread_destroy_worker - destroy a kthread worker*@worker: worker to be destroyed* Flush and destroy @worker. The simple flush is enough because the kthread* worker API is used only in trivial scenarios. There are no multi-step state* machines needed.
1146  释放内存