From owner-cvs-src@FreeBSD.ORG Mon Oct 17 20:32:53 2005 Return-Path: X-Original-To: cvs-src@FreeBSD.ORG Delivered-To: cvs-src@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8404616A420; Mon, 17 Oct 2005 20:32:53 +0000 (GMT) (envelope-from wb@freebie.xs4all.nl) Received: from smtp-vbr1.xs4all.nl (smtp-vbr1.xs4all.nl [194.109.24.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id A8CAD43D46; Mon, 17 Oct 2005 20:32:52 +0000 (GMT) (envelope-from wb@freebie.xs4all.nl) Received: from freebie.xs4all.nl (freebie.xs4all.nl [213.84.32.253]) by smtp-vbr1.xs4all.nl (8.13.3/8.13.3) with ESMTP id j9HKWoJa029600; Mon, 17 Oct 2005 22:32:50 +0200 (CEST) (envelope-from wb@freebie.xs4all.nl) Received: from freebie.xs4all.nl (localhost [127.0.0.1]) by freebie.xs4all.nl (8.13.3/8.13.3) with ESMTP id j9HKWo2G022921; Mon, 17 Oct 2005 22:32:50 +0200 (CEST) (envelope-from wb@freebie.xs4all.nl) Received: (from wb@localhost) by freebie.xs4all.nl (8.13.3/8.13.1/Submit) id j9HKWoaU022920; Mon, 17 Oct 2005 22:32:50 +0200 (CEST) (envelope-from wb) Date: Mon, 17 Oct 2005 22:32:50 +0200 From: Wilko Bulte To: John Baldwin Message-ID: <20051017203250.GA22904@freebie.xs4all.nl> References: <200510160858.j9G8wR9v045670@repoman.freebsd.org> <20051017183139.GA97488@dragon.NUXI.org> <1129576130.1152.30.camel@leguin> <200510171554.46682.jhb@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200510171554.46682.jhb@freebsd.org> X-OS: FreeBSD 5.4-STABLE User-Agent: Mutt/1.5.9i X-Virus-Scanned: by XS4ALL Virus Scanner Cc: src-committers@FreeBSD.ORG, cvs-src@FreeBSD.ORG, Eric Anholt , obrien@FreeBSD.ORG, cvs-all@FreeBSD.ORG, Jung-uk Kim Subject: Re: cvs commit: src/sys/amd64/amd64 identcpu.c src/sys/i386/i386 identcpu.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Oct 2005 20:32:53 -0000 On Mon, Oct 17, 2005 at 03:54:44PM -0400, John Baldwin wrote.. > On Monday 17 October 2005 03:08 pm, Eric Anholt wrote: > > On Mon, 2005-10-17 at 11:31 -0700, David O'Brien wrote: > > > On Mon, Oct 17, 2005 at 02:17:33PM -0400, Jung-uk Kim wrote: > > > > On Monday 17 October 2005 01:28 pm, David O'Brien wrote: > > > > > On Mon, Oct 17, 2005 at 12:00:47PM -0400, Jung-uk Kim wrote: > > > > > > On Sunday 16 October 2005 04:58 am, David E. O'Brien wrote: > > > > > > > obrien 2005-10-16 08:58:27 UTC > > > > > > > > > > > > > > FreeBSD src repository > > > > > > > > > > > > > > Modified files: > > > > > > > sys/amd64/amd64 identcpu.c > > > > > > > sys/i386/i386 identcpu.c > > > > > > > Log: > > > > > > > For AMD processors, nullify CPUID.HTT. FreeBSD has no need > > > > > > > for the information it conveys, and it is only confusing > > > > > > > people. This fixes incorrect output in the previous commit. > > > > > > > > > > > > > > Revision Changes Path > > > > > > > 1.138 +9 -0 src/sys/amd64/amd64/identcpu.c > > > > > > > 1.147 +9 -0 src/sys/i386/i386/identcpu.c > > > > > > > > > > > > Have you verified you are not breaking `logical_cpus' in > > > > > > mp_machdep.c by doing this? > > > > > > > > > > > > Show me the 'incorrect' output or please back it out. > > > > > > > > > > CPU: Dual Core AMD Opteron(tm) Processor 280 (2392.35-MHz > > > > > K8-class CPU) .. > > > > > Physical/Logical cores: 2/2 > > > > > .. > > > > > FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs > > > > > cpu0 (BSP): APIC ID: 0 > > > > > cpu1 (AP): APIC ID: 1 > > > > > cpu2 (AP): APIC ID: 2 > > > > > cpu3 (AP): APIC ID: 3 > > > > > > > > > > I sure as hell have 4 physical cores and no logical cores. > > > > > > > > The information is per-CPU. You have two CPUs with dual cores, which > > > > means the given information is correct. Please back it out. > > > > > > No, this given information is wrong. AMD does not have HyperThreading. > > > You are treating it as if it does. The rest of the kernel also should > > > not be trying to treat AMD dual-core as HyperThreading. > > > > > > The only thing that should care in the freebsd kernel right now about AMD > > > dual-core is PowerNow! support. It probably needs to know what cores > > > match physical cores so it can proper work in a multi-socket system. > > > > > > Please point to what part of `logical_cpus' in mp_machdep.c you feel is > > > broken by this change. > > > > > > > > I do not think you fully understand what AMD dual-core CPU's. > > > > > > > > Oh, please... > > > > > > The code you committed suggest this... > > > > Apparently David interpeted the "Physical/Logical cores: 2/2" as two > > physical cores plus two additional logical cores. I didn't, but I could > > see how (since this per-cpu information printed isn't actually printed > > per cpu) it could be interpreted this way on a dual-cpu system. > > > > I think that this would be useful information to be printing in general > > (not just on really-HTT systems), since it would clarify what seeing > > "cpu[0-3]: APIC ID..." printed out actually means when you're just > > taking a look at some system and wondering how many cores it has. > > > > How hard would it be to do the cpuid per-cpu? Would it be sane to > > assume that the cpuid output of the other CPUs will be the same (pretty > > sure that's not the case), or at least that the multicore and HTT info > > will be the same? And would there be a better wording to prevent > > confusion? > > Doing it for each CPU would really bloat the output, and in practice I don't > think would buy us anything. Note that the code assumes the package topology > is uniform as well, not just the printfs. :) 'psrinfo' anyone? -- Wilko Bulte wilko@FreeBSD.org