Messages in this thread | | | From | Thomas Schlichter <> | Date | Thu, 12 Dec 2002 18:00:49 +0100 | Subject | Pinning kernel memory |
| |
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 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |