mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Nakajima, Jun" <jun.nakajima@intel.com>
To: Dave Jones <davej@codemonkey.org.uk>, Jeff Garzik <jgarzik@pobox.com>
Cc: Robert Love <rml@tech9.net>,
	"Nakajima, Jun" <jun.nakajima@intel.com>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>,
	"'akpm@digeo.com'" <akpm@digeo.com>,
	"'linux-kernel@vger.kernel.org'" <linux-kernel@vger.kernel.org>,
	"'chrisl@vmware.com'" <chrisl@vmware.com>,
	"'Martin J. Bligh'" <mbligh@aracnet.com>
Subject: RE: [PATCH] hyper-threading information in /proc/cpuinfo
Date: Fri, 25 Oct 2002 17:26:11 -0700	[thread overview]
Message-ID: <F2DBA543B89AD51184B600508B68D4000ECE70DA@fmsmsx103.fm.intel.com> (raw)

Agree. We can calculate smp_num_siblings from phys_proc_id[n] as the kernel
does, although it would be just nice or double-checking (but if the
application cannot calculate it correctly how can one expect it runs fine? I
mean it's very easy.)

So this is sufficient:
+#ifdef CONFIG_SMP
+	if (cpu_has_ht) {
+		seq_printf(m, "physical id\t: %d\n", phys_proc_id[n]);
+	}
+#endif

For a multi-core system, one could do:

	seq_printf(m, "physical id\t: %d\n", phys_proc_id[n]);
	seq_printf(m, "core id\t: %d\n", core_id[n]);

This would support multiple SMT processor cores on one chip. "core_id" is
the id of the CPU core in a chip die that the processor belongs to.
"physical_proc_id" is the id of the CPU die in the system.

Jun
-----Original Message-----
From: Dave Jones [mailto:davej@codemonkey.org.uk]
Sent: Friday, October 25, 2002 5:13 PM
To: Jeff Garzik
Cc: Robert Love; Nakajima, Jun; Alan Cox; 'akpm@digeo.com';
'linux-kernel@vger.kernel.org'; 'chrisl@vmware.com'; 'Martin J. Bligh'
Subject: Re: [PATCH] hyper-threading information in /proc/cpuinfo


On Fri, Oct 25, 2002 at 08:04:45PM -0400, Jeff Garzik wrote:

 > Not really... we print out other information that is duplicated N times, 
 > because it is the common case that N-way systems have matched processors 
 > with matched capabilities.

Not really. We print out the 'duplicate' info because it's read that
way from different CPUs. The smp_num_siblings is a single global
variable. Theoretically, the other stuff /could/ change in an
asymetrical system, but the num_siblings thing is constant.
 
		Dave

-- 
| Dave Jones.        http://www.codemonkey.org.uk

             reply	other threads:[~2002-10-26  0:22 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-26  0:26 Nakajima, Jun [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-10-28 22:36 Nakajima, Jun
2002-10-26  1:58 Nakajima, Jun
2002-10-26  0:54 Nakajima, Jun
2002-10-25 23:59 Nakajima, Jun
2002-10-26  0:43 ` J.A. Magallon
2002-10-26  0:47   ` J.A. Magallon
2002-10-26  2:51     ` Martin J. Bligh
2002-10-26 19:48   ` Rik van Riel
2002-10-28 18:53     ` chrisl
2002-10-28 21:54       ` J.A. Magallon
2002-10-25 23:24 Nakajima, Jun
2002-10-25 23:45 ` Jeff Garzik
2002-10-25 22:42 Nakajima, Jun
2002-10-25 22:57 ` Jeff Garzik
2002-10-25 23:21   ` David D. Hagood
2002-10-25 23:25     ` Robert Love
2002-10-25 23:45       ` David D. Hagood
2002-10-26  0:37         ` Robert Love
2002-10-25 23:51 ` Daniel Phillips
2002-10-25 21:50 Nakajima, Jun
2002-10-25 21:54 ` Robert Love
2002-10-25 22:19   ` chrisl
2002-10-25 22:14 ` Alan Cox
2002-10-25 22:06   ` Daniel Phillips
2002-10-25 22:10     ` Robert Love
2002-10-25 22:25       ` Jeff Garzik
2002-10-26  0:49   ` Rik van Riel
2002-10-26 15:45   ` Eric W. Biederman
2002-10-25 20:38 [PATCH] How to get number of physical CPU in linux from user space? Nakajima, Jun
2002-10-25 21:30 ` [PATCH] hyper-threading information in /proc/cpuinfo Robert Love
2002-10-25 21:39   ` Robert Love
2002-10-26  0:01   ` Dave Jones
2002-10-26  0:04     ` Jeff Garzik
2002-10-26  0:12       ` Dave Jones
2002-10-26  0:16         ` Jeff Garzik
2002-10-26  0:33           ` Robert Love

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=F2DBA543B89AD51184B600508B68D4000ECE70DA@fmsmsx103.fm.intel.com \
    --to=jun.nakajima@intel.com \
    --cc=akpm@digeo.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=chrisl@vmware.com \
    --cc=davej@codemonkey.org.uk \
    --cc=jgarzik@pobox.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mbligh@aracnet.com \
    --cc=rml@tech9.net \
    /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®