Re: [RFC][PATCH 1/1] Expose per-node reclaim and migration to userspace

KAMEZAWA Hiroyuki
2006-11-30T00:18:15Z

On Tue, 28 Nov 2006 19:06:56 -0800
menage@google.com wrote:

>
> + for (i = 0; i < pgdat->node_spanned_pages; ++i) {
> + struct page *page = pgdat_page_nr(pgdat, i);
you need pfn_valid() check before accessing page struct.

> + if (!isolate_lru_page(page, &pagelist)) {
you'll see panic if !PageLRU(page).

looks scanning zone's lru list is more suitable for your purpose.

-Kame