From owner-cvs-src@FreeBSD.ORG Mon Oct 17 18:50:26 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 0BB1816A423; Mon, 17 Oct 2005 18:50:26 +0000 (GMT) (envelope-from obrien@NUXI.com) Received: from dragon.NUXI.org (trang.nuxi.com [66.93.134.19]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3EA8243D53; Mon, 17 Oct 2005 18:50:25 +0000 (GMT) (envelope-from obrien@NUXI.com) Received: from dragon.NUXI.org (obrien@localhost [127.0.0.1]) by dragon.NUXI.org (8.13.4/8.13.4) with ESMTP id j9HIoOWU001149; Mon, 17 Oct 2005 11:50:24 -0700 (PDT) (envelope-from obrien@dragon.NUXI.org) Received: (from obrien@localhost) by dragon.NUXI.org (8.13.4/8.13.1/Submit) id j9HIoOjq001148; Mon, 17 Oct 2005 11:50:24 -0700 (PDT) (envelope-from obrien) Date: Mon, 17 Oct 2005 11:50:24 -0700 From: "David O'Brien" To: Jung-uk Kim Message-ID: <20051017185024.GB97488@dragon.NUXI.org> References: <200510160858.j9G8wR9v045670@repoman.freebsd.org> <200510171200.49522.jkim@FreeBSD.org> <20051017172828.GB97278@dragon.NUXI.org> <200510171430.46431.jkim@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200510171430.46431.jkim@FreeBSD.org> X-Operating-System: FreeBSD 7.0-CURRENT Organization: The NUXI BSD Group X-Pgp-Rsa-Fingerprint: B7 4D 3E E9 11 39 5F A3 90 76 5D 69 58 D9 98 7A X-Pgp-Rsa-Keyid: 1024/34F9F9D5 User-Agent: Mutt/1.5.9i Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org 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 Reply-To: obrien@FreeBSD.org 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 18:50:26 -0000 On Mon, Oct 17, 2005 at 02:30:40PM -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? > > You still owe us this information. > > > > 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 > > Just for the people who still don't understand: > > Physical/Logical cores: 1/2 -> single core with HTT > Physical/Logical cores: 2/2 -> dual core without HTT > Physical/Logical cores: 2/4 -> dual core with HTT > > BTW, I just committed the following because this commit broke it: > http://docs.freebsd.org/cgi/mid.cgi?200510171551.j9HFpSRY074364 > > Now the per-CPU information is like this: > > Logical cores: 2 -> single core with HTT > Physical cores: 2 -> dual core without HTT This is the AMD case - this is what I [tried to] fixed. The correct output for my system is "Physical cores: 4". This is also given by: FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs so what additional information is being given to the user? A 1P/2C Athlon64 X2 system is identical to a 2P/1C Athlon-MP system. It is purely SMP and there is no preference to scheduling on either core. And one gets full performance by scheduling on both cores at the same time. > Physical cores: 2 -> dual core with HTT (two lines) > Logical cores: 4 This is the Intel case - my commit does not touch this. > > 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 > > This is NOT per-CPU info. Please explain what you are trying to achive. AMD sets CPUID.HTT solely for the benfit of licensing issues of Microsoft products and Red Hat. The FreeBSD license does not restrict the number of CPU's one can use. The FreeBSD kernel should pretend CPUID.HTT isn't set. In fact some Opteron BIOS's cause CPUID.HTT to not be set when using dual-core CPU's. -- -- David (obrien@FreeBSD.org)