From owner-freebsd-hackers@FreeBSD.ORG Sun Mar 27 03:08:36 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B4E2316A4CE for ; Sun, 27 Mar 2005 03:08:36 +0000 (GMT) Received: from f31.mail.ru (f31.mail.ru [194.67.57.70]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3FA0943D39 for ; Sun, 27 Mar 2005 03:08:36 +0000 (GMT) (envelope-from shmukler@mail.ru) Received: from mail by f31.mail.ru with local id 1DFO8g-000CQA-00; Sun, 27 Mar 2005 07:08:34 +0400 Received: from [24.185.245.215] by win.mail.ru with HTTP; Sun, 27 Mar 2005 07:08:34 +0400 From: Igor Shmukler To: Bao Zhao Mime-Version: 1.0 X-Mailer: mPOP Web-Mail 2.19 X-Originating-IP: [24.185.245.215] Date: Sun, 27 Mar 2005 07:08:34 +0400 In-Reply-To: <20050327021228.84358.qmail@web31710.mail.mud.yahoo.com> Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 8bit Message-Id: cc: freebsd-hackers@freebsd.org Subject: Re[2]: relation between PQ_CACHESIZE and PQ_L2_SIZE X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Igor Shmukler List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Mar 2005 03:08:36 -0000 > http://lists.freebsd.org/mailman/htdig/freebsd-hackers/2003-June/001655.html > But what puzzled me is : why not page size is a > factor when calculating the number of colors? Page coloring in freebsd was implemented by John Dyson. It is needed to better utilize the cache. Depending on cache's implementation fully-associative vs. 4-way vs 2-way etc you might have problems. A subset of bits (low-bits) from the page frame's (physical) address tells us where can data be stored in processor cache. We want a relatively equal distribution of these "colors" so that we utilize as much of cache real estate as possible. Hence, we are interested in the size of a set, not size of a page. I am sure, there are whole bunch of articles written about this. I could give you some pointers offline. Igor.