From owner-svn-src-all@FreeBSD.ORG Tue Apr 21 10:11:46 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 59CAE1065672; Tue, 21 Apr 2009 10:11:46 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail02.syd.optusnet.com.au (mail02.syd.optusnet.com.au [211.29.132.183]) by mx1.freebsd.org (Postfix) with ESMTP id CB9518FC13; Tue, 21 Apr 2009 10:11:45 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from besplex.bde.org (c122-107-120-227.carlnfd1.nsw.optusnet.com.au [122.107.120.227]) by mail02.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id n3LABfYH025598 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 21 Apr 2009 20:11:43 +1000 Date: Tue, 21 Apr 2009 20:11:41 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Robert Watson In-Reply-To: Message-ID: <20090421200012.I3341@besplex.bde.org> References: <200904192019.n3JKJDa6019179@svn.freebsd.org> <20090420174802.F58065@delplex.bde.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, Bruce Evans 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: Tue, 21 Apr 2009 10:11:46 -0000 On Mon, 20 Apr 2009, Robert Watson wrote: > On Mon, 20 Apr 2009, Bruce Evans wrote: > >>> +#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. > > OK, I've made this change. Thanks. > My hope is that most applications don't resort to > including sys/param.h and using CACHE_LINE_SIZE -- most will be able to query > it at run-time using interfaces we don't yet have (such as sysconf(3) and > some appropriate constant). I also hope that most kernel consumers will be > able to use a run-time tuned version (which we also don't yet have). You could make (have made) it __CACHE_LINE_SIZE to inhibit use. Bruce