mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Mike Galbraith <umgwanakikbuti@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>, LKML <linux-kernel@vger.kernel.org>,
	Borislav Petkov <bp@alien8.de>,
	Dou Liyang <douly.fnst@cn.fujitsu.com>
Subject: Re: [x86-tip] strange nr_cpus= boot regression
Date: Mon, 26 Sep 2016 15:35:44 -0400 (EDT)	[thread overview]
Message-ID: <alpine.DEB.2.20.1609261525340.5483@nanos> (raw)
In-Reply-To: <alpine.DEB.2.20.1609261350090.5483@nanos>


On Mon, 26 Sep 2016, Thomas Gleixner wrote:
> Can you please provide your .config and the dmesg of a bad and a good run?

Don't bother. I found it.

It's a merge artifact. So git bisect pointing at the merge commit is
entirely correct.

mainline moves 

	 num_processors++;

to a different place in the function. See commit c291b0151585.

Now the nodeid patch set in x86/apic does not have this commit and so
f7c28833c2520 removes  num_processors++ from the original location before
c291b0151585.

Now merging both branches does not conflict because both remove it from the
original location. Though both add it to new locations and it ends up with
both instances of num_processors++ in place.

Which of course makes each invocation increment twice and therefor cuts the
number of cpus in half.

So it's my fault that I did not merge x86/urgent into x86/apic before I
added the nodeid bits. And of course because the thing did not reject and
the merge of it into master gave no conflicts I did not notice ....

Here is a patch against tip/master which fixes the issue at least for
Boris. I'm going to merge that other commit into x86/apic and fix it up so
we don't end up with that mess again.

Thanks,

	tglx

diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
index 46bb29958509..f266b8a92a9e 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -2171,8 +2171,6 @@ int __generic_processor_info(int apicid, int version, bool enabled)
 		return -ENOSPC;
 	}
 
-	num_processors++;
-
 	/*
 	 * Validate version
 	 */

  reply	other threads:[~2016-09-26 19:38 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-26 12:29 Mike Galbraith
2016-09-26 12:39 ` Mike Galbraith
2016-09-26 13:40   ` Borislav Petkov
2016-09-26 14:15     ` Borislav Petkov
2016-09-26 14:27     ` Mike Galbraith
2016-09-26 17:36 ` Thomas Gleixner
2016-09-26 17:52   ` Thomas Gleixner
2016-09-26 19:35     ` Thomas Gleixner [this message]
2016-09-26 19:56       ` Thomas Gleixner
2016-09-27  3:13       ` Mike Galbraith
2016-09-27  4:09         ` Borislav Petkov
2016-09-27  2:07   ` Dou Liyang
2016-09-27 12:16     ` Thomas Gleixner

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=alpine.DEB.2.20.1609261525340.5483@nanos \
    --to=tglx@linutronix.de \
    --cc=bp@alien8.de \
    --cc=douly.fnst@cn.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=umgwanakikbuti@gmail.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®