]> git.baikalelectronics.ru Git - kernel.git/commit
sched/features: Fix !CONFIG_JUMP_LABEL case
authorJuri Lelli <juri.lelli@redhat.com>
Tue, 13 Oct 2020 05:31:14 +0000 (07:31 +0200)
committerIngo Molnar <mingo@kernel.org>
Wed, 14 Oct 2020 17:55:46 +0000 (19:55 +0200)
commit2c528c9e148fb1631785756a1c4a339695fa31ef
tree340de06f8885734a43c9f6335a62599b7761fe88
parentb1060c59e1d90bcaaac13aacbd1759e22ab1928d
sched/features: Fix !CONFIG_JUMP_LABEL case

Commit:

  5df8614d9b807 ("sched/core: Optimize sched_feat() for !CONFIG_SCHED_DEBUG builds")

made sched features static for !CONFIG_SCHED_DEBUG configurations, but
overlooked the CONFIG_SCHED_DEBUG=y and !CONFIG_JUMP_LABEL cases.

For the latter echoing changes to /sys/kernel/debug/sched_features has
the nasty effect of effectively changing what sched_features reports,
but without actually changing the scheduler behaviour (since different
translation units get different sysctl_sched_features).

Fix CONFIG_SCHED_DEBUG=y and !CONFIG_JUMP_LABEL configurations by properly
restructuring ifdefs.

Fixes: 5df8614d9b807 ("sched/core: Optimize sched_feat() for !CONFIG_SCHED_DEBUG builds")
Co-developed-by: Daniel Bristot de Oliveira <bristot@redhat.com>
Signed-off-by: Daniel Bristot de Oliveira <bristot@redhat.com>
Signed-off-by: Juri Lelli <juri.lelli@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Patrick Bellasi <patrick.bellasi@matbug.net>
Reviewed-by: Valentin Schneider <valentin.schneider@arm.com>
Link: https://lore.kernel.org/r/20201013053114.160628-1-juri.lelli@redhat.com
kernel/sched/core.c
kernel/sched/sched.h