* [RFC 0/1] sched: Deprecate DOUBLE_TICK feature
@ 2024-03-08 5:23 Vishal Chourasia
2024-03-08 5:23 ` [RFC 1/1] " Vishal Chourasia
0 siblings, 1 reply; 2+ messages in thread
From: Vishal Chourasia @ 2024-03-08 5:23 UTC (permalink / raw)
To: peterz, linux-kernel; +Cc: Vishal Chourasia
Upon examining commit 5e963f2bd465, titled "sched/fair: Commit to EEVDF,"
it was noted that the method check_preempt_tick was removed. This change
has rendered the DOUBLE_TICK feature, which previously played a role within
the entity_tick function, inconsequential in the scheduling decisions.
Historically, DOUBLE_TICK enabled periodic ticks to proceed even when a
high-resolution timer (hrtick) was active, with the potential to cancel
the hrtick timer in __schedule if it was active.
With the removal of decision point where DOUBLE_TICK played a role by
commit 5e963f2bd465, questions arise regarding its current utility.
The discussion centers on whether there is a continued need for the hrtick
timer as the system transitions towards EEVDF for calculating preemption
points, based on entity lag, and as the scheduler manages resource allocation
in quanta. Particularly, in scenarios involving multiple processes with
different nice values, where EEVDF governs their preemption according to
their lag, however the behavior depends on the specific values of base_slice_ns
and config_hz.
Link: https://lore.kernel.org/lkml/0818a331-cea3-4962-88ad-09bccbd3659d@linux.ibm.com/
Vishal Chourasia (1):
sched: Deprecate DOUBLE_TICK feature
kernel/sched/fair.c | 6 ------
kernel/sched/features.h | 1 -
2 files changed, 7 deletions(-)
--
2.43.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* [RFC 1/1] sched: Deprecate DOUBLE_TICK feature
2024-03-08 5:23 [RFC 0/1] sched: Deprecate DOUBLE_TICK feature Vishal Chourasia
@ 2024-03-08 5:23 ` Vishal Chourasia
0 siblings, 0 replies; 2+ messages in thread
From: Vishal Chourasia @ 2024-03-08 5:23 UTC (permalink / raw)
To: peterz, linux-kernel; +Cc: Vishal Chourasia
The DOUBLE_TICK feature, introduced to manage the interaction between
periodic and high-resolution timer ticks, has become obsolete following
the removal of the check_preempt_tick method in commit 5e963f2bd465
("sched/fair: Commit to EEVDF"). This change rendered the DOUBLE_TICK
check in entity_tick pointless, as it no longer influences scheduling
decisions.
This commit removes the DOUBLE_TICK feature flag, simplifying the
scheduler code and eliminating a now-unnecessary check.
Signed-off-by: Vishal Chourasia <vishalc@linux.ibm.com>
---
kernel/sched/fair.c | 6 ------
kernel/sched/features.h | 1 -
2 files changed, 7 deletions(-)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 533547e3c90a..73e1372d1a0d 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -5510,12 +5510,6 @@ entity_tick(struct cfs_rq *cfs_rq, struct sched_entity *curr, int queued)
resched_curr(rq_of(cfs_rq));
return;
}
- /*
- * don't let the period tick interfere with the hrtick preemption
- */
- if (!sched_feat(DOUBLE_TICK) &&
- hrtimer_active(&rq_of(cfs_rq)->hrtick_timer))
- return;
#endif
}
diff --git a/kernel/sched/features.h b/kernel/sched/features.h
index 143f55df890b..f2671bf8d6ab 100644
--- a/kernel/sched/features.h
+++ b/kernel/sched/features.h
@@ -28,7 +28,6 @@ SCHED_FEAT(WAKEUP_PREEMPTION, true)
SCHED_FEAT(HRTICK, false)
SCHED_FEAT(HRTICK_DL, false)
-SCHED_FEAT(DOUBLE_TICK, false)
/*
* Decrement CPU capacity based on time not spent running tasks
--
2.43.0
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-03-08 5:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-08 5:23 [RFC 0/1] sched: Deprecate DOUBLE_TICK feature Vishal Chourasia
2024-03-08 5:23 ` [RFC 1/1] " Vishal Chourasia
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®