From owner-svn-src-all@FreeBSD.ORG Mon Apr 20 08:00:12 2009 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AC9FF106564A; Mon, 20 Apr 2009 08:00:12 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail08.syd.optusnet.com.au (mail08.syd.optusnet.com.au [211.29.132.189]) by mx1.freebsd.org (Postfix) with ESMTP id 26DA98FC14; Mon, 20 Apr 2009 08:00:11 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c122-107-120-227.carlnfd1.nsw.optusnet.com.au (c122-107-120-227.carlnfd1.nsw.optusnet.com.au [122.107.120.227]) by mail08.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id n3K805js016489 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 20 Apr 2009 18:00:08 +1000 Date: Mon, 20 Apr 2009 18:00:05 +1000 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Robert Watson In-Reply-To: <200904192019.n3JKJDa6019179@svn.freebsd.org> Message-ID: <20090420174802.F58065@delplex.bde.org> References: <200904192019.n3JKJDa6019179@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r191276 - in head/sys: amd64/include arm/include i386/include ia64/include mips/include powerpc/include sparc64/include sun4v/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2009 08:00:13 -0000 On Sun, 19 Apr 2009, Robert Watson wrote: > Log: > For each architecture, define CACHE_LINE_SHIFT and a derived > CACHE_LINE_SIZE constant. These constants are intended to > over-estimate the cache line size, and be used at compile-time > when a run-time tuning alternative isn't appropriate or > available. > > Defaults for all architectures are 64 bytes, except powerpc > where it is 128 bytes (used on G5 systems). > ... > Modified: head/sys/amd64/include/param.h > ============================================================================== > --- head/sys/amd64/include/param.h Sun Apr 19 18:23:23 2009 (r191275) > +++ head/sys/amd64/include/param.h Sun Apr 19 20:19:13 2009 (r191276) > @@ -89,6 +89,10 @@ > #define ALIGN(p) _ALIGN(p) > #define ALIGNED_POINTER(p,t) _ALIGNED_POINTER(p,t) > > +#ifndef CACHE_LINE_SHIFT > +#define CACHE_LINE_SHIFT 6 > +#endif > +#define CACHE_LINE_SIZE (1 << CACHE_LINE_SHIFT) This still has the bogus ifdef. Overriding the definition is difficult to do consistently even in a kernel with no modules, since CACHE_LINE_SIZE is not a kernel option. Overriding the definition makes negative sense since the value is a maximum-maximum (possibly larger than strictly needed) so that it can be constant. Bruce