Date: Thu, 23 Nov 2000 14:35:30 -0600 From: Alan Cox <alc@cs.rice.edu> To: Mike Smith <msmith@freebsd.org>, Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz> Cc: current@freebsd.org Subject: Re: page coloring Message-ID: <20001123143530.E21300@cs.rice.edu>
next in thread | raw e-mail | index | archive | help
> Hi. > > Isn't the page coloring algoritm in _vm_page_list_find totally bogus? > No, it's not. The comment is, however, misplaced. It describes the behavior of an inline function in vm_page.h, and not the function it precedes. > It skips queue pq[index & PQ_L2_MASK]. > That's correct. The inline function vm_page_list_find() in vm_page.h has already failed to allocate a page of the desired color, index, and so _vm_page_list_find() is called to allocate a page of ANY other color it can find. Rather than choose a random page, the odd-looking loop in _vm_page_list_find() tries to find a page whose color is unlikely to equal the neighboring pages in the vm object if colored allocation for them succeeded. Alan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001123143530.E21300>