android_kernel_xiaomi_sm8350/kernel/sched
Peter Zijlstra 9044855f69
sched: Provide sched_set_fifo()
SCHED_FIFO (or any static priority scheduler) is a broken scheduler
model; it is fundamentally incapable of resource management, the one
thing an OS is actually supposed to do.

It is impossible to compose static priority workloads. One cannot take
two well designed and functional static priority workloads and mash
them together and still expect them to work.

Therefore it doesn't make sense to expose the priority field; the
kernel is fundamentally incapable of setting a sensible value, it
needs systems knowledge that it doesn't have.

Take away sched_setschedule() / sched_setattr() from modules and
replace them with:

  - sched_set_fifo(p); create a FIFO task (at prio 50)
  - sched_set_fifo_low(p); create a task higher than NORMAL,
	which ends up being a FIFO task at prio 1.
  - sched_set_normal(p, nice); (re)set the task to normal

This stops the proliferation of randomly chosen, and irrelevant, FIFO
priorities that dont't really mean anything anyway.

The system administrator/integrator, whoever has insight into the
actual system design and requirements (userspace) can set-up
appropriate priorities if and when needed.

Cc: airlied@redhat.com
Cc: alexander.deucher@amd.com
Cc: awalls@md.metrocast.net
Cc: axboe@kernel.dk
Cc: broonie@kernel.org
Cc: daniel.lezcano@linaro.org
Cc: gregkh@linuxfoundation.org
Cc: hannes@cmpxchg.org
Cc: herbert@gondor.apana.org.au
Cc: hverkuil@xs4all.nl
Cc: john.stultz@linaro.org
Cc: nico@fluxnic.net
Cc: paulmck@kernel.org
Cc: rafael.j.wysocki@intel.com
Cc: rmk+kernel@arm.linux.org.uk
Cc: sudeep.holla@arm.com
Cc: tglx@linutronix.de
Cc: ulf.hansson@linaro.org
Cc: wim@linux-watchdog.org
Change-Id: I52ed4f1253e82ba3e8f40f3aa1aff62580163f25
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Ingo Molnar <mingo@kernel.org>
Tested-by: Paul E. McKenney <paulmck@kernel.org>
2024-04-16 16:57:36 +03:00
..
walt core_ctl: Add check for available cpus before accessing per_cpus 2022-11-24 22:22:42 +05:30
autogroup.c
autogroup.h
clock.c
completion.c
core.c sched: Provide sched_set_fifo() 2024-04-16 16:57:36 +03:00
cpuacct.c
cpudeadline.c
cpudeadline.h
cpufreq_schedutil.c cpufreq: schedutil: Fix UAF issue 2023-06-05 11:55:42 +05:30
cpufreq.c
cpupri.c
cpupri.h
cputime.c Merge android11-5.4.180+ (598165f) into msm-5.4 2022-04-21 10:51:21 +05:30
deadline.c Merge tag 'ASB-2023-06-05_11-5.4' of https://android.googlesource.com/kernel/common into android13-5.4-lahaina 2023-06-08 12:00:01 +03:00
debug.c Merge android11-5.4.191+ (375c2e2) into msm-5.4 2022-06-09 11:43:23 +05:30
fair.c Merge tag 'ASB-2023-10-06_11-5.4' of https://android.googlesource.com/kernel/common into android13-5.4-lahaina 2023-10-16 15:49:50 +03:00
features.h Merge tag 'ASB-2022-11-01_11-5.4' of https://android.googlesource.com/kernel/common into android13-5.4-lahaina 2022-11-09 19:53:28 +02:00
idle.c Merge android11-5.4.134+ (dca02b1) into msm-5.4 2021-10-06 09:48:07 +05:30
isolation.c
loadavg.c
Makefile
membarrier.c
OWNERS
pelt.c
pelt.h sched/fair: Fix cfs_rq_clock_pelt() for throttled cfs_rq 2022-06-14 18:11:33 +02:00
psi.c Merge android11-5.4.233+ (4716ccc) into msm-5.4 2023-05-30 11:16:10 +05:30
rt.c Merge tag 'ASB-2023-06-05_11-5.4' of https://android.googlesource.com/kernel/common into android13-5.4-lahaina 2023-06-08 12:00:01 +03:00
sched-pelt.h
sched.h Merge tag 'ASB-2022-11-01_11-5.4' of https://android.googlesource.com/kernel/common into android13-5.4-lahaina 2022-11-09 19:53:28 +02:00
stats.c
stats.h
stop_task.c
swait.c
topology.c Merge android11-5.4.191+ (375c2e2) into msm-5.4 2022-06-09 11:43:23 +05:30
wait_bit.c
wait.c list: add "list_del_init_careful()" to go with "list_empty_careful()" 2023-06-28 10:18:35 +02:00