From owner-svn-src-head@FreeBSD.ORG Mon Apr 20 13:39:44 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2108A1065687; Mon, 20 Apr 2009 13:39:44 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id E9A7D8FC1F; Mon, 20 Apr 2009 13:39:43 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id 9E01E46B23; Mon, 20 Apr 2009 09:39:43 -0400 (EDT) Date: Mon, 20 Apr 2009 14:39:43 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Bruce Evans In-Reply-To: <20090420174802.F58065@delplex.bde.org> Message-ID: References: <200904192019.n3JKJDa6019179@svn.freebsd.org> <20090420174802.F58065@delplex.bde.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) 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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2009 13:39:48 -0000 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. 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). Robert N M Watson Computer Laboratory University of Cambridge