From owner-freebsd-current@FreeBSD.ORG Wed Jun 16 16:36:06 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 31A4016A4CE for ; Wed, 16 Jun 2004 16:36:06 +0000 (GMT) Received: from blake.polstra.com (blake.polstra.com [64.81.189.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id C76CB43D31 for ; Wed, 16 Jun 2004 16:36:05 +0000 (GMT) (envelope-from jdp@polstra.com) Received: from strings.polstra.com (dsl081-189-067.sea1.dsl.speakeasy.net [64.81.189.67]) by blake.polstra.com (8.12.11/8.12.11) with ESMTP id i5GGZeaP061296 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 16 Jun 2004 09:35:41 -0700 (PDT) (envelope-from jdp@strings.polstra.com) Received: (from jdp@localhost) by strings.polstra.com (8.12.11/8.12.11/Submit) id i5GGZekk052918; Wed, 16 Jun 2004 09:35:40 -0700 (PDT) (envelope-from jdp) Message-ID: X-Mailer: XFMail 1.5.5 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <40D07430.1070504@raadradd.com> Date: Wed, 16 Jun 2004 09:35:40 -0700 (PDT) From: John Polstra To: Radek Kozlowski X-Bogosity: No, tests=bogofilter, spamicity=0.499822, version=0.14.5 cc: Alexander Leidinger cc: current@freebsd.org Subject: Re: How to determine the L2 cache size on non-AMD CPUs (automatic page queue color tuning)? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jun 2004 16:36:06 -0000 On 16-Jun-2004 Radek Kozlowski wrote: > On 2004.06.16 18:11, John Polstra wrote: >> >> Check out the "misc/cpuid" port. Here's some sample output from a >> PIII system. Cache information is at the end. >> > > The latest version of cpuid is from 2002 and at least for my Athlon XP-M > processor it doesn't read the information about L2 cache correctly. > IIRC, for my L2 size it only takes one byte from the beginning of ecx > register, whereas in my case it is stored in two, a.s.o. So I wouldn't > rely on cpuid when it comes to newer CPUs. Yes, but it gives working code that generally shows how to get the information. Here's a link to an Intel document "Intel(R) Processor Idientification and the CPUID Instruction" that covers the newer CPUs: http://www.intel.com/design/Xeon/applnots/24161825.pdf John