On Wed, Oct 9, 2013 at 7:52 PM, Theodore Ts'o <tytso@xxxxxxx> wrote: > On Thu, Sep 26, 2013 at 11:14:01AM -0500, Seth Jennings wrote: >> >> I can see this burning out your SSD as well. If someone enabled this on >> a machine that did large (relative to the size of the SDD) streaming >> reads, you'd be writing to the SSD continuously and never have a cache >> hit. > > If we are to do page-level caching, we really need to change the VM to > use something like IBM's Adaptive Replacement Cache[1], which allows > us to track which pages have been more frequently used, so that we > only cache those pages, as opposed to those that land in the cache > once and then aren't used again. (Consider what might happen if you > are using clean cache and then the user does a full backup of the > system.) One way I used in zcache is adding a WasActive flag to page flags. Only cache pages which are shrinked from active file lru list. > > [1] http://en.wikipedia.org/wiki/Adaptive_replacement_cache > > This is how ZFS does SSD caching; the basic idea is to only consider > for cacheing those pages which have been promoted into its Frequenly > Refrenced list, and then have been subsequently aged out. At that > point, the benefit we would have over a dm-cache solution is that we > would be taking advantage of the usage information tracked by the VM > to better decide what is cached on the SSD. > > So something to think about, > -- Regards, --Bob -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>