Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp593152ybm; Mon, 20 May 2019 23:35:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqztpoaZHMgyoGPNUTVU52iNEiB47XB/8iSvtK+dcy8bspU9Qf7noTyWE3kZPisiy11zIokK X-Received: by 2002:a65:62cc:: with SMTP id m12mr25095126pgv.237.1558420549237; Mon, 20 May 2019 23:35:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558420549; cv=none; d=google.com; s=arc-20160816; b=iD2evIG5jaX/P5gpa7Ix0ixS/25tJ8Ro8Wmy9Hp9jfMLwFYwwLvAcrBrC49BDpq18j Zt8nVBOok7UoGKcWn16ER75jYgZk0AFa8gKKhsd6RZ23PBTeoHDCfr5YoFDDSdNkEXnn q0KCRd8EsHfZB9Gpy74M7dLgoYhw4dUM8jyqTxiOif5BZxVUFYD77cO4x3c8zvtSmoYR E01QqSho7Uokllucayd0A3a5YQf1RIp3tb5mCLI46W2WBEM+FBonKa7fBkGleMbjH3pF fhqp7VGAipvWXRpRj5H4IWA7bEXGojgKyNdXbgI1pS9Gcjnx5gNjnmNvgmaLkpk8jK2u eEwQ== 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=ZIAQHBaoU6N1pkMi5TydFSWJFjFaqpnqfAuBkt7sNiA=; b=JNlTAfc2QigBqWP1r1cN1Ho8Gy8z7NFbqyuzvj1VarJIornIdyEvlL7ow/3FeQMQl4 RHAkiFPcKAXOq1Y6F+VhWO8buH4vUPODRWcLz74HdroI6N+fwilVP6P6QoAZVhGZjO+w lMxknl2OsahV88Epst6Reas3YsriJhKiIIyqfU/eOB3HvAdb0LfjBRA+WpPPLI29iAMr MD0wDgN578gSWTZ+wZhgQW+FIhCVSRe59yNPvgqGlODlBGnwYAZcD4yFGeIPrs2ncrTC HI2+DEvVtWBrGZDPm6T5Y5NdqtLMoAU+WCqtNwQ/c0HnZrX/Lkry9H9fS2z29AfZ+F0O SkRw== 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 d4si21842078pla.358.2019.05.20.23.35.34; Mon, 20 May 2019 23:35:49 -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 S1727911AbfEUGeY (ORCPT + 99 others); Tue, 21 May 2019 02:34:24 -0400 Received: from mx2.suse.de ([195.135.220.15]:54210 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726047AbfEUGeY (ORCPT ); Tue, 21 May 2019 02:34:24 -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 3D7E5AEC6; Tue, 21 May 2019 06:34:23 +0000 (UTC) Date: Tue, 21 May 2019 08:34:21 +0200 From: Michal Hocko To: Matthew Wilcox Cc: Minchan Kim , Andrew Morton , LKML , linux-mm , Johannes Weiner , Tim Murray , Joel Fernandes , Suren Baghdasaryan , Daniel Colascione , Shakeel Butt , Sonny Rao , Brian Geffon , linux-api@vger.kernel.org Subject: Re: [RFC 0/7] introduce memory hinting API for external process Message-ID: <20190521063421.GG32329@dhcp22.suse.cz> References: <20190520035254.57579-1-minchan@kernel.org> <20190521014452.GA6738@bombadil.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190521014452.GA6738@bombadil.infradead.org> 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 [linux-api] On Mon 20-05-19 18:44:52, Matthew Wilcox wrote: > 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. I do not think we can in general because this is a non-destructive operation. So at least we cannot tear down anonymous ptes (they will turn into swap entries). -- Michal Hocko SUSE Labs