mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Suresh Siddha <suresh.b.siddha@intel.com>
To: Alex Chiang <achiang@hp.com>
Cc: "hpa@zytor.com" <hpa@zytor.com>,
	"mingo@redhat.com" <mingo@redhat.com>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	"andi@firstfloor.org" <andi@firstfloor.org>,
	"x86@kernel.org" <x86@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] x86: add /proc/cpuinfo/physical id quirks
Date: Fri, 14 Aug 2009 12:56:39 -0700	[thread overview]
Message-ID: <1250279799.3077.41.camel@sbs-t61.sc.intel.com> (raw)
In-Reply-To: <20090814192730.GA6431@ldl.fc.hp.com>

On Fri, 2009-08-14 at 12:27 -0700, Alex Chiang wrote:
> Hm, I'm not entirely sure about that, for two reasons.
> 
> First (and this is the weaker reason), I'd prefer not to keep
> adding new fields to /proc/cpuinfo if we can help it, as it just
> makes for a continually more complicated ABI/API for userspace.

Overriding same field with different values based on the system will be
confusing. On some systems it will be derived from cpuid, some will be
based on physical slots. This is too confusing.

> Second, I guess I'm not sure what else 'physical id' /should/
> represent. I'm willing to be corrected on this point, so if I'm
> wrong, just call it simple ignorance. :)

As far as possible we kept these fields closer to what the cpuid
instruction says, so that firmware won't mess up the topology detection
etc by having wrong values in the bios tables.

> My quick grep earlier led me to believe that as long as the
> phys_proc_ids were /consistent/ then it didn't seem to matter
> what their /values/ were.

This is correct. But there are several assumptions in the patch that
might break in the future and where ever possible we simply don't want
to depend on what bios says and rather depend on what the cpu/hardware
says.

For example, we shouldn't assume that original phys proc id's calculated
from cpuid etc need not be contiguous and start from 0 etc. This is
platform dependent and may vary from one version to another version of
processor etc.

Also, you are selecting the fixup table based on number of present cpu
etc. I am just nervous that how this all workout across cpu generations
having different cores, sparsely populated sockets in the platform etc.
We just can't afford to go and fix all the old kernels if we have any
problem in the future config setups.

Easiest route will be to add a new entry in /proc/cpuinfo

thanks,
suresh



  reply	other threads:[~2009-08-14 19:57 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-14 16:36 Alex Chiang
2009-08-14 19:07 ` Suresh Siddha
2009-08-14 19:27   ` Alex Chiang
2009-08-14 19:56     ` Suresh Siddha [this message]
2009-08-19 21:02       ` Alex Chiang
2009-08-20 18:56         ` Suresh Siddha
2009-08-20 20:54           ` Alex Chiang
2009-08-20 21:03             ` Andi Kleen
2009-08-20 21:20               ` Alex Chiang
2009-08-20 21:26                 ` Suresh Siddha
2009-08-20 21:42                   ` H. Peter Anvin
2009-08-20 21:59                     ` Alex Chiang
2009-08-20 22:04                       ` H. Peter Anvin
2009-08-21  0:32                     ` Andi Kleen
2009-08-21  1:51                       ` H. Peter Anvin
2009-08-21  5:02                       ` Alex Chiang
2009-08-20 21:22               ` Suresh Siddha
2009-08-21  0:38                 ` Andi Kleen
2009-08-20 21:11             ` Suresh Siddha

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=1250279799.3077.41.camel@sbs-t61.sc.intel.com \
    --to=suresh.b.siddha@intel.com \
    --cc=achiang@hp.com \
    --cc=andi@firstfloor.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome