lkml.org 
[lkml]   [2022]   [Jun]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] sched/fair: avoid redundant hrtimer check
Date
The check is required iff HRTICK is enabled and DOUBLE_TICK is disabled,
avoid the redundant check by adding corresponding sched_feat() .

Signed-off-by: Huichun Feng <foxhoundsk.tw@gmail.com>
---
kernel/sched/fair.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 77b2048a9..80cc1a924 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -4668,7 +4668,7 @@ entity_tick(struct cfs_rq *cfs_rq, struct sched_entity *curr, int queued)
/*
* don't let the period tick interfere with the hrtick preemption
*/
- if (!sched_feat(DOUBLE_TICK) &&
+ if (sched_feat(HRTICK) && !sched_feat(DOUBLE_TICK) &&
hrtimer_active(&rq_of(cfs_rq)->hrtick_timer))
return;
#endif
--
2.36.1
\
 
 \ /
  Last update: 2022-06-06 14:25    [W:0.077 / U:1.400 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site