All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Jiri Olsa <jolsa@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Andi Kleen <andi@firstfloor.org>,
	linux-kernel@vger.kernel.org, Andi Kleen <ak@linux.intel.com>,
	x86@kernel.org, Ingo Molnar <mingo@kernel.org>,
	Frank Ramsay <framsay@redhat.com>,
	Prarit Bhargava <prarit@redhat.com>
Subject: Re: [RFC][PATCH] x86/smp: Fix __max_logical_packages value setup
Date: Wed, 10 Aug 2016 17:52:05 +0200	[thread overview]
Message-ID: <20160810155205.GR30192@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <20160810141538.GA28551@krava>

On Wed, Aug 10, 2016 at 04:15:38PM +0200, Jiri Olsa wrote:
> it's very likely I'm missing something, but seems to me
> that attached patch (untested) might work as well

Hmm, I think you're right. Earlier code (which hasn't survived) tried to
match logical and physical if possible, but that was busted and got
removed.

The code as is should indeed allow for this.

Maybe one nit, the variable is no longer used for a max, so maybe rename
it too?

> ---
> diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
> index 157bf0957219..003208bc8e44 100644
> --- a/arch/x86/kernel/smpboot.c
> +++ b/arch/x86/kernel/smpboot.c

> @@ -277,14 +276,8 @@ int topology_update_package_map(unsigned int apicid, unsigned int cpu)
>  	if (test_and_set_bit(pkg, physical_package_map))
>  		goto found;
>  
> +	new = __max_logical_packages++;
> +
>  	pr_info("APIC(%x) Converting physical %u to logical package %u\n",
>  		apicid, pkg, new);
>  	physical_to_logical_pkg[pkg] = new;
> @@ -340,7 +333,7 @@ static void __init smp_init_package_map(void)
>  		ncpus = 1;
>  	}
>  
> +	__max_logical_packages = 0;
>  
>  	/*
>  	 * Possibly larger than what we need as the number of apic ids per

  reply	other threads:[~2016-08-10 19:14 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-03 16:23 [RFC][PATCH] x86/smp: Fix __max_logical_packages value setup Jiri Olsa
2016-08-10 11:41 ` Jiri Olsa
2016-08-10 13:54 ` Peter Zijlstra
2016-08-10 14:00   ` Jiri Olsa
2016-08-10 14:15     ` Jiri Olsa
2016-08-10 15:52       ` Peter Zijlstra [this message]
2016-08-10 16:14         ` [PATCH] " Jiri Olsa
2016-08-11 12:48           ` Peter Zijlstra
2016-08-11 13:05             ` Jiri Olsa
2016-08-11 13:46               ` Peter Zijlstra
2016-08-12 12:24                 ` Jiri Olsa
2016-08-12 13:12                   ` Jiri Olsa
2016-08-15  9:04                   ` Peter Zijlstra
2016-08-15 10:17                     ` Jiri Olsa
2016-08-15 11:46                       ` Prarit Bhargava
2016-08-18 10:50                       ` [tip:x86/urgent] " tip-bot for Jiri Olsa

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=20160810155205.GR30192@twins.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=ak@linux.intel.com \
    --cc=andi@firstfloor.org \
    --cc=framsay@redhat.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=prarit@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /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.