From: Prarit Bhargava <prarit@redhat.com>
To: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: linux-kernel@vger.kernel.org, Oren Twaig <oren@scalemp.com>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
x86@kernel.org, Borislav Petkov <bp@suse.de>,
Andrew Morton <akpm@linux-foundation.org>,
Andi Kleen <ak@linux.intel.com>, Dave Jones <davej@redhat.com>,
Torsten Kaiser <just.for.lkml@googlemail.com>,
Jan Beulich <JBeulich@suse.com>,
Jan Kiszka <jan.kiszka@siemens.com>,
Toshi Kani <toshi.kani@hp.com>, Andrew Jones <drjones@redhat.com>
Subject: Re: [PATCH] x86, Clean up smp_num_siblings calculation
Date: Wed, 04 Jun 2014 09:12:19 -0400 [thread overview]
Message-ID: <538F1B33.6030706@redhat.com> (raw)
In-Reply-To: <538CA69F.1020305@windriver.com>
On 06/02/2014 12:30 PM, Paul Gortmaker wrote:
<snip code>
> I wonder if this code is in need of an update? I recall reading
> this thread:
>
> http://forum.osdev.org/viewtopic.php?f=1&t=23445
>
> which suggests that we try CPUID with 0xb, and then 0x4 _before_
> relying on the EBX[23:16] of the older CPUID 0x1.
>
> AFAICT, the 0xb and 0x4 didn't exist when AP-485 was written ~2002.
>
> http://datasheets.chipdb.org/Intel/x86/CPUID/24161821.pdf
FWIW, I agree -- this whole chunk can be rewritten and I'll do that in [v3].
>
> Also, there was a discussion of masking the "ht" flag in /proc/cpuinfo
> for when it is "off" -- since the common sense interpretation of it
> doesn't match the implementation in the specification:
>
> http://codemonkey.org.uk/2009/11/10/common-hyperthreading-misconception/
> https://lkml.org/lkml/2009/11/13/33
>
> ...but I don't think that ever happened, even though Ingo thought it
> would probably be OK if there was no obvious fallout.
I have spoken to a few people about this to see if we anticipate any fallout
from this. The only concern that anyone raised is that some admin might get
confused by the lack of the ht flag in /proc/cpuinfo. I think that's bogus
because it would have been the admin that disabled HT in the first place. So
AFAICT it should be safe to do. I'm going to put together a 2/2 of patch only
for the removal of ht if (smp_num_siblings == 1) and we'll see if the
maintainers like it or not.
P.
next prev parent reply other threads:[~2014-06-04 13:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-02 11:51 [PATCH] x86, Clean up smp_num_siblings calculation Prarit Bhargava
2014-06-02 16:30 ` Paul Gortmaker
2014-06-02 17:20 ` Prarit Bhargava
2014-06-04 13:12 ` Prarit Bhargava [this message]
2014-06-19 15:28 ` Prarit Bhargava
-- strict thread matches above, loose matches on Subject: below --
2014-06-02 14:13 Prarit Bhargava
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=538F1B33.6030706@redhat.com \
--to=prarit@redhat.com \
--cc=JBeulich@suse.com \
--cc=ak@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=bp@suse.de \
--cc=davej@redhat.com \
--cc=drjones@redhat.com \
--cc=hpa@zytor.com \
--cc=jan.kiszka@siemens.com \
--cc=just.for.lkml@googlemail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=oren@scalemp.com \
--cc=paul.gortmaker@windriver.com \
--cc=tglx@linutronix.de \
--cc=toshi.kani@hp.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox