Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:psi_trigger_destroy

Proto:static void psi_trigger_destroy(struct kref *ref)

Type:void

Parameter:

TypeParameterName
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  If static_branch_likely( & psi_disabled) Then Return
1095  wake_up_interruptible( & event_wait)
1097  mutex_lock( & trigger_lock)
1099  If Not list_empty - tests whether a list is empty*@head: the list to test. Then
1101  period = ULLONG_MAX
1103  deletes entry from list
1104  nr_triggers[state]--
1105  If Not nr_triggers[state] Then 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 = min - return minimum of two values of the same or compatible types*@x: first value*@y: second value(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  If poll_states == 0 Then
1114  polling_until = 0
1122  mutex_unlock( & trigger_lock)
1129  synchronize_rcu()
1134  If kworker_to_destroy Then
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  free previously allocated memory