Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:psi_task_change

Proto:void psi_task_change(struct task_struct *task, int clear, int set)

Type:void

Parameter:

TypeParameterName
struct task_struct *task
intclear
intset
749  cpu = task_cpu(task)
751  bool wake_clock = true
752  void * iter = NULL
754  If Not process id Then Return
757  If ( psi_flags & set || (psi_flags & clear) != clear ) && Not psi_bug Then
760  Special printk facility for scheduler/timekeeping use only, _DO_NOT_USE_ !
763  psi_bug = 1
766  psi_flags &= ~clear
767  psi_flags |= set
775  If Value for the false possibility is greater at compile time((clear & TSK_RUNNING) && ( Per task flags (PF_*), defined further below: & I'm a workqueue worker ) && wq_worker_last_func - retrieve worker's last work function*@task: Task to retrieve last work function of == psi_avgs_work) Then wake_clock = false
780  When group = iterate_groups(task, & iter) cycle
781  state_mask = psi_group_change(group, cpu, clear, set)
783  If state_mask & poll_states Then 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.
786  If wake_clock && Not delayed_work_pending - Find out whether a delayable work item is currently* pending*@w: The work item in question( & avgs_work) Then schedule_delayed_work - put work task in global workqueue after delay*@dwork: job to be done*@delay: number of jiffies to wait or 0 for immediate execution* After waiting for a given time this puts a job in the kernel-global* workqueue.
Caller
NameDescribe
psi_memstall_enterpsi_memstall_enter - mark the beginning of a memory stall section*@flags: flags to handle nested sections* Marks the calling task as being stalled due to a lack of memory,* such as waiting for a refault or performing reclaim.
psi_memstall_leavepsi_memstall_leave - mark the end of an memory stall section*@flags: flags to handle nested memdelay sections* Marks the calling task as no longer stalled due to lack of memory.
cgroup_move_taskgroup_move_task - move task to a different cgroup*@task: the task*@to: the target css_set* Move task to a new cgroup and safely migrate its associated stall* state between the different groups