Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5057081ybi; Tue, 4 Jun 2019 00:05:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqz4OJY5w2QJVkWXhfwT56VVeqR7mLJA8NP2lquGDZJxHN6yNEpqoV68vwPjn8Ce8VFxiBex X-Received: by 2002:a17:90a:8408:: with SMTP id j8mr28577829pjn.29.1559631940292; Tue, 04 Jun 2019 00:05:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559631940; cv=none; d=google.com; s=arc-20160816; b=zWoCdoCDPddGI/9+ojUX0RiNBHEzLUybYhTjgjeKxHredOZH1JqK26VjS6l/8FqNIX q6scv3Vd58+bsZQcwFEVLuh81XRk25JPRKKqo8XlYJI3gFLPLR2iq6W4V85766SHSbur ugwxmankQXXe1le4OwaLQGXJ2Ma1V3lxKChMvQV/LIs3FYZEsMefiSyAQDehXv9B2qNF nZygcYy9Uic1y5wpl1hwZSaxhYTPWE/bVTwwNJqipY/u+Y9xrj+SE5TBb5IqQvaaCC8z 0GtxCu+So9Tnpt0MZFacOVwUHzTl1+cHsNRGnsC1C4F/awiZPL2lG5qsFXOJLclYwQxL HbrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=xdt80mBbVFMBQSshlDttmReozy5pSqDzJQYrUFRB++8=; b=n9CitOZW8AIAOOSo9W3Zp4iJIEE7p9UZAyqdn7M4+cKAuG4Hsa8DPCHI4wvmVv96Vr THEW4mBoPjxFnrRlCpZbpU2QAzkl/YDLVi+GMU8Xr4R4u3IEmbfKLxK34+TV3tSlsCzQ DLBXe7AR1mqTYS+gq+ZdkZQIiFIp7tc2x5+XnbEhiQYwV2ntw3+bxWsWDfci8UbHFewT vNfJ6ML6UCPH7vrdEoWiPGEA86HRnrFAo3MxqmvU8suV7qqnOrGAELGSJjKl3wxVO6GM KRSWeqicODmPrlR4Yn0fb9bY0xSeT+jsqz/HM/8v/D+wepVpDQlBseQmCRku33Hj2VID 8fOg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p24si16455910pgb.474.2019.06.04.00.05.22; Tue, 04 Jun 2019 00:05:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726941AbfFDHCc (ORCPT + 99 others); Tue, 4 Jun 2019 03:02:32 -0400 Received: from mx2.suse.de ([195.135.220.15]:48980 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726822AbfFDHCc (ORCPT ); Tue, 4 Jun 2019 03:02:32 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 58B31AE4E; Tue, 4 Jun 2019 07:02:30 +0000 (UTC) Date: Tue, 4 Jun 2019 09:02:28 +0200 From: Michal Hocko To: Minchan Kim Cc: Andrew Morton , linux-mm , LKML , linux-api@vger.kernel.org, Johannes Weiner , Tim Murray , Joel Fernandes , Suren Baghdasaryan , Daniel Colascione , Shakeel Butt , Sonny Rao , Brian Geffon , jannh@google.com, oleg@redhat.com, christian@brauner.io, oleksandr@redhat.com, hdanton@sina.com Subject: Re: [RFCv2 1/6] mm: introduce MADV_COLD Message-ID: <20190604070228.GD4669@dhcp22.suse.cz> References: <20190531064313.193437-1-minchan@kernel.org> <20190531064313.193437-2-minchan@kernel.org> <20190531084752.GI6896@dhcp22.suse.cz> <20190531133904.GC195463@google.com> <20190531140332.GT6896@dhcp22.suse.cz> <20190531143407.GB216592@google.com> <20190603071607.GB4531@dhcp22.suse.cz> <20190604042651.GC43390@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190604042651.GC43390@google.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 04-06-19 13:26:51, Minchan Kim wrote: > On Mon, Jun 03, 2019 at 09:16:07AM +0200, Michal Hocko wrote: [...] > > Right. But there is still the page cache reclaim. Is it expected that > > an explicitly cold memory doesn't get reclaimed because we have a > > sufficient amount of page cache (a very common case) and we never age > > anonymous memory because of that? > > If there are lots of used-once pages in file-LRU, I think there is no > need to reclaim anonymous pages because it needs bigger overhead due to > IO. It has been true for a long time in current VM policy. You are making an assumption which is not universally true. If I _know_ that there is a considerable amount of idle anonymous memory then I would really prefer if it goes to the swap rather than make a pressure on caching. Inactive list is not guaranteed to contain only used-once pages, right? Anyway, as already mentioned, we can start with a simpler implementation for now and explicitly note that pagecache biased reclaim is known to be a problem potentially. I am pretty sure somebody will come sooner or later and we can address the problem then with some good numbers to back the additional complexity. -- Michal Hocko SUSE Labs