From owner-freebsd-arch@FreeBSD.ORG Tue Apr 14 14:16:11 2009 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5E9001065676; Tue, 14 Apr 2009 14:16:11 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from redbull.bpaserver.net (redbullneu.bpaserver.net [213.198.78.217]) by mx1.freebsd.org (Postfix) with ESMTP id EA4898FC14; Tue, 14 Apr 2009 14:16:10 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from outgoing.leidinger.net (pD9E2E7C5.dip.t-dialin.net [217.226.231.197]) by redbull.bpaserver.net (Postfix) with ESMTP id 206672E2D9; Tue, 14 Apr 2009 16:00:11 +0200 (CEST) Received: from webmail.leidinger.net (webmail.leidinger.net [192.168.1.102]) by outgoing.leidinger.net (Postfix) with ESMTP id DDA12ABF18; Tue, 14 Apr 2009 16:00:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=Leidinger.net; s=outgoing-alex; t=1239717607; bh=anfRN9Ge/onLwwDqBPw4J4UttMfBaRNYt ndD0bPtYOg=; h=Message-ID:Date:From:To:Cc:Subject:References: In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=kkKsYyLPsLw8TLnRU1cgRMxPm9z/sdNQjqgAiS8HqYPedg4KtiKRt/4VXLLsTkBq5 6uzkwMWiV8YA6HlEy9GPWuB25IG+v7MO4JpivecY34TImAE2bZ+9j+pVxV/Ms4Zkhot YuazendV3Vwb7CYWTpBDV+Ews0crFSJBl25jMXN3kDVZxyIiSt2cskzt8N6Ln+RUTeo rhivYtg3F8aKjPM8oI4CjZbvztQqtwJfV6lrxdiDoBns6giqZDvn1jLGfFngi1gVhOw bxsj3p3TEhE4/XQ1eQoNUKI3mEaews62QpDiKw8dZvWGwTUIU9JJQ7ajFwYXvRljf4A ewMu7vEDg== Received: (from www@localhost) by webmail.leidinger.net (8.14.3/8.13.8/Submit) id n3EE07MG066654; Tue, 14 Apr 2009 16:00:07 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Received: from pslux.cec.eu.int (pslux.cec.eu.int [158.169.9.14]) by webmail.leidinger.net (Horde Framework) with HTTP; Tue, 14 Apr 2009 16:00:07 +0200 Message-ID: <20090414160007.15649rsc2fuyqxnk@webmail.leidinger.net> X-Priority: 3 (Normal) Date: Tue, 14 Apr 2009 16:00:07 +0200 From: Alexander Leidinger To: Marko Zec References: <200904140842.46501.zec@freebsd.org> In-Reply-To: <200904140842.46501.zec@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable User-Agent: Internet Messaging Program (IMP) H3 (4.3) / FreeBSD-8.0 X-BPAnet-MailScanner-Information: Please contact the ISP for more information X-MailScanner-ID: 206672E2D9.778AE X-BPAnet-MailScanner: Found to be clean X-BPAnet-MailScanner-SpamCheck: not spam, ORDB-RBL, SpamAssassin (not cached, score=-14.9, required 6, BAYES_00 -15.00, DKIM_SIGNED 0.00, DKIM_VERIFIED -0.00, RDNS_DYNAMIC 0.10) X-BPAnet-MailScanner-From: alexander@leidinger.net X-Spam-Status: No Cc: freebsd-arch@freebsd.org Subject: Re: Simple #define for cache line size X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Apr 2009 14:16:11 -0000 Quoting Marko Zec (from Tue, 14 Apr 2009 08:42:46 +0200): > On Monday 13 April 2009 23:01:23 Ivan Voras wrote: >> Robert Watson wrote: >> > --- i386/include/param.h (revision 190941) >> > +++ i386/include/param.h (working copy) >> > @@ -74,6 +74,10 @@ >> > #define ALIGNBYTES _ALIGNBYTES >> > #define ALIGN(p) _ALIGN(p) >> > >> > +#ifndef CACHE_LINE_SIZE >> > +#define CACHE_LINE_SIZE 64 >> > +#endif >> >> Wouldn't it be better to continue the >> >> cpu I486_CPU >> cpu I586_CPU >> cpu I686_CPU >> >> series of defines in kernel configuration and define alignment per >> CPU architecture? > > We would have to extend our notion of "CPU architecture" for that to > make sense. For example, Pentium Pro / II CPUs had cache line size of > 32 bytes, Intel Netburst CPUs (all Pentium-4 and Xeons of the time) > have / had 128 bytes, while Pentium-III, Pentium-M and later Core CPUs > have 64 bytes. They are all I686_CPU in our view. I missed the beginning of the discussion. AFAIR we had some code which =20 determined the cache parameters at run time at least on i386. It may =20 be the case that this was removed when the VM system changed to not =20 need the page coloring we had. If this is the case, it may be =20 beneficial to look up the VCS history and resurrect this. Bye, Alexander. --=20 These days the necessities of life cost you about three times what they used to, and half the time they aren't even fit to drink. http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID =3D B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID =3D 72077137