Home
last modified time | relevance | path

Searched refs:scx (Results 1 – 19 of 19) sorted by relevance

/linux/kernel/sched/
H A Dext.c295 rcu_assign_pointer(p->scx.sched, sch); in scx_set_task_sched()
432 if (rq->scx.flags & SCX_RQ_IN_BALANCE) in rq_is_open()
520 WARN_ON_ONCE(current->scx.kf_tasks[0]); \
521 current->scx.kf_tasks[0] = task; \
523 current->scx.kf_tasks[0] = NULL; \
529 WARN_ON_ONCE(current->scx.kf_tasks[0]); \
530 current->scx.kf_tasks[0] = task; \
532 current->scx.kf_tasks[0] = NULL; \
539 WARN_ON_ONCE(current->scx.kf_tasks[0]); \
540 current->scx.kf_tasks[0] = task0; \
[all …]
H A Dext_internal.h1396 return rcu_dereference_protected(p->scx.sched, in scx_task_sched()
1409 return rcu_dereference_all(p->scx.sched); in scx_task_sched_rcu()
1422 return rcu_access_pointer(p->scx.sched) == sch; in scx_task_on_sched()
H A Dsched.h503 struct scx_task_group scx; member
1187 struct scx_rq scx; member
1852 WRITE_ONCE(rq->scx.clock, clock); in scx_rq_clock_update()
1853 smp_store_release(&rq->scx.flags, rq->scx.flags | SCX_RQ_CLK_VALID); in scx_rq_clock_update()
1860 WRITE_ONCE(rq->scx.flags, rq->scx.flags & ~SCX_RQ_CLK_VALID); in scx_rq_clock_invalidate()
H A Dext_idle.c554 cpu_rq(cpu)->scx.local_dsq.nr == 0 && in scx_select_cpu_dfl()
940 if (this_rq()->scx.in_select_cpu) { in select_cpu_from_kfunc()
H A Dcore.c4488 init_scx_entity(&p->scx); in __sched_fork()
9749 return sched_weight_from_cgroup(tg->scx.weight); in tg_weight()
10033 *period_us_p = tg->scx.bw_period_us; in tg_bandwidth()
10035 *quota_us_p = tg->scx.bw_quota_us; in tg_bandwidth()
10037 *burst_us_p = tg->scx.bw_burst_us; in tg_bandwidth()
/linux/tools/testing/selftests/sched_ext/
H A Dselect_cpu_vtime.bpf.c13 #include <scx/common.bpf.h>
30 u64 vtime = p->scx.dsq_vtime; in task_vtime()
62 if (vtime_before(vtime_now, p->scx.dsq_vtime)) in BPF_STRUCT_OPS()
63 vtime_now = p->scx.dsq_vtime; in BPF_STRUCT_OPS()
69 u64 delta = scale_by_task_weight_inverse(p, SCX_SLICE_DFL - p->scx.slice); in BPF_STRUCT_OPS()
71 scx_bpf_task_set_dsq_vtime(p, p->scx.dsq_vtime + delta);
H A Dmaybe_null_fail_dsp.bpf.c17 vtime_test = p->scx.dsq_vtime; in BPF_STRUCT_OPS()
H A Dmaybe_null.bpf.c18 vtime_test = p->scx.dsq_vtime; in BPF_STRUCT_OPS()
H A Dddsp_bogus_dsq_fail.bpf.c24 p->scx.dsq_vtime, 0); in BPF_STRUCT_OPS()
H A Dddsp_vtimelocal_fail.bpf.c21 p->scx.dsq_vtime, 0); in BPF_STRUCT_OPS()
/linux/tools/sched_ext/
H A Dscx_flatcg.bpf.c46 #include <scx/common.bpf.h>
393 u64 tvtime = p->scx.dsq_vtime; in BPF_STRUCT_OPS()
533 if (time_before(cgc->tvtime_now, p->scx.dsq_vtime)) in BPF_STRUCT_OPS()
534 cgc->tvtime_now = p->scx.dsq_vtime; in BPF_STRUCT_OPS()
549 * @p->scx.slice to zero and the following would treat the yielding task in BPF_STRUCT_OPS()
552 * instead of depending on @p->scx.slice. in BPF_STRUCT_OPS()
555 u64 delta = scale_by_task_weight_inverse(p, SCX_SLICE_DFL - p->scx.slice); in BPF_STRUCT_OPS()
557 scx_bpf_task_set_dsq_vtime(p, p->scx.dsq_vtime + delta); in BPF_STRUCT_OPS()
928 delta = time_delta(p->scx.dsq_vtime, from_cgc->tvtime_now); in BPF_STRUCT_OPS_SLEEPABLE()
H A Dscx_qmap.bpf.c174 if (p->scx.weight < 2 && !(p->flags & PF_KTHREAD)) in BPF_STRUCT_OPS()
207 int idx = weight_to_idx(p->scx.weight); in BPF_STRUCT_OPS()
265 p->scx.weight < 2 && !(p->flags & PF_KTHREAD) && !(enq_flags & SCX_ENQ_REENQ)) { in BPF_STRUCT_OPS()
306 if (highpri_boosting && p->scx.weight >= HIGHPRI_WEIGHT) { in BPF_STRUCT_OPS()
326 int idx = weight_to_idx(p->scx.weight); in update_core_sched_head_seq()
539 core_sched_tail_seqs[weight_to_idx(prev->scx.weight)]++; in BPF_STRUCT_OPS()
559 cpuc->avg_weight = cpuc->avg_weight * 3 / 4 + p->scx.weight / 4; in BPF_STRUCT_OPS()
572 int idx = weight_to_idx(p->scx.weight); in task_qdist()
617 p->scx.disallow = true; in BPF_STRUCT_OPS()
H A DMakefile177 $(SCXOBJ_DIR)/%.bpf.o: %.bpf.c $(INCLUDE_DIR)/vmlinux.h include/scx/*.h \
192 SCX_COMMON_DEPS := include/scx/common.h include/scx/user_exit_info.h | $(BINDIR)
H A DREADME.md157 https://github.com/sched-ext/scx.
/linux/tools/sched_ext/include/scx/
H A Dcompat.bpf.h370 p->scx.slice = slice; in scx_bpf_reenqueue_local()
378 p->scx.dsq_vtime = vtime;
H A Dcommon.bpf.h13 * prototypes. See https://github.com/sched-ext/scx/issues/1111.
861 return (value * p->scx.weight) / 100;
869 return value * 100 / p->scx.weight;
/linux/Documentation/scheduler/
H A Dsched-ext.rst426 if (task is not in a DSQ || task->scx.slice == 0) {
448 while (task_is_runnable(task) && task->scx.slice > 0) {
451 if (task->scx.slice == 0)
452 ops.dispatch(); /* task->scx.slice can be refilled */
/linux/include/linux/
H A Dsched.h876 struct sched_ext_entity scx; member
/linux/
H A DMAINTAINERS23946 W: https://github.com/sched-ext/scx