Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753521AbbBYPRu (ORCPT ); Wed, 25 Feb 2015 10:17:50 -0500 Received: from cantor2.suse.de ([195.135.220.15]:42759 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752634AbbBYPRt (ORCPT ); Wed, 25 Feb 2015 10:17:49 -0500 Date: Wed, 25 Feb 2015 16:17:46 +0100 From: Michal Hocko To: Minchan Kim Cc: Andrew Morton , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Rik van Riel , Johannes Weiner , Mel Gorman , Shaohua Li , Yalin.Wang@sonymobile.com Subject: Re: [PATCH RFC 3/4] mm: move lazy free pages to inactive list Message-ID: <20150225151746.GG26680@dhcp22.suse.cz> References: <1424765897-27377-1-git-send-email-minchan@kernel.org> <1424765897-27377-3-git-send-email-minchan@kernel.org> <20150224161408.GB14939@dhcp22.suse.cz> <20150225002728.GB6468@blaptop> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150225002728.GB6468@blaptop> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1683 Lines: 41 On Wed 25-02-15 09:27:28, Minchan Kim wrote: > On Tue, Feb 24, 2015 at 05:14:08PM +0100, Michal Hocko wrote: > > On Tue 24-02-15 17:18:16, Minchan Kim wrote: > > > MADV_FREE is hint that it's okay to discard pages if memory is > > > pressure and we uses reclaimers(ie, kswapd and direct reclaim) > > > > s@if memory is pressure@if there is memory pressure@ > > > > > to free them so there is no worth to remain them in active > > > anonymous LRU list so this patch moves them to inactive LRU list. > > > > Makes sense to me. > > > > > A arguable issue for the approach is whether we should put it > > > head or tail in inactive list > > > > Is it really arguable? Why should active MADV_FREE pages appear before > > those which were living on the inactive list. This doesn't make any > > sense to me. > > It would be better to drop garbage pages(ie, freed from allocator) > rather than swap out and now anon LRU aging is seq model so > inacitve list can include a lot working set so putting hinted pages > into tail of LRU could enhance reclaim efficiency. > That's why I said it might be arguble. OK, maybe I misunderstood what you tried to tell. Sure we can discuss whether to put all MADV_FREE pages to the tail of inactive list. But the above wording suggested that _active_ MADV_FREE pages were discussed and treating them differently from the inactive pages simply didn't make sense to me. [...] -- Michal Hocko SUSE Labs -- 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/