Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

sched_ext: Improve SCX_KF_DISPATCH comment

The comment for SCX_KF_DISPATCH was incomplete and didn't explain that
ops.dispatch() may temporarily release the rq lock, allowing ENQUEUE and
SELECT_CPU operations to be nested inside DISPATCH contexts.

Update the comment to clarify this nesting behavior and provide better
context for when these operations can occur within dispatch.

Acked-by: Andrea Righi <arighi@nvidia.com>
Signed-off-by: Tejun Heo <tj@kernel.org>

Tejun Heo edf005fa c8191ee8

+5 -1
+5 -1
include/linux/sched/ext.h
··· 108 108 SCX_KF_UNLOCKED = 0, /* sleepable and not rq locked */ 109 109 /* ENQUEUE and DISPATCH may be nested inside CPU_RELEASE */ 110 110 SCX_KF_CPU_RELEASE = 1 << 0, /* ops.cpu_release() */ 111 - /* ops.dequeue (in REST) may be nested inside DISPATCH */ 111 + /* 112 + * ops.dispatch() may release rq lock temporarily and thus ENQUEUE and 113 + * SELECT_CPU may be nested inside. ops.dequeue (in REST) may also be 114 + * nested inside DISPATCH. 115 + */ 112 116 SCX_KF_DISPATCH = 1 << 1, /* ops.dispatch() */ 113 117 SCX_KF_ENQUEUE = 1 << 2, /* ops.enqueue() and ops.select_cpu() */ 114 118 SCX_KF_SELECT_CPU = 1 << 3, /* ops.select_cpu() */