[<prev] [next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.00.1011121033340.5830@chino.kir.corp.google.com>
Date: Fri, 12 Nov 2010 10:36:14 -0800 (PST)
From: David Rientjes <rientjes@...gle.com>
To: Artur Baruchi <mail.baruchi@...il.com>
cc: linux-kernel@...r.kernel.org
Subject: Re: mem_map array on NUMA
On Fri, 12 Nov 2010, Artur Baruchi wrote:
> Hi David.
>
> Thanks for your answer.
>
> Basically, I would like to get information about memory pages, without
> "worry" about which zone its owned. I tried to use the code you've send, but
> some macros are not beeing exported by the Kernel (I cannot use it in
> drivers/modules). Im facing the follow errors:
>
> *WARNING: "next_zone" [/root/DRIVER/xxxxxxxx.ko] undefined!
> WARNING: "first_online_pgdat" [/root/DRIVER/**xxxxxxxx.ko**] undefined!*
>
> Do you have any idea about how can I handle this error?
>
For your use-case, you can simply iterate through each pfn without
worrying about their zones, something like:
unsigned long pfn;
for (pfn = 0; pfn < max_pfn; pfn++) {
struct page *page;
if (!pfn_valid(pfn))
continue;
page = pfn_to_page(pfn);
/* do something with page */
}
> Thanks in advance.
>
> Att.
> Artur Baruchi
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists