* exported version of page_is_ram?
@ 2008-05-05 17:58 Timur Alperovich
2008-05-05 19:50 ` Arjan van de Ven
0 siblings, 1 reply; 4+ messages in thread
From: Timur Alperovich @ 2008-05-05 17:58 UTC (permalink / raw)
To: linux-kernel
Hi,
I need to check if a given page is in ram or not. It seems that
page_is_ram does the trick, but since it's not exported, I end up with
"unknown symbol" errors when I try to insert the module. I'm trying to
hash the contents of every page in physical memory, and iterating
through pages from 0 to num_physpages, while checking if they are
actually in ram seemed reasonable. Is there a better way to do it or
is there another function rather than page_is_ram that can do the
trick?
Thank you,
Timur
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: exported version of page_is_ram?
2008-05-05 17:58 exported version of page_is_ram? Timur Alperovich
@ 2008-05-05 19:50 ` Arjan van de Ven
2008-05-05 21:13 ` Timur Alperovich
0 siblings, 1 reply; 4+ messages in thread
From: Arjan van de Ven @ 2008-05-05 19:50 UTC (permalink / raw)
To: Timur Alperovich; +Cc: linux-kernel
On Mon, 5 May 2008 13:58:59 -0400
"Timur Alperovich" <timur.alperovich@gmail.com> wrote:
> Hi,
>
> I need to check if a given page is in ram or not. It seems that
> page_is_ram does the trick, but since it's not exported, I end up with
> "unknown symbol" errors when I try to insert the module. I'm trying to
> hash the contents of every page in physical memory, and iterating
> through pages from 0 to num_physpages, while checking if they are
> actually in ram seemed reasonable. Is there a better way to do it or
> is there another function rather than page_is_ram that can do the
> trick?
sounds like the right way is to make a "for each ram page" function
in the core, export_symbol_gpl that so that you can then use that...
We could even make it scale and numa friendly in the core that way.
Do you have a url for your code?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: exported version of page_is_ram?
2008-05-05 19:50 ` Arjan van de Ven
@ 2008-05-05 21:13 ` Timur Alperovich
2008-05-06 13:56 ` Arjan van de Ven
0 siblings, 1 reply; 4+ messages in thread
From: Timur Alperovich @ 2008-05-05 21:13 UTC (permalink / raw)
To: Arjan van de Ven; +Cc: linux-kernel
I put the whole driver on pastebin http://pastebin.com/m24c50118
For now I tried to use the code for page_is_ram in there, only to
realize that e820 struct is also not exported. Is there a way to do
this with the existing code in the kernel, since I'd like the code to
run on older 2.6 kernels as well?
Timur
On Mon, May 5, 2008 at 3:50 PM, Arjan van de Ven <arjan@infradead.org> wrote:
>
> On Mon, 5 May 2008 13:58:59 -0400
> "Timur Alperovich" <timur.alperovich@gmail.com> wrote:
>
> > Hi,
> >
> > I need to check if a given page is in ram or not. It seems that
> > page_is_ram does the trick, but since it's not exported, I end up with
> > "unknown symbol" errors when I try to insert the module. I'm trying to
> > hash the contents of every page in physical memory, and iterating
> > through pages from 0 to num_physpages, while checking if they are
> > actually in ram seemed reasonable. Is there a better way to do it or
> > is there another function rather than page_is_ram that can do the
> > trick?
>
> sounds like the right way is to make a "for each ram page" function
> in the core, export_symbol_gpl that so that you can then use that...
> We could even make it scale and numa friendly in the core that way.
>
> Do you have a url for your code?
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: exported version of page_is_ram?
2008-05-05 21:13 ` Timur Alperovich
@ 2008-05-06 13:56 ` Arjan van de Ven
0 siblings, 0 replies; 4+ messages in thread
From: Arjan van de Ven @ 2008-05-06 13:56 UTC (permalink / raw)
To: Timur Alperovich; +Cc: linux-kernel
On Mon, 5 May 2008 17:13:46 -0400
"Timur Alperovich" <timur.alperovich@gmail.com> wrote:
> I put the whole driver on pastebin http://pastebin.com/m24c50118
> For now I tried to use the code for page_is_ram in there, only to
> realize that e820 struct is also not exported. Is there a way to do
> this with the existing code in the kernel, since I'd like the code to
> run on older 2.6 kernels as well?
to be honest, the real solution would be to make an "for each memory
page" iterator in the main kernel...
working on older kernels isn't going to fly though that way;(
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-05-06 13:56 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-05 17:58 exported version of page_is_ram? Timur Alperovich
2008-05-05 19:50 ` Arjan van de Ven
2008-05-05 21:13 ` Timur Alperovich
2008-05-06 13:56 ` Arjan van de Ven
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox