Subject: Re: uvm_page_physload
To: None <skrll@NetBSD.org>
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
List: tech-kern
Date: 08/25/2006 22:52:25
skrll@NetBSD.org wrote:

> Is end/avail_end inclusive or not?

uvm/uvm_page.c has the following comment:
>>  * uvm_page_physload: load physical memory into VM system
>>  *
>>  * => all args are PFs
>>  * => all pages in start/end get vm_page structures
>>  * => areas marked by avail_start/avail_end get added to the free page pool
>>  * => we are limited to VM_PHYSSEG_MAX physical memory segments

It looks struct vm_page is prepared for pages between start and end,
and only pages between avail_start and avail_end are registered into
the free page pool.

But I'm not sure whether it's worth to have struct vm_page for
pages which aren't free. Actually many ports don't register
memory where kernel itself is loaded (or memory for msgbuf
which is not managed), for example.
---
Izumi Tsutsui