From owner-freebsd-hackers Mon Oct 7 18:26:52 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id SAA17191 for hackers-outgoing; Mon, 7 Oct 1996 18:26:52 -0700 (PDT) Received: from parkplace.cet.co.jp (parkplace.cet.co.jp [202.32.64.1]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id SAA17185 for ; Mon, 7 Oct 1996 18:26:49 -0700 (PDT) Received: from localhost (michaelh@localhost) by parkplace.cet.co.jp (8.8.0/CET-v2.1) with SMTP id BAA19878 for ; Tue, 8 Oct 1996 01:26:47 GMT Date: Tue, 8 Oct 1996 10:26:47 +0900 (JST) From: Michael Hancock To: FreeBSD Hackers Subject: Determining L2 cache size Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Being able to probe for cache size would be a good thing for things like page coloring, etc. I've been looking around to see if it's being done elsewhere. I noticed UnixWare has a /system/processor fs which stores characteristics of the CPU. It has a field for cachesize. I'm not sure if it's being used for the Intel architecture, I'll have to probe a little bit... typedef struct procfile { int status; int chip; int clockspeed; /* in MHz */ int cachesize; /* in Kbytes */ int fpu; int bdrivers; timestruc_t modtime; } procfile_t; Regards, Mike Hancock