Skip to contentSkip to conversation

sched: remove HZ_BW feature hedge

PATCH Applied Phil Auld 3 participants 3 messages May 15, 2024 – Jul 29, 2024 Scheduler

lore
Share & tools
lore

Phil Auld

author
#0 lore raw

PATCH 1/1 sched: remove HZ_BW feature hedge

As a hedge against unexpected user issues commit 88c56cfeaec4 ("sched/fair: Block nohz tick_stop when cfs bandwidth in use") included a scheduler feature to disable the new functionality. It's been a few releases (v6.6) and no screams, so remove it.

Cc Peter Zijlstra (Intel) <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Vincent Guittot <[email protected]>
Cc Juri Lelli <[email protected]>
Cc Ben Segall <[email protected]>
Cc Valentin Schneider <[email protected]>
---
 kernel/sched/core.c     | 2 +-
 kernel/sched/fair.c     | 2 +-
 kernel/sched/features.h | 2 --
 3 files changed, 2 insertions(+), 4 deletions(-)
kernel/sched/core.c +1 -1
index 7019a40457a6..d7afcee8e2ae 100644
@@ -1269,7 +1269,7 @@ bool sched_can_stop_tick(struct rq *rq)
 	 * dequeued by migrating while the constrained task continues to run.
 	 * E.g. going from 2->1 without going through pick_next_task().
 	 */
-	if (sched_feat(HZ_BW) && __need_bw_check(rq, rq->curr)) {
+	if (__need_bw_check(rq, rq->curr)) {
 		if (cfs_task_bw_constrained(rq->curr))
 			return false;
 	}
kernel/sched/fair.c +1 -1
index c62805dbd608..06e026f10cb4 100644
@@ -6549,7 +6549,7 @@ static void sched_fair_update_stop_tick(struct rq *rq, struct task_struct *p)
 {
 	int cpu = cpu_of(rq);
 
-	if (!sched_feat(HZ_BW) || !cfs_bandwidth_used())
+	if (!cfs_bandwidth_used())
 		return;
 
 	if (!tick_nohz_full_cpu(cpu))
kernel/sched/features.h +0 -2
index 143f55df890b..929021fd6bc4 100644
@@ -85,5 +85,3 @@ SCHED_FEAT(WA_BIAS, true)
 SCHED_FEAT(UTIL_EST, true)
 
 SCHED_FEAT(LATENCY_WARN, false)
-
-SCHED_FEAT(HZ_BW, true)
Signature · 1 line
2.39.3
reviewer Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Phil Auld

As a hedge against unexpected user issues commit 88c56cfeaec4 ("sched/fair: Block nohz tick_stop when cfs bandwidth in use") included a scheduler feature to disable the new functionality. It's been a few releases (v6.6) and no screams, so remove it.

Quoted 7 lines
Cc Peter Zijlstra (Intel) <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Vincent Guittot <[email protected]>
Cc Juri Lelli <[email protected]>
Cc Ben Segall <[email protected]>
Cc Valentin Schneider <[email protected]>

Looks like it's made it in a few distro releases already, so I'd say go for it.

merge bot Applied
#2 lore raw
In reply to Phil Auld
The following commit has been merged into the sched/core branch of tip:

The following commit has been merged into the sched/core branch of tip:

Commit-ID:     a58501fb8320d6232507f722b4c9dcd4e03362ee
Gitweb:        https://git.kernel.org/tip/a58501fb8320d6232507f722b4c9dcd4e03362ee
Author:        Phil Auld <[email protected]>
AuthorDate:    Wed, 15 May 2024 09:37:05 -04:00
Committer:     Peter Zijlstra <[email protected]>
CommitterDate: Mon, 29 Jul 2024 12:22:34 +02:00

sched: remove HZ_BW feature hedge

As a hedge against unexpected user issues commit 88c56cfeaec4 ("sched/fair: Block nohz tick_stop when cfs bandwidth in use") included a scheduler feature to disable the new functionality. It's been a few releases (v6.6) and no screams, so remove it.

---
 kernel/sched/core.c     | 2 +-
 kernel/sched/fair.c     | 2 +-
 kernel/sched/features.h | 2 --
 3 files changed, 2 insertions(+), 4 deletions(-)
kernel/sched/core.c +1 -1
index db5823f..0a71050 100644
@@ -1269,7 +1269,7 @@ bool sched_can_stop_tick(struct rq *rq)
 	 * dequeued by migrating while the constrained task continues to run.
 	 * E.g. going from 2->1 without going through pick_next_task().
 	 */
-	if (sched_feat(HZ_BW) && __need_bw_check(rq, rq->curr)) {
+	if (__need_bw_check(rq, rq->curr)) {
 		if (cfs_task_bw_constrained(rq->curr))
 			return false;
 	}
kernel/sched/fair.c +1 -1
index e8cdfeb..02694fc 100644
@@ -6555,7 +6555,7 @@ static void sched_fair_update_stop_tick(struct rq *rq, struct task_struct *p)
 {
 	int cpu = cpu_of(rq);
 
-	if (!sched_feat(HZ_BW) || !cfs_bandwidth_used())
+	if (!cfs_bandwidth_used())
 		return;
 
 	if (!tick_nohz_full_cpu(cpu))
kernel/sched/features.h +0 -2
index 143f55d..929021f 100644
@@ -85,5 +85,3 @@ SCHED_FEAT(WA_BIAS, true)
 SCHED_FEAT(UTIL_EST, true)
 
 SCHED_FEAT(LATENCY_WARN, false)
-
-SCHED_FEAT(HZ_BW, true)