From owner-freebsd-hackers Thu Nov 23 7:58:38 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from artax.karlin.mff.cuni.cz (artax.karlin.mff.cuni.cz [195.113.31.125]) by hub.freebsd.org (Postfix) with ESMTP id 8CAC437B4D7 for ; Thu, 23 Nov 2000 07:58:34 -0800 (PST) Received: from localhost (mikulas@localhost) by artax.karlin.mff.cuni.cz (8.9.3/8.9.3/Debian 8.9.3-21) with SMTP id QAA02410 for ; Thu, 23 Nov 2000 16:58:28 +0100 Date: Thu, 23 Nov 2000 16:58:28 +0100 (CET) From: Mikulas Patocka To: freebsd-hackers@freebsd.org Subject: page coloring Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi. Isn't the page coloring algoritm in _vm_page_list_find totally bogus? It skips queue pq[index & PQ_L2_MASK]. If it doesn't find page with desired color, it allocates page with nearest color - as a result there are two pages with same color mapped at two adjacent virtual adresses - this is the exact opposite of what page coloring should do! It should be changed to something like: for (i = PQ_L2_SIZE * PQ_PRIME1; i > 0; i -= PQ_PRIME1) if ((m = TAILQ_FIRST(&pq[(index + i) & PQ_L2_MASK].pl)) != NULL) break; Mikulas To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message