Re: How can we make page replacement smarter (was: swap-prefetch)

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Al Boldi <a1426z@...>
Cc: <linux-kernel@...>, <linux-mm@...>
Date: Saturday, July 28, 2007 - 3:27 am

Al Boldi wrote:

If I'm writing 20 pages to swap, I can find a suitable chunk of swap and 
write them all in one place.  If I'm reading 20 pages from swap, they 
could be anywhere.  Also, writes get buffered at one or more layers of 
hardware.  At best, reads can be read-ahead and cached, which is why 
sequential swap-in sucks less.  On-demand reads are as expensive as I/O 
can get.


There are lots of page replacement schemes that optimize for different 
access patterns, and they all suck at certain other access patterns.  We 
tweak our behavior slightly based on fadvise and madvise hints, but most 
of the memory we're managing is an opaque mass.  With more statistics, 
we could do a better job of managing chunks of unhinted memory with 
disparate access patterns.  Of course, this imposes overhead.  I 
suggested VMA granularity because a VMA represents a logically distinct 
piece of address space, though this may not be suitable for shared mappings.

	-- Chris
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: How can we make page replacement smarter, Rik van Riel, (Sat Jul 28, 9:46 pm)
Re: How can we make page replacement smarter, Al Boldi, (Sun Jul 29, 10:55 am)
Re: How can we make page replacement smarter, Alan Cox, (Sun Jul 29, 9:09 am)
Re: How can we make page replacement smarter, Rik van Riel, (Sun Jul 29, 11:01 am)
Re: How can we make page replacement smarter (was: swap-pref..., Chris Snook, (Sat Jul 28, 3:27 am)