Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4392491yba; Wed, 17 Apr 2019 10:28:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqyKFnWaz4ROxqigcQjblfZILJwKDmYarta4USbcfd+3FTy/RDRIYP4lH1iY52pP8roMwyLC X-Received: by 2002:a63:ff18:: with SMTP id k24mr82385271pgi.140.1555522099705; Wed, 17 Apr 2019 10:28:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555522099; cv=none; d=google.com; s=arc-20160816; b=S+UWd360pKRXJa64DFKgLFeDJBl1FJGQD7kKa9JjNvhuln2ymUFQoSQet1lX/GOsvw 4khIQoLNGr0sSZnVS+YpJvyALltaCJSAFD6wZb2IZW/jnSa+2EE8kqjnYnv+SGWEd+RY 48R79/qFWvbLRrQNFLXUAogBZp+SHF5CYw1XdzuSqr3c9I8SF5Z1cPxixt33saqfgh4q jpEStSseyu2Mve2KLKzJ5WRa09EZcOSjGRHpqgVuOw0/c/1Nol59unm09qCQlkWXKAve HDeA3rQ4Nff6WDnVVtV0Qgww114c64x9oClYvnuNkjypCFMnwiS461nfrVuaDV1n+mrQ ptDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=IKTHXir5V+OIhijl27+4UqokqUeuGrvaO0fmq8V+od8=; b=xGsVpg7O5jS/1dE7rs12iXQ9UZCOvrO3AMYohm7+wCjaPkksmvmsrOse/2zbikUT4Z MCP5K/1dO/GY5buP4aTUqskwmKpwscdGAOPUSqBK0e+WUg9WLh9HYunrn2YtPds2wL9y sq6DeSWUCWbghfP/0yB+rC9vdByOH8NbMaZuPKCDTo67kPuAramG+jXPnXV8DnJqZ3jF w6WlsmKQ8kzy4rS7veJtz0TW09jUeMZduRy2m/bcfKjNgyZ71G/o9rcS/SgTi/MHDL1d UxKtOqJG2ijUqSgoLsWh9Dc/1HzzxAxDLmYvM+ACM3TBFqLjz2jHthneRcWveapH2uic wl2Q== 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=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j65si50241343pge.48.2019.04.17.10.28.04; Wed, 17 Apr 2019 10:28:19 -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=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733058AbfDQR0o (ORCPT + 99 others); Wed, 17 Apr 2019 13:26:44 -0400 Received: from out30-131.freemail.mail.aliyun.com ([115.124.30.131]:59634 "EHLO out30-131.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729641AbfDQR0n (ORCPT ); Wed, 17 Apr 2019 13:26:43 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R141e4;CH=green;DM=||false|;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04420;MF=yang.shi@linux.alibaba.com;NM=1;PH=DS;RN=14;SR=0;TI=SMTPD_---0TPa6XZW_1555521966; Received: from US-143344MP.local(mailfrom:yang.shi@linux.alibaba.com fp:SMTPD_---0TPa6XZW_1555521966) by smtp.aliyun-inc.com(127.0.0.1); Thu, 18 Apr 2019 01:26:12 +0800 Subject: Re: [v2 RFC PATCH 0/9] Another Approach to Use PMEM as NUMA Node To: Michal Hocko , Keith Busch Cc: 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 References: <1554955019-29472-1-git-send-email-yang.shi@linux.alibaba.com> <20190412084702.GD13373@dhcp22.suse.cz> <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> From: Yang Shi Message-ID: Date: Wed, 17 Apr 2019 10:26:05 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20190417163911.GA9523@dhcp22.suse.cz> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? If so the node reclaim on PMEM node may rebalance the pages to DRAM node? Should this be allowed? 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. >