Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Nov 2000 16:58:28 +0100 (CET)
From:      Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
To:        freebsd-hackers@freebsd.org
Subject:   page coloring
Message-ID:  <Pine.LNX.3.96.1001123162401.737A-100000@artax.karlin.mff.cuni.cz>

next in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.3.96.1001123162401.737A-100000>