Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp394270ybm; Mon, 20 May 2019 18:48:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqy7f5uxvBax0Z5Hyhjqkj87OQFyNbToTO3aLr52vSwII8fcqtW49nLCQNOZQ99OsNky6ef8 X-Received: by 2002:a63:4753:: with SMTP id w19mr5599440pgk.421.1558403293923; Mon, 20 May 2019 18:48:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558403293; cv=none; d=google.com; s=arc-20160816; b=0Q3TtZKLCzeWrcCD2Bz7kYRuuRz+oNUhf7FRRsNGfvHYYBIOfMLCkggwyILTc6ffOy 4pN0WbGEb62hKXwfCwS9Kosqeix1qpRGC9DaAxZcOtfFsasfJ1E9x1UpXGXEURuGKDiM oBjWjb6diMGSs/WADAcIJXnSuQL6VxjR9sZjlvyTv8BzJx8Hy5wI45rRZ7exvkrtECGs BRzYcBS+pqvzxd8+cXTxSzm862zzKsFnWqQ4TTWvLTfDbLYV8MlOByi05mVPs3PM3e8I YBqieyMVoE6d1RBb46ThpbtpIPGKieZ5jNkhvff1vL4ECFIGEiHYHrYKojUWO9LZVcGq WbCA== 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:dkim-signature; bh=H2+x+MHVEZdCVE43yCMhl0CBsWPnqAGcA3mpEfmYBV4=; b=sW8IARQJarzu0inaLbWLgjZFlI3dnVMC0NUnkBt5DujEsW4ErwdLyOMC+0NmPypRYK hPkdbkEv16sbRprOboiJttHUmbPVksMYXVGqm5ihq/iOGaZ1VF1IZi6Ax8NnMsfuWw81 MZWvhe5gxm0vb6TFKman7FSXStQmtumLKT9vGW76610FA+wUUKyqE8DNNJzakAZjjLZL lnznQvFh2OSHXix10ULqaTGVGcEIN2QxDxN5G1lCJboFWcslK93/wekB59o+Aw1bgg1T hMRxNdmtethUUA10foBQ7PPo6oiyXj64uQ7FYZU485DViDB+vrC7cEd2bnUDTtg/GhPU Uz3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=q4yLHaP0; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d2si18463033plr.138.2019.05.20.18.47.58; Mon, 20 May 2019 18:48:13 -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; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=q4yLHaP0; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727591AbfEUBoz (ORCPT + 99 others); Mon, 20 May 2019 21:44:55 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:50846 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727347AbfEUBoz (ORCPT ); Mon, 20 May 2019 21:44:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=H2+x+MHVEZdCVE43yCMhl0CBsWPnqAGcA3mpEfmYBV4=; b=q4yLHaP0ptU37tRb4hLHZxJmm ew5v4etxyfhz8kN5laXZoOJo0kg4bdW+mbUnZQ4wTr6eX35KDhHy9W1FM/Th6gTkXw0m7JmwDncr6 d3Ky/VrjxPss4IkozN7BQDI00Ja/RNMdxYF8ewPodxJQSznB04gOl3ramIHiqM4EMlydAhHLIowN+ /LHHYx/EygTi582MDiFvUyClSpCqhAbjBrqUpmTy4G9UaWfAOAsVN8j7PkYrQd7fGlpm+UWv9ms8t XTjN+gKCo1BaWEOY1E123DatNsdFdKJYfobIgRpVoNrld/nW/6z2XcSSrfpaTTEqWOe7a2Gsbhf6i J1c0i7Rvg==; Received: from willy by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1hStpl-0000XC-36; Tue, 21 May 2019 01:44:53 +0000 Date: Mon, 20 May 2019 18:44:52 -0700 From: Matthew Wilcox To: Minchan Kim Cc: Andrew Morton , LKML , linux-mm , Michal Hocko , Johannes Weiner , Tim Murray , Joel Fernandes , Suren Baghdasaryan , Daniel Colascione , Shakeel Butt , Sonny Rao , Brian Geffon Subject: Re: [RFC 0/7] introduce memory hinting API for external process Message-ID: <20190521014452.GA6738@bombadil.infradead.org> References: <20190520035254.57579-1-minchan@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190520035254.57579-1-minchan@kernel.org> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 20, 2019 at 12:52:47PM +0900, Minchan Kim wrote: > IMHO we should spell it out that this patchset complements MADV_WONTNEED > and MADV_FREE by adding non-destructive ways to gain some free memory > space. MADV_COLD is similar to MADV_WONTNEED in a way that it hints the > kernel that memory region is not currently needed and should be reclaimed > immediately; MADV_COOL is similar to MADV_FREE in a way that it hints the > kernel that memory region is not currently needed and should be reclaimed > when memory pressure rises. Do we tear down page tables for these ranges? That seems like a good way of reclaiming potentially a substantial amount of memory.