File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -920,6 +920,16 @@ struct task_struct *wq_worker_sleeping(struct task_struct *task)
920
920
* CONTEXT:
921
921
* spin_lock_irq(rq->lock)
922
922
*
923
+ * This function is called during schedule() when a kworker is going
924
+ * to sleep. It's used by psi to identify aggregation workers during
925
+ * dequeuing, to allow periodic aggregation to shut-off when that
926
+ * worker is the last task in the system or cgroup to go to sleep.
927
+ *
928
+ * As this function doesn't involve any workqueue-related locking, it
929
+ * only returns stable values when called from inside the scheduler's
930
+ * queuing and dequeuing paths, when @task, which must be a kworker,
931
+ * is guaranteed to not be processing any works.
932
+ *
923
933
* Return:
924
934
* The last work function %current executed as a worker, NULL if it
925
935
* hasn't executed any work yet.
You can’t perform that action at this time.
0 commit comments