All of lore.kernel.org
 help / color / mirror / Atom feed
From: Aili Yao <yaoaili126@gmail.com>
To: mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com,
	vincent.guittot@linaro.org, dietmar.eggemann@arm.com,
	rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de
Cc: linux-kernel@vger.kernel.org, yaoaili@kingsoft.com
Subject: [PATCH] sched/isolation: delete redundant housekeeping_overridden check
Date: Tue, 23 Nov 2021 15:45:35 +0800	[thread overview]
Message-ID: <20211123154535.48be4399@gmail.com> (raw)

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


             reply	other threads:[~2021-11-23  7:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-23  7:45 Aili Yao [this message]
2021-11-23 17:38 ` [PATCH] sched/isolation: delete redundant housekeeping_overridden check 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211123154535.48be4399@gmail.com \
    --to=yaoaili126@gmail.com \
    --cc=bsegall@google.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=juri.lelli@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=vincent.guittot@linaro.org \
    --cc=yaoaili@kingsoft.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.