From owner-freebsd-current@FreeBSD.ORG Sun Jun 6 13:12:54 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5B87216A4D4; Sun, 6 Jun 2004 13:12:54 -0700 (PDT) Received: from cs.rice.edu (cs.rice.edu [128.42.1.30]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3266843D3F; Sun, 6 Jun 2004 13:12:54 -0700 (PDT) (envelope-from alc@cs.rice.edu) Received: from localhost (calypso.cs.rice.edu [128.42.1.127]) by cs.rice.edu (Postfix) with ESMTP id 91AA34ABA8; Sun, 6 Jun 2004 15:12:49 -0500 (CDT) Received: from cs.rice.edu ([128.42.1.30]) by localhost (calypso.cs.rice.edu [128.42.1.127]) (amavisd-new, port 10024) with LMTP id 17878-01-41; Sun, 6 Jun 2004 15:12:49 -0500 (CDT) Received: by cs.rice.edu (Postfix, from userid 19572) id 3F9684AB0E; Sun, 6 Jun 2004 15:12:49 -0500 (CDT) Date: Sun, 6 Jun 2004 15:12:49 -0500 From: Alan Cox To: Alexander Leidinger Message-ID: <20040606201249.GH24461@cs.rice.edu> References: <20040606142446.2900a97e@Magellan.Leidinger.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040606142446.2900a97e@Magellan.Leidinger.net> User-Agent: Mutt/1.4.2i X-Virus-Scanned: by amavis-20030616-p7 at cs.rice.edu cc: alc@freebsd.org cc: current@freebsd.org Subject: Re: comments in the page coloring options in /sys/conf/NOTES X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Jun 2004 20:12:54 -0000 On Sun, Jun 06, 2004 at 02:24:46PM +0200, Alexander Leidinger wrote: > Hi, > > the comments about the page coloring in the VM system seem to talk about > L2/L1 cache size combinations, e.g. PQ_CACHESIZE=512 for a 512k/16k > cache. The comment above the PQ_CACHESIZE line just talks about the size > of the L2 cache. > > If it indeed talks about L2/L1 combinations, we should make it explicit. > And what about a 512k/8k combination? > > If it just talks about the L2 cache size, what is the meaning of the > second number? My recent commit fixed a "syntax" error in the comments, specifically, a reference to a missing macro. The comments are, however, still "semantically" broken: 1. Cache size alone does not correctly determine the number of colors, except for direct map caches. The correct formula is (cache size in bytes / page size in bytes) / degree of cache associativity Thus, the comments would lead one to configure his/her system with too many colors. (Relative to configuring a system with too few colors, this is not so bad.) 2. The references to L1 should be removed. They are historical leftovers. To conclude, I would be thrilled if someone wanted to work on automating this. I don't think it's reasonable to expect users to configure this. Alan