Re: Lock the page

From: Daniel Phillips (phillips@bonn-fries.net)
Date: Fri Jul 27 2001 - 07:56:21 EST


On Friday 27 July 2001 04:55, hochakhung@netscape.net 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
-
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/



This archive was generated by hypermail 2b29 : Tue Jul 31 2001 - 21:00:31 EST