Re: [patch] delayed disk block allocation

From: Andrew Morton (akpm@zip.com.au)
Date: Mon Mar 04 2002 - 02:27:26 EST


Jeff Garzik wrote:
>
> ...
> >
> > You're not even trying to apply this to swap cache right now are you?
>
> This is a disagreement akpm and I have, actually :)
>

Misunderstanding, rather.

Swapfiles aren't interesting, IMO. And I agree that mkswap or swapon
should just barf if the file has any holes in it.

But what I refer to here is, simply, delayed allocate for swapspace.
So swap_out() sticks the target page into the swapcache, marks it
dirty and takes a space reservation for the page out of the swapcache's
address_space. But no disk space is allocated at swap_out() time.
Instead, the real disk mapping is created when the VM calls
a_ops->vm_writeback() against the swapcache page's address_space.

All of which rather implies a ripup-and-rewrite of half the swap
code. It would certainly require a new allocator. So I just mentioned
the possibility. Glad you're interested :)

-
-
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 : Thu Mar 07 2002 - 21:00:31 EST