Re: [RFC][PATCH 1/3] radix priority search tree - objrmap complexity fix
From: Andrea Arcangeli
Date: Wed Mar 31 2004 - 21:04:44 EST
On Wed, Mar 31, 2004 at 05:51:13PM -0800, Andrew Morton wrote:
> Andrea Arcangeli <andrea@xxxxxxx> 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.
that is a specialized backdoor to do I/O on _private_ pages, it's not a
general-purpose library function for doing anonymous pages
swapin/swapout, infact the only user is swap susped and we'd better
forbid swap suspend to pass anonymous pages through that interface and
be sure that nobody will ever attempt anything like that.
that interface is useful only to reach the swap device, for doing I/O on
private pages outside the VM, in the old days that was used to
read/write the swap header (again on a private page), swap suspend is
using it for similar reasons on _private_ pages.
the idea of allowing people to do I/O on anonymous pages using that
interface sounds broken to me. Your code sounds overkill complicated
for allowing something that we definitely must forbid.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/