From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 10 12:23:23 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BF41A16A4C0 for ; Fri, 10 Oct 2003 12:23:23 -0700 (PDT) Received: from arginine.spc.org (arginine.spc.org [195.206.69.236]) by mx1.FreeBSD.org (Postfix) with ESMTP id 58BE043FFB for ; Fri, 10 Oct 2003 12:23:07 -0700 (PDT) (envelope-from bms@spc.org) Received: from localhost (localhost [127.0.0.1]) by arginine.spc.org (Postfix) with ESMTP id AC06B654B2; Fri, 10 Oct 2003 20:23:05 +0100 (BST) Received: from arginine.spc.org ([127.0.0.1]) by localhost (arginine.spc.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 81531-03; Fri, 10 Oct 2003 20:23:05 +0100 (BST) Received: from saboteur.dek.spc.org (unknown [81.3.72.68]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by arginine.spc.org (Postfix) with ESMTP id EE50D65439; Fri, 10 Oct 2003 20:23:04 +0100 (BST) Received: by saboteur.dek.spc.org (Postfix, from userid 1001) id 915D814; Fri, 10 Oct 2003 20:23:03 +0100 (BST) Date: Fri, 10 Oct 2003 20:23:03 +0100 From: Bruce M Simpson To: Andrew Gallatin Message-ID: <20031010192303.GC2325@saboteur.dek.spc.org> Mail-Followup-To: Andrew Gallatin , freebsd-hackers@freebsd.org References: <20031010103640.6F5A216A4BF@hub.freebsd.org> <20031010134400.GE803@saboteur.dek.spc.org> <16263.1019.939450.708832@grasshopper.cs.duke.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <16263.1019.939450.708832@grasshopper.cs.duke.edu> cc: freebsd-hackers@freebsd.org Subject: Re: Determining CPU features / cache organization from userland X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Oct 2003 19:23:23 -0000 On Fri, Oct 10, 2003 at 03:09:47PM -0400, Andrew Gallatin wrote: > Bruce M Simpson writes: > > I've been thinking we should definitely make the cache organization > > info available via sysctl. I am thinking we should do this to make > > the UMA_ALIGN_CACHE definition mean something... > > If you do this, it may make sense to use the same names as MacOSX. > > Eg: > > g51% sysctl hw | grep cache > hw.cachelinesize: 128 > hw.l1icachesize: 65536 > hw.l1dcachesize: 32768 > hw.l2cachesize: 524288 Er, that's weird, considering POWER has the CLCS instruction which is intended to support variable cache line sizes. Doesn't POWER4 and POWER5 have a cache which is split in this way? Also can we assume they are the same for all CPUs in an SMP system? I'd like to think that that is the case. BMS