From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ve0-f172.google.com (mail-ve0-f172.google.com [209.85.128.172]) by kanga.kvack.org (Postfix) with ESMTP id 261CB6B0031 for ; Tue, 7 Jan 2014 08:45:18 -0500 (EST) Received: by mail-ve0-f172.google.com with SMTP id jw12so110913veb.31 for ; Tue, 07 Jan 2014 05:45:17 -0800 (PST) Received: from mx1.redhat.com (mx1.redhat.com. [209.132.183.28]) by mx.google.com with ESMTP id sr1si1911665vdc.78.2014.01.07.05.45.16 for ; Tue, 07 Jan 2014 05:45:16 -0800 (PST) Message-ID: <52CC04DD.3020603@redhat.com> Date: Tue, 07 Jan 2014 08:45:01 -0500 From: Rik van Riel MIME-Version: 1.0 Subject: Re: swap, compress, discard: what's in the future? References: <20140107030148.GA24188@bbox> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Bob Liu , Minchan Kim Cc: Luigi Semenzato , Linux-MM , hnaz@cmpxchg.org On 01/07/2014 01:33 AM, Bob Liu wrote: > On Tue, Jan 7, 2014 at 11:01 AM, Minchan Kim wrote: >> Your statement makes sense to me but unfortunately, current VM doesn't >> consider everything you mentioned. >> It is just based on page access recency by approximate LRU logic + >> some heuristic(ex, mapped page and VM_EXEC pages are more precious). > > It seems that the ARC page replacement algorithm in zfs have good > performance and more intelligent. > http://en.wikipedia.org/wiki/Adaptive_replacement_cache > Is there any history reason of linux didn't implement something like > ARC as the page cache replacement algorithm? ARC by itself was quickly superceded by CLOCK-Pro, which looks like it would be even better. Johannes introduces an algorithm with similar properties in his "thrash based page cache replacement" patch series. However, algorithms like ARC and clockpro are best for a cache that caches a large data set (much larger than the cache size), and has to deal with large inter-reference distances. For anonymous memory, we are dealing with the opposite: the total amount of anonymous memory is on the same order of magnitude as the amount of RAM, and the inter-reference distance will be smaller as a result. -- All rights reversed -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org