mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christian Borntraeger <borntraeger@de.ibm.com>
To: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: Ingo Molnar <mingo@elte.hu>, Thomas Gleixner <tglx@linutronix.de>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Heiko Carstens <heiko.carstens@de.ibm.com>,
	Martin Schwidefsky <schwidefsky@de.ibm.com>
Subject: Re: [PATCH v2] NOHZ: fix nohz on cpu unplug
Date: Tue, 3 Feb 2009 09:48:13 +0100	[thread overview]
Message-ID: <200902030948.13519.borntraeger@de.ibm.com> (raw)
In-Reply-To: <1233619023.16238.12.camel@vayu>

Am Tuesday 03 February 2009 00:57:03 schrieb Suresh Siddha:
> Does this patch fix the issue? Thanks.

I fixed up a compile error. (See below). After that, the patch does indeed fix 
the problem.

Tested-by: Christian Borntraeger <borntraeger@de.ibm.com>


> diff --git a/kernel/sched.c b/kernel/sched.c
> index 96439a4..8a0419b 100644
> --- a/kernel/sched.c
> +++ b/kernel/sched.c
> @@ -4026,19 +4026,24 @@ int select_nohz_load_balancer(int stop_tick)
>  	int cpu = smp_processor_id();
>
>  	if (stop_tick) {
> -		cpumask_set_cpu(cpu, nohz.cpu_mask);
>  		cpu_rq(cpu)->in_nohz_recently = 1;
>
> -		/*
> -		 * If we are going offline and still the leader, give up!
> -		 */
> -		if (!cpu_active(cpu) &&
> -		    atomic_read(&nohz.load_balancer) == cpu) {
> +		if (!cpu_active(cpu) {

That does not compile...I used the following:
		if (!cpu_active(cpu)) {

> +			if (atomic_read(&nohz.load_balancer) != cpu)
> +				return 0;
> +
> +			/*
> +			 * If we are going offline and still the leader,
> +			 * give up!
> +			 */
>  			if (atomic_cmpxchg(&nohz.load_balancer, cpu, -1) != cpu)
>  				BUG();
> +
>  			return 0;
>  		}
>
> +		cpumask_set_cpu(cpu, nohz.cpu_mask);
> +
>  		/* time for ilb owner also to sleep */
>  		if (cpumask_weight(nohz.cpu_mask) == num_online_cpus()) {
>  			if (atomic_read(&nohz.load_balancer) == cpu)



  reply	other threads:[~2009-02-03  8:49 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-30 16:29 [RFC] " Christian Borntraeger
2009-02-02  9:58 ` [PATCH/RFC] " Christian Borntraeger
2009-02-02 12:23   ` [PATCH v2] " Christian Borntraeger
2009-02-02 23:57     ` Suresh Siddha
2009-02-03  8:48       ` Christian Borntraeger [this message]
2009-02-03 12:28         ` Ingo Molnar
2009-02-04  6:19           ` Christian Borntraeger
2009-02-04 19:59             ` Suresh Siddha
2009-02-04 21:32               ` Ingo Molnar
2009-02-05 19:54                 ` Mark Lord
2009-02-06  2:33                   ` Suresh Siddha
2009-02-06 14:52                     ` Mark Lord

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=200902030948.13519.borntraeger@de.ibm.com \
    --to=borntraeger@de.ibm.com \
    --cc=heiko.carstens@de.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=schwidefsky@de.ibm.com \
    --cc=suresh.b.siddha@intel.com \
    --cc=tglx@linutronix.de \
    /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®