]> www.infradead.org Git - users/jedix/linux-maple.git/commit
sched: Add normal_policy()
authorTejun Heo <tj@kernel.org>
Tue, 18 Jun 2024 20:09:17 +0000 (10:09 -1000)
committerTejun Heo <tj@kernel.org>
Tue, 18 Jun 2024 20:09:17 +0000 (10:09 -1000)
commit2c8d046d5d51691550da023976815e7a64151636
tree84c254acd1b91b34e7d616cde0fb00939ccac915
parent96fd6c65efc652e9054163e6d3cf254b9e5b93d2
sched: Add normal_policy()

A new BPF extensible sched_class will need to dynamically change how a task
picks its sched_class. For example, if the loaded BPF scheduler progs fail,
the tasks will be forced back on CFS even if the task's policy is set to the
new sched_class. To support such mapping, add normal_policy() which wraps
testing for %SCHED_NORMAL. This doesn't cause any behavior changes.

v2: Update the description with more details on the expected use.

Signed-off-by: Tejun Heo <tj@kernel.org>
Reviewed-by: David Vernet <dvernet@meta.com>
Acked-by: Josh Don <joshdon@google.com>
Acked-by: Hao Luo <haoluo@google.com>
Acked-by: Barret Rhoden <brho@google.com>
kernel/sched/fair.c
kernel/sched/sched.h