Skip to content

Commit bc8198d

Browse files
committed
Merge tag 'sched_ext-for-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/sched_ext
Pull sched_ext updates from Tejun Heo: - scx_bpf_now() added so that BPF scheduler can access the cached timestamp in struct rq to avoid reading TSC multiple times within a locked scheduling operation. - Minor updates to the built-in idle CPU selection logic. - tool/sched_ext updates and other misc changes. * tag 'sched_ext-for-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/sched_ext: sched_ext: fix kernel-doc warnings sched_ext: Use time helpers in BPF schedulers sched_ext: Replace bpf_ktime_get_ns() to scx_bpf_now() sched_ext: Add time helpers for BPF schedulers sched_ext: Add scx_bpf_now() for BPF scheduler sched_ext: Implement scx_bpf_now() sched_ext: Relocate scx_enabled() related code sched_ext: Add option -l in selftest runner to list all available tests sched_ext: Include remaining task time slice in error state dump sched_ext: update scx_bpf_dsq_insert() doc for SCX_DSQ_LOCAL_ON sched_ext: idle: small CPU iteration refactoring sched_ext: idle: introduce check_builtin_idle_enabled() helper sched_ext: idle: clarify comments sched_ext: idle: use assign_cpu() to update the idle cpumask sched_ext: Use str_enabled_disabled() helper in update_selcpu_topology() sched_ext: Use sizeof_field for key_len in dsq_hash_params tools/sched_ext: Receive updates from SCX repo sched_ext: Use the NUMA scheduling domain for NUMA optimizations
2 parents 606489d + 987ce79 commit bc8198d

File tree

21 files changed

+690
-160
lines changed

21 files changed

+690
-160
lines changed

Documentation/scheduler/sched-ext.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -242,9 +242,9 @@ The following briefly shows how a waking task is scheduled and executed.
242242
task was inserted directly from ``ops.select_cpu()``). ``ops.enqueue()``
243243
can make one of the following decisions:
244244

245-
* Immediately insert the task into either the global or local DSQ by
246-
calling ``scx_bpf_dsq_insert()`` with ``SCX_DSQ_GLOBAL`` or
247-
``SCX_DSQ_LOCAL``, respectively.
245+
* Immediately insert the task into either the global or a local DSQ by
246+
calling ``scx_bpf_dsq_insert()`` with one of the following options:
247+
``SCX_DSQ_GLOBAL``, ``SCX_DSQ_LOCAL``, or ``SCX_DSQ_LOCAL_ON | cpu``.
248248

249249
* Immediately insert the task into a custom DSQ by calling
250250
``scx_bpf_dsq_insert()`` with a DSQ ID which is smaller than 2^63.

kernel/sched/core.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -793,6 +793,7 @@ static void update_rq_clock_task(struct rq *rq, s64 delta)
793793
void update_rq_clock(struct rq *rq)
794794
{
795795
s64 delta;
796+
u64 clock;
796797

797798
lockdep_assert_rq_held(rq);
798799

@@ -804,11 +805,14 @@ void update_rq_clock(struct rq *rq)
804805
SCHED_WARN_ON(rq->clock_update_flags & RQCF_UPDATED);
805806
rq->clock_update_flags |= RQCF_UPDATED;
806807
#endif
808+
clock = sched_clock_cpu(cpu_of(rq));
809+
scx_rq_clock_update(rq, clock);
807810

808-
delta = sched_clock_cpu(cpu_of(rq)) - rq->clock;
811+
delta = clock - rq->clock;
809812
if (delta < 0)
810813
return;
811814
rq->clock += delta;
815+
812816
update_rq_clock_task(rq, delta);
813817
}
814818

0 commit comments

Comments
 (0)