Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4410622yba; Wed, 17 Apr 2019 10:52:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqzjKDaUSHrL23GGqlkoV8BCOObhhWUSYAhWniXzTtvnlXeAGqBbNduYqbIX5onUSTHFgcKE X-Received: by 2002:a62:2046:: with SMTP id g67mr89959856pfg.121.1555523578912; Wed, 17 Apr 2019 10:52:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555523578; cv=none; d=google.com; s=arc-20160816; b=uTqz5yc2xYtANQD+fI7LlhLoMZb7KNkeNVtG4VQT+Z8Dl+KrKyZq3V8WYc/nMW4CpW o4s/95azXEFjY+z4HjJ+oPAql1vwf7y2pDUx5hCPQPC9vzowGgIiP6c/GDG7MlZj9mnP AbWTpVZbMVEq2dmBVLUcCp1RdKyJNg7bak5dfaoIrCSp/k5xZ/WL0zmufBMlwMDesbAX s1e3gjPscvL3zZm2yZ8uj92/l7yv104D1T2oxdxOaox2uqUXo9f3L1aGkvJ6S5zgEkeS bIylApZ4R25S1YGof8aZxtDVW9u1moEbNhscEU5meE8165wXD6LfUcsJrSNjnKMyKgx2 yWMg== 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=PMkpejDmoPrVdxh9p9G7C5NFiLeig6LtXYzzCSTz5As=; b=SpPSMWRJMVHuvRQN9+Pp0kgdH5/pVqoma4tKXqeTpCqgRBTVq0PTHv8hYgvTmy/S08 SRHhhGJ7WmOTBtpUm7YwbpQdk3LTXc0kayqiXPsEPggyZbqwZcAF64z1aHfphMTLV9OJ QMjkdfs6Z/z03HY4WPe7h1L/FJobDSPWOSYUVOooM12td4zHpcJ7ONw/tWi4pY7vFYUC TjdHgidcFyomqGaU8IpREbfK7X+JCgQW6PjYnldFesfi9k3mD8ldik5LiWIBuYTLnX7e ZyNclaIyMaYY3gAffSllQagRA+8eWhRhQgQHoarPirAQXXixh2EzbYFDjizUbrHHtOs5 nqOA== 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 t63si2095620pgd.346.2019.04.17.10.52.43; Wed, 17 Apr 2019 10:52:58 -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 S1733197AbfDQRvy (ORCPT + 99 others); Wed, 17 Apr 2019 13:51:54 -0400 Received: from mx2.suse.de ([195.135.220.15]:38802 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731977AbfDQRvy (ORCPT ); Wed, 17 Apr 2019 13:51:54 -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 BF352AD3B; Wed, 17 Apr 2019 17:51:52 +0000 (UTC) Date: Wed, 17 Apr 2019 19:51:51 +0200 From: Michal Hocko To: Yang Shi Cc: Keith Busch , Dave Hansen , mgorman@techsingularity.net, riel@surriel.com, hannes@cmpxchg.org, akpm@linux-foundation.org, dan.j.williams@intel.com, fengguang.wu@intel.com, fan.du@intel.com, ying.huang@intel.com, ziy@nvidia.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [v2 RFC PATCH 0/9] Another Approach to Use PMEM as NUMA Node Message-ID: <20190417175151.GB9523@dhcp22.suse.cz> References: <20190416074714.GD11561@dhcp22.suse.cz> <876768ad-a63a-99c3-59de-458403f008c4@linux.alibaba.com> <20190417092318.GG655@dhcp22.suse.cz> <20190417152345.GB4786@localhost.localdomain> <20190417153923.GO5878@dhcp22.suse.cz> <20190417153739.GD4786@localhost.localdomain> <20190417163911.GA9523@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Wed 17-04-19 10:26:05, Yang Shi wrote: > > > On 4/17/19 9:39 AM, Michal Hocko wrote: > > On Wed 17-04-19 09:37:39, Keith Busch wrote: > > > On Wed, Apr 17, 2019 at 05:39:23PM +0200, Michal Hocko wrote: > > > > On Wed 17-04-19 09:23:46, Keith Busch wrote: > > > > > On Wed, Apr 17, 2019 at 11:23:18AM +0200, Michal Hocko wrote: > > > > > > On Tue 16-04-19 14:22:33, Dave Hansen wrote: > > > > > > > Keith Busch had a set of patches to let you specify the demotion order > > > > > > > via sysfs for fun. The rules we came up with were: > > > > > > I am not a fan of any sysfs "fun" > > > > > I'm hung up on the user facing interface, but there should be some way a > > > > > user decides if a memory node is or is not a migrate target, right? > > > > Why? Or to put it differently, why do we have to start with a user > > > > interface at this stage when we actually barely have any real usecases > > > > out there? > > > The use case is an alternative to swap, right? The user has to decide > > > which storage is the swap target, so operating in the same spirit. > > I do not follow. If you use rebalancing you can still deplete the memory > > and end up in a swap storage. If you want to reclaim/swap rather than > > rebalance then you do not enable rebalancing (by node_reclaim or similar > > mechanism). > > I'm a little bit confused. Do you mean just do *not* do reclaim/swap in > rebalancing mode? If rebalancing is on, then node_reclaim just move the > pages around nodes, then kswapd or direct reclaim would take care of swap? Yes, that was the idea I wanted to get through. Sorry if that was not really clear. > If so the node reclaim on PMEM node may rebalance the pages to DRAM node? > Should this be allowed? Why it shouldn't? If there are other vacant Nodes to absorb that memory then why not use it? > I think both I and Keith was supposed to treat PMEM as a tier in the reclaim > hierarchy. The reclaim should push inactive pages down to PMEM, then swap. > So, PMEM is kind of a "terminal" node. So, he introduced sysfs defined > target node, I introduced N_CPU_MEM. I understand that. And I am trying to figure out whether we really have to tream PMEM specially here. Why is it any better than a generic NUMA rebalancing code that could be used for many other usecases which are not PMEM specific. If you present PMEM as a regular memory then also use it as a normal memory. -- Michal Hocko SUSE Labs