Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Oct 2005 08:37:15 -0700
From:      "David O'Brien" <obrien@FreeBSD.org>
To:        Jung-uk Kim <jkim@FreeBSD.org>
Cc:        cvs-src@FreeBSD.org, Eric Anholt <eta@lclark.edu>, cvs-all@FreeBSD.org, src-committers@FreeBSD.org
Subject:   Re: cvs commit: src/sys/amd64/amd64 identcpu.c src/sys/i386/i386 identcpu.c
Message-ID:  <20051018153715.GE84920@dragon.NUXI.org>
In-Reply-To: <200510171642.26719.jkim@FreeBSD.org>
References:  <200510160858.j9G8wR9v045670@repoman.freebsd.org> <1129576130.1152.30.camel@leguin> <200510171554.46682.jhb@freebsd.org> <200510171642.26719.jkim@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Oct 17, 2005 at 04:42:24PM -0400, Jung-uk Kim wrote:
> The patch is attached.  Please review.

It would be nice if you'd wait more than a few hours before committing
something when you've asked for a review of it...
especially when the discussion is still on-going.

The patch you committed added nothing.  Unless you think the user does
not understand the meaning of the word "dual".  What is missing is the
number of _packages_ (populated sockets) in the system.

 CPU: Dual Core AMD Opteron(tm) Processor 280 (2394.49-MHz K8-class CPU)
   ..
   Found 2 sockets with 2 cores per package

seems a more informative output for the user.

Quick prototype:

Index: sys/amd64/amd64/identcpu.c
===================================================================
RCS file: /home/ncvs/src/sys/amd64/amd64/identcpu.c,v
retrieving revision 1.140
diff -u -u -1 -r1.140 identcpu.c
--- sys/amd64/amd64/identcpu.c	17 Oct 2005 23:23:20 -0000	1.140
+++ sys/amd64/amd64/identcpu.c	18 Oct 2005 15:30:16 -0000
@@ -51,2 +51,3 @@
 #include <sys/power.h>
+#include <sys/smp.h>
 
@@ -360,3 +361,4 @@
 			if (cmp > 1)
-				printf("\n  Cores per package: %d", cmp);
+				printf("\n  Found %d sockets with %d cores per package",
+				    mp_ncpus / cmp, cmp);
 			if ((htt / cmp) > 1)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051018153715.GE84920>