Lines Matching defs:donor
28 * Block a retained proxy donor, telling put_prev_task_scx() that the donor is
440 * If we're in the dispatch path holding rq lock, $donor may or may not
442 * $donor's slice. We say yes here and resolve it at the end of dispatch.
449 * The preemption flags clear $donor's slice if on SCX and kick dispatch,
454 struct task_struct *donor = rq->donor;
460 return donor->sched_class != &ext_sched_class ||
461 likely(!(donor->scx.flags & SCX_TASK_PROTECTED));
1163 bool proxy = next != rq->donor;
1176 * The selected donor is already visible, but rq->curr still
1543 struct task_struct *donor;
1547 * update_curr_scx() is selected through rq->donor->sched_class, not
1548 * rq->curr->sched_class, so @donor is always an EXT task here. If an EXT
1549 * owner executes for a FAIR donor, FAIR's update_curr() runs instead.
1551 donor = rq->donor;
1554 apply_task_slice_oob(rq, donor);
1560 if (donor->scx.slice != SCX_SLICE_INF)
1561 donor->scx.slice -= min_t(u64, donor->scx.slice, delta_exec);
1563 if (unlikely(donor == scx_rescuee(rq)))
1755 p != rq->donor && rq->donor->sched_class == &ext_sched_class) {
1756 if (likely(scx_set_task_slice(rq->donor, 0))) {
2224 * report it as another blocked-donor admission.
2564 struct task_struct *p = rq->donor;
2578 struct task_struct *from = rq->donor;
2596 * A retained proxy donor can wake through ttwu_runnable() without another
2726 * proxy_set_task_cpu() preserves wake_cpu when moving a donor's scheduling
2727 * context to its lock owner's rq. For example, if BPF places donor D on
2733 * When task_cpu() == wake_cpu, the donor has not been proxy-migrated and
2789 * proxy_migrate_task() moves only a blocked donor's scheduling context towards
2791 * therefore allowed even when the donor is migration-disabled.
3158 dst_rq->donor->sched_class))
3398 * put_prev_task_scx(). A retry can repick the same donor, so
3425 * donor. Proxy resolution may fail or migrate the donor to another CPU,
3431 * regardless of the donor state.
3472 * slice or a blocked proxy donor is sufficient by itself to require
3482 struct task_struct *donor = rq->donor;
3487 if (donor->sched_class == &ext_sched_class && (donor->scx.flags & SCX_TASK_QUEUED))
3488 scx_start_task_running(rq, donor);
3571 * donor around an execution-context switch on this rq.
3588 * If the donor is the same and only the mutex owner changes,
3590 * already admitted the donor, so it can continue running.
3602 * The exception is an IMMED donor put by proxy_resched_idle():
3604 * idle, so keep the donor where it can be picked again.
3815 struct task_struct *prev = rq->donor;
3820 /* A retry can abandon a provisional blocked-donor pick. */
4326 static void task_tick_scx(struct rq *rq, struct task_struct *donor, int queued)
4328 struct scx_sched *sch = scx_task_sched(donor);
4337 scx_set_task_slice(donor, 0);
4339 SCX_CALL_OP_TASK(sch, tick, rq, donor);
4341 if (!donor->scx.slice) {
4343 if (READ_ONCE(donor->scx.lazy_resched) &&
4876 * Don't carry a donor retained by another class into sched_ext. The caller
5045 * The revoke that scheduled this scan may have raced the pick: donor
5052 rq->donor->sched_class == &ext_sched_class &&
5053 scx_task_reenq_on_cap_revoke(rq, rq->donor)) {
5054 scx_set_task_slice(rq->donor, 0);
5299 struct task_struct *p = rq->donor;
5310 * @rq->donor may still reference an outgoing EXT task after it has been
6417 static u32 bypass_lb_cpu(struct scx_sched *sch, s32 donor,
6421 struct rq *donor_rq = cpu_rq(donor);
6422 struct scx_dispatch_q *donor_dsq = scx_bypass_dsq(sch, donor);
6861 * clears theirs. The current donor isn't on the runnable list,
6864 * When bypass lifts, the current donor keeps running on its
6868 p = rq->donor;
7600 scx_dump_line(&ns, " donor=%s[%d] class=%ps",
7601 rq->donor->comm, rq->donor->pid, rq->donor->sched_class);
7648 if (rq->donor != rq->curr &&
7649 rq->donor->sched_class == &ext_sched_class &&
7650 (dump_all_tasks || scx_task_on_sched(sch, rq->donor)))
7651 scx_dump_task(sch, s, dctx, rq, rq->donor, ' ');
9221 cur_class = rq->donor->sched_class;
9252 } else if (unlikely(!scx_set_task_slice(rq->donor, 0))) {
10269 * rq->donor owns and consumes the slice while rq->curr executes on its
11347 * Under proxy execution, this reports the donor rather than the task whose
11349 * not exposed to the BPF scheduler, which continues to observe the donor as the
11354 return rcu_access_pointer(task_rq(p)->donor) == p;
11419 * Under proxy execution, this returns the donor, which supplies the scheduling
11439 return rcu_dereference(cpu_rq(cpu)->donor);
11463 return rcu_dereference(cpu_rq(cpu)->donor);