when to mark reserved low memory pages
Benjamin Herrenschmidt
benh at kernel.crashing.org
Sat Sep 25 12:15:54 EST 2004
On Sat, 2004-09-25 at 09:14, John Rose wrote:
> We have a need to mark a certain range of low memory (alloc_bootmem)
> pages as reserved, similar to the way that kernel pages are marked
> reserved in mem_init(). The region is question is rtas_rmo_buf, if
> you're curious.
>
> So would mem_init() be the appropriate place to do this, and if so,
> should it also be done in the CONFIG_DISCONTIG case?
Why ? because they get freed when you mmap them and later quit the
userland process ? In this case, the option of marking them reserved
might lead to an ever increasing page count (or not), make very sure
of that, as get_page() will increase count but free_page() will not
decrease it for a reserved page.
For similar cases, what I did rather than marking them reserved was
to do a get_page() early so that the kernel always holds a reference
Ben.
More information about the Linuxppc64-dev
mailing list