Re: [RFC][PATCH 1/3] radix priority search tree - objrmap complexity fix

Andrew Morton
2004-04-01T01:51:13Z

Andrea Arcangeli <andrea@suse.de> wrote:
>
> > Doing a __GFP_FS allocation while holding lock_page() is worrisome. It's
> > OK if that page is private, but how do we know that the caller didn't pass
> > us some page which is on the LRU?
>
> it _has_ to be private if it's using rw_swap_page_sync. How can a page
> be in a lru if we're going to execute add_to_page_cache on it? That
> would be pretty broken in the first place.

An anonymous user page meets these requirements. A did say "anal", but
rw_swap_page_sync() is a general-purpose library function and we shouldn't
be making assumptions about the type of page which the caller happens to be
feeding us.