After getting a page from alloc_pages(mask, order), is it necessary to lock the page to prevent it from being swapped out? Can I assume that I already have exclusive access to the page? Can I assume that the page is free and no other kernel control paths would use it?
Any help would be greatly appreciated
Thanks
__________________________________________________________________
Your favorite stores, helpful shopping tools and great gift ideas. Experience the convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/
Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/
On Friday 27 July 2001 04:55, [email protected] wrote:
> After getting a page from alloc_pages(mask, order), is it necessary
> to lock the page to prevent it from being swapped out? Can I assume
> that I already have exclusive access to the page? Can I assume that
> the page is free and no other kernel control paths would use it?
You alloced it, it's yours. You haven't entered it into any managed
structure like the page cache, it's not on a lru list so it won't be
scanned by reclaim, and no page table entry points at it (except for
the kernel's own linear mapping if it's not a highuser page) so
virtual scanning won't find it either.
--
Daniel