Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

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

Proto:static void psi_schedule_poll_work(struct psi_group *group, unsigned long delay)

Type:void

Parameter:

TypeParameterName
struct psi_group *group
unsigned longdelay
561  If atomic_cmpxchg( & poll_scheduled, 0, 1) != 0 Then Return
564  _read_lock() - mark the beginning of an RCU read-side critical section* When synchronize_rcu() is invoked on one CPU while other CPUs* are within RCU read-side critical sections, then the* synchronize_rcu() is guaranteed to block until after all the other
566  kworker = fetch RCU-protected pointer for dereferencing(poll_kworker)
571  If Value is more likely to compile time(kworker) Then kthread_queue_delayed_work - queue the associated kthread work* after a delay
573  Else atomic_set( & poll_scheduled, 0)
576  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
Caller
NameDescribe
psi_poll_work
psi_task_change