public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Pinning kernel memory
@ 2002-12-12 17:00 Thomas Schlichter
  2002-12-12 20:15 ` Rik van Riel
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Schlichter @ 2002-12-12 17:00 UTC (permalink / raw)
  To: linux-kernel

Hello,

I want to create a big area of unswappable, physical continuous kernel memory
for hardware testing purposes. Currently I allocate the memory using
alloc_pages(GFP_KERNEL, order) and after this I pin it using
SetPageReserved(page) for each page.

Is this acceptable, or may it happen that after the alloc_pages()-call the
kswapd begins to swap out this memory and just any other memory is pinned??
Do I perhaps have to lock the mm->page_table_lock and test each page before I
pin it?? If it is swapped out, how can I assure to get this page back swapped
in?

is SetPageReserved the right way to pin a memory page, or should
SetPageActive(page) or even LockPage(page) be used??

I hope anyone can help me...
Thank you!

Sincerely yours
  Thomas Schlichter

^ permalink raw reply	[flat|nested] 4+ messages in thread
* Pinning kernel memory
@ 2002-12-12 16:58 Thomas Schlichter
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Schlichter @ 2002-12-12 16:58 UTC (permalink / raw)
  To: linux-kernel

Hello,

I want to create a big area of unswappable, physical continuous kernel memory
for hardware testing purposes. Currently I allocate the memory using
alloc_pages(GFP_KERNEL, order) and after this I pin it using
SetPageReserved(page) for each page.

Is this acceptable, or may it happen that after the alloc_pages()-call the
kswapd begins to swap out this memory and just any other memory is pinned??
Do I perhaps have to lock the mm->page_table_lock and test each page before I
pin it?? If it is swapped out, how can I assure to get this page back swapped
in?

is SetPageReserved the right way to pin a memory page, or should
SetPageActive(page) or even LockPage(page) be used??

I hope anyone can help me...
Thank you!

Sincerely yours
  Thomas Schlichter

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-12-12 20:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-12-12 17:00 Pinning kernel memory Thomas Schlichter
2002-12-12 20:15 ` Rik van Riel
2002-12-12 21:04   ` Thomas Schlichter
  -- strict thread matches above, loose matches on Subject: below --
2002-12-12 16:58 Thomas Schlichter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox