Lines Matching full:task

116 	 * By default, if there are no other task to run on the CPU, ext core
117 * keeps running the current task even after its slice expires. If this
124 * An exiting task may schedule after PF_EXITING is set. In such cases,
125 * bpf_task_from_pid() may not be able to find the task and if the BPF
126 * scheduler depends on pid lookup for dispatching, the task will be
143 * A migration disabled task can only execute on its current CPU. By
148 * A migration disabled task never invokes ops.select_cpu() as it can
205 /* the cgroup the task is joining */
212 /* Whether the task exited before running on sched_ext. */
228 /* next task is being scheduled by &sched_class_rt */
230 /* next task is being scheduled by &sched_class_dl */
232 /* next task is being scheduled by &sched_class_stop */
249 /* the task that's going to be scheduled on the CPU */
250 struct task_struct *task; member
274 * @select_cpu: Pick the target CPU for a task which is being woken up
275 * @p: task being woken up
301 * @enqueue: Enqueue a task on the BPF scheduler
302 * @p: task being enqueued
308 * the task will stall.
316 * @dequeue: Remove a task from the BPF scheduler
317 * @p: task being dequeued
321 * the task while updating its scheduling properties (e.g. priority).
323 * The ext core keeps track of whether the BPF side owns a given task or
334 * @prev: previous task being switched out
346 * When not %NULL, @prev is an SCX task with its slice depleted. If
356 * @p: task running currently
359 * executing an SCX task. Setting @p->scx.slice to 0 will trigger an
365 * @runnable: A task is becoming runnable on its associated CPU
366 * @p: task becoming runnable
369 * This and the following three functions can be used to track a task's
370 * execution state transitions. A task becomes ->runnable() on a CPU,
386 * task may be ->enqueue()'d without being preceded by this operation
392 * @running: A task is starting to run on its associated CPU
393 * @p: task starting to run
396 * one the task is going to run on. This can happen when a task
399 * the task's assigned CPU.
402 * target CPU the task is going to use.
404 * See ->runnable() for explanation on the task state notifiers.
409 * @stopping: A task is stopping execution
410 * @p: task stopping to run
411 * @runnable: is task @p still runnable?
414 * one the task was running on. This can happen when a task
417 * the task's assigned CPU.
420 * the task was running on.
422 * See ->runnable() for explanation on the task state notifiers. If
429 * @quiescent: A task is becoming not runnable on its associated CPU
430 * @p: task becoming not runnable
433 * See ->runnable() for explanation on the task state notifiers.
450 * @from: yielding task
451 * @to: optional yield target task
455 * dispatched before the yielding task. Return value is ignored in this
464 * @core_sched_before: Task ordering for core-sched
465 * @a: task A
466 * @b: task B
482 * @set_weight: Set task weight
483 * @p: task to set weight for
492 * @p: task to set CPU affinity for
545 * @init_task: Initialize a task to run in a BPF scheduler
546 * @p: task to initialize for BPF scheduling
549 * Either we're loading a BPF scheduler or a new task is being forked.
551 * be used for allocations, and is called exactly once for a task.
560 * @exit_task: Exit a previously-running task from the system
561 * @p: task to exit
570 * @enable: Enable BPF scheduling for a task
571 * @p: task to enable BPF scheduling for
579 * @disable: Disable BPF scheduling for a task
580 * @p: task to disable BPF scheduling for
609 * @dump_task: Dump BPF scheduler state for a runnable task on error
611 * @p: runnable task to generate debug dump for
644 * @cgroup_prep_move: Prepare a task to be moved to a different cgroup
645 * @p: task being moved
660 * @p: task being moved
671 * @p: task whose cgroup move is being canceled
777 * runnable task should be able to wait before being scheduled. The
826 * If ops.select_cpu() returns a CPU which can't be used by the task,
833 * the meantime. In this case, the task is bounced to the global DSQ.
838 * If SCX_OPS_ENQ_LAST is not set, the number of times that a task
844 * If SCX_OPS_ENQ_EXITING is not set, the number of times that a task
851 * migration disabled task skips ops.enqueue() and is dispatched to its
857 * Total number of times a task's time slice was refilled with the
939 * current task is cleared to zero and the CPU is kicked into the
945 * The task being enqueued was previously enqueued on the current CPU's
948 * invoked in a ->cpu_release() callback, and the task is again
950 * task will not be scheduled on the CPU until at least the next invocation
956 * The task being enqueued is the only task available for the cpu. By
981 * The generic core-sched layer decided to execute the task even though
1002 * Preempt the current task and execute the dispatch path. If the
1003 * current task of the target CPU is an SCX task, its ->scx.slice is
1005 * task expires and the dispatch path is invoked.
1010 * The scx_bpf_kick_cpu() call will return after the current SCX task of
1012 * scheduling. This has no effect if the current task on the target CPU
1038 * Task Ownership State Machine (sched_ext_entity->ops_state)
1040 * The sched_ext core uses this state machine to track task ownership
1070 * Task is owned by the SCX core. It's either on a run queue, running,
1072 * claim on this task.
1075 * Transitional state while transferring a task from the SCX core to
1076 * the BPF scheduler. The task's rq lock is held during this state.
1079 * dispatch, if the task is still in %SCX_OPSS_QUEUEING the completion
1084 * Task is owned by the BPF scheduler. It's on a DSQ (dispatch queue)
1087 * dispatch/dequeue races: if a task is dequeued and re-enqueued, the
1092 * Transitional state while transferring a task from the BPF scheduler
1094 * selected the task for execution. When dequeue needs to take the task
1106 * Cross-CPU Task Migration
1108 * When moving a task in the %SCX_OPSS_DISPATCHING state, we can't simply
1114 * p->scx.holding_cpu. When moving a task to a different rq:
1116 * 1. Verify task can be moved (CPU affinity, migration_disabled, etc.)
1118 * 3. Set task state to %SCX_OPSS_NONE; dequeue waits while DISPATCHING
1122 * 5. Lock src_rq (where the task currently lives)
1124 * race (dequeue clears holding_cpu to -1 when it takes the task), in
1136 * This state tracking allows the BPF scheduler to try to dispatch any task
1150 * on the task being dispatched.