linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] sched/isolation: delete redundant housekeeping_overridden check
@ 2021-11-23  7:45 Aili Yao
  2021-11-23 17:38 ` Steven Rostedt
  0 siblings, 1 reply; 6+ messages in thread
From: Aili Yao @ 2021-11-23  7:45 UTC (permalink / raw)
  To: mingo, peterz, juri.lelli, vincent.guittot, dietmar.eggemann,
	rostedt, bsegall, mgorman
  Cc: linux-kernel, yaoaili

From: Aili Yao <yaoaili@kingsoft.com>

housekeeping_test_cpu is only called by housekeeping_cpu(),
and in housekeeping_cpu(), there is already one same check;

So delete the redundant check.

Signed-off-by: Aili Yao <yaoaili@kingsoft.com>
---
 kernel/sched/isolation.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/kernel/sched/isolation.c b/kernel/sched/isolation.c
index 7f06eaf..5c4d533 100644
--- a/kernel/sched/isolation.c
+++ b/kernel/sched/isolation.c
@@ -56,9 +56,8 @@ void housekeeping_affine(struct task_struct *t, enum
hk_flags flags) 
 bool housekeeping_test_cpu(int cpu, enum hk_flags flags)
 {
-	if (static_branch_unlikely(&housekeeping_overridden))
-		if (housekeeping_flags & flags)
-			return cpumask_test_cpu(cpu,
housekeeping_mask);
+	if (housekeeping_flags & flags)
+		return cpumask_test_cpu(cpu, housekeeping_mask);
 	return true;
 }
 EXPORT_SYMBOL_GPL(housekeeping_test_cpu);
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-11-24 14:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-23  7:45 [PATCH] sched/isolation: delete redundant housekeeping_overridden check Aili Yao
2021-11-23 17:38 ` Steven Rostedt
2021-11-24  1:21   ` Aili Yao
2021-11-24  1:42     ` Steven Rostedt
2021-11-24  7:42       ` Aili Yao
2021-11-24 14:13         ` Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).