Re: Swap clustering with new VM

From: Stephen C. Tweedie (sct@redhat.com)
Date: Tue Jul 11 2000 - 04:36:55 EST


Hi,

On Sun, Jul 09, 2000 at 10:53:35PM +0200, Andrea Arcangeli wrote:
> On Sun, 9 Jul 2000, Marcelo Tosatti wrote:
>
> >AFAIK XFS's pagebuf structure contains a list of contiguous on-disk
> >buffers, so the filesystem can do IO on a pagebuf structure avoiding disk
> >seek time.
> >
> >Do you plan to fix the swap clustering problem with a similar idea?
>
> I don't know pagebuf well enough to understand if it can helps.

It can't --- not directly, at least --- but the underlying
kiobuf-based IO code can improve CPU efficiency for swap IO.

> What worries me a bit is that whatever we do to improve swapin seeks it
> can always disagree with what the lru says that have to be thrown away.

Sure, but disk seeks are so much more expensive than anything else
that you really want to minimise them at all costs. In 2.2 we added
paging clustering, which performs extra IO to minimise seeks, at the
cost of potentially evicting too many useful pages from memory to make
room for clustered incoming pages which aren't guaranteed to be used.
It made things _enormously_ faster for paging.

> A dumb way to provide the current swapin-contiguous behaviour is to do a
> unmap/swap-around of the pages pointed by the pagetables slots near the
> one that we found in the lru.

Ultimately we really need to be allocating pages based on VM address,
not on lru location, to get remotely good swap clustering. The
existinng VM-based scanout achieves this cheaply as a side effect of
the scan order, but we need to realise that it isn't perfect and that
every move to a physical page-based scan algorithm will require us to
think about replacing the clustering mechanism.

Cheers,
 Stephen

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Jul 15 2000 - 21:00:12 EST