From: Alex Shi <alex.shi@intel.com>
To: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: mingo@redhat.com, peterz@infradead.org, tglx@linutronix.de,
linux-kernel@vger.kernel.org, venki@google.com,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Subject: Re: [PATCH 2/2] sched: trigger_load_balance clean up
Date: Wed, 12 Sep 2012 15:58:30 +0800 [thread overview]
Message-ID: <505040A6.7020608@intel.com> (raw)
In-Reply-To: <1347388574.26695.135.camel@sbsiddha-desk.sc.intel.com>
On 09/12/2012 02:36 AM, Suresh Siddha wrote:
> On Mon, 2012-09-10 at 15:10 +0800, Alex Shi wrote:
>> Remove a redundant check for on_null_domain(cpu), and rerange the code
>> that make it more readable.
>
> hmm, but we are now doing the on_null_domain() check always,
> irrespective of whether we need the load balance or not.
>
> do we really need the on_null_domain() check there? What happens if we
> just remove it?
A very very simple try can not show removing causes crash. But as to
RCU details, I don't know. :(
CC to Paul
>
> thanks,
> suresh
>
>>
>> Signed-off-by: Alex Shi <alex.shi@intel.com>
>> ---
>> kernel/sched/fair.c | 8 +++++---
>> 1 files changed, 5 insertions(+), 3 deletions(-)
>>
>> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
>> index 5bbc4bf..529092d 100644
>> --- a/kernel/sched/fair.c
>> +++ b/kernel/sched/fair.c
>> @@ -4934,11 +4934,13 @@ static inline int on_null_domain(int cpu)
>> void trigger_load_balance(struct rq *rq, int cpu)
>> {
>> /* Don't need to rebalance while attached to NULL domain */
>> - if (time_after_eq(jiffies, rq->next_balance) &&
>> - likely(!on_null_domain(cpu)))
>> + if (unlikely(on_null_domain(cpu)))
>> + return;
>> +
>> + if (time_after_eq(jiffies, rq->next_balance))
>> 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
>> }
>
>
next prev parent reply other threads:[~2012-09-12 7:59 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-10 7:10 [PATCH 1/2] nohz: clean up select_nohz_load_balancer() Alex Shi
2012-09-10 7:10 ` [PATCH 2/2] sched: trigger_load_balance clean up Alex Shi
2012-09-11 18:36 ` Suresh Siddha
2012-09-12 7:58 ` Alex Shi [this message]
2012-09-12 22:16 ` Suresh Siddha
2012-09-10 15:26 ` [PATCH 1/2] nohz: clean up select_nohz_load_balancer() Peter Zijlstra
2012-09-11 1:27 ` Alex Shi
2012-09-11 18:33 ` Suresh Siddha
2012-09-13 8:25 ` Peter Zijlstra
2012-09-14 6:15 ` [tip:sched/core] sched/nohz: Clean " tip-bot for Alex Shi
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=505040A6.7020608@intel.com \
--to=alex.shi@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=paulmck@linux.vnet.ibm.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 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.