From: Alex Shi <alex.shi@intel.com>
To: mingo@redhat.com, peterz@infradead.org, tglx@linutronix.de,
suresh.b.siddha@intel.com, venki@google.com
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH v2 3/3] sched/balance: remove on_null_domain() in trigger_load_balance
Date: Fri, 14 Sep 2012 13:47:25 +0800 [thread overview]
Message-ID: <1347601645-20139-4-git-send-email-alex.shi@intel.com> (raw)
In-Reply-To: <1347601645-20139-1-git-send-email-alex.shi@intel.com>
According to Suresh's inverstigation, the first on_null_domain in
trigger_load_balance is for avoiding unnecessary loadbalances(from
softirq) when a SMP kernel running on UP machine.
The second on_null_domain is not needed, since nohz_kick_needed()
will return 0 in this scenario.
So, remove the 2nd on_null_domain calling.
Signed-off-by: Alex Shi <alex.shi@intel.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 60d5505..1ae2c66 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -4938,7 +4938,7 @@ void trigger_load_balance(struct rq *rq, int cpu)
likely(!on_null_domain(cpu)))
raise_softirq(SCHED_SOFTIRQ);
#ifdef CONFIG_NO_HZ
- if (nohz_kick_needed(rq, cpu) && likely(!on_null_domain(cpu)))
+ if (nohz_kick_needed(rq, cpu))
nohz_balancer_kick(cpu);
#endif
}
--
1.7.12
prev parent reply other threads:[~2012-09-14 5:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-14 5:47 [PATCH v2] few functions clean up Alex Shi
2012-09-14 5:47 ` [PATCH v2 1/3] nohz: clean up select_nohz_load_balancer() Alex Shi
2012-09-14 5:47 ` [PATCH v2 2/3] sched:nohz rename clear_nohz_tick_stopped as nohz_balance_exit_idle Alex Shi
2012-09-14 5:47 ` Alex Shi [this message]
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=1347601645-20139-4-git-send-email-alex.shi@intel.com \
--to=alex.shi@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=suresh.b.siddha@intel.com \
--cc=tglx@linutronix.de \
--cc=venki@google.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 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®