anolis-cloud-kernel/include/linux/sched
Cruz Zhao ad071c796e anolis: sched: introduce ID_BOOK_CPU
ANBZ: #22143

In high-concurrency scenarios, highclass tasks often select the same
idle CPU when waking up, which can cause scheduling delays. The reason
is that To reduce
the scheduling delays caused by this situation, we introduce
ID_BOOK_CPU:

When highclass task selecting idle cpu, check whether it has been
booked by other tasks and whether it's still idle before we select it
to wake up. If the idle cpu we found has been booked by other tasks,
select again, until book the idle cpu successfully or reach the retry
limit. If the idle cpu hasn't been booked by any other, make rq->booked
true to mark that the cpu is booked, and make rq->booked false after the
highclass task actually enqueues into the rq of the cpu.

To Enable ID_BOOK_CPU,
echo ID_BOOK_CPU > /sys/kernel/debug/sched_features.

To set retry limit, modify /proc/sys/kernel/sched_id_book_cpu_nr_tries.

Signed-off-by: Cruz Zhao <CruzZhao@linux.alibaba.com>
Reviewed-by: Tianchen Ding <dtcccc@linux.alibaba.com>
Link: https://gitee.com/anolis/cloud-kernel/pulls/5455
2025-06-25 16:29:07 +08:00
..
autogroup.h
clock.h
coredump.h
cpufreq.h
cputime.h
deadline.h
debug.h
hotplug.h
idle.h
init.h
isolation.h
jobctl.h
loadavg.h
mm.h
nohz.h
numa_balancing.h
prio.h
rt.h
sd_flags.h sched: Add cpus_share_resources API 2024-12-20 01:48:24 +00:00
signal.h kernel: rerun task_work while freezing in get_signal() 2024-08-20 01:53:53 +00:00
smt.h
stat.h
sysctl.h anolis: sched: introduce ID_BOOK_CPU 2025-06-25 16:29:07 +08:00
task.h locking: Introduce __cleanup() based infrastructure 2025-04-16 01:34:16 +00:00
task_stack.h sched: Fix KCSAN noinstr violation 2024-07-25 06:55:43 +00:00
topology.h scheduler: Create SDTL_SKIP flag to skip topology level 2024-12-20 01:48:24 +00:00
types.h
user.h
wake_q.h
xacct.h