Received: by 2002:a25:5b86:0:0:0:0:0 with SMTP id p128csp859919ybb; Thu, 28 Mar 2019 13:42:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqzgnEhZIY1dKj9AE46DCdvyjfjbIbQ9y5fbuc7IfTvcFtQkcUXdS+cxHvmjjKo4LNixmtTY X-Received: by 2002:a63:c112:: with SMTP id w18mr14167174pgf.200.1553805774426; Thu, 28 Mar 2019 13:42:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553805774; cv=none; d=google.com; s=arc-20160816; b=xcirHp779IF84W1yn8ZfOf7nT8ykMV3tgHZTDv/mkbMo/Vaom5NAZAXNWGAyiepod8 fPxyj1DXCASiwSAUEuzGPjIO3m1l2zcrz//n+gBv81bq1WytW4I2KKrihXjuKdNMoS3S DL+EsAIMfj/5XlpQEsw2A82O1qahINSVvHa4/9hIciU56WhPvq/+HLQV1RP2wyrl5S6O MzXFrBR0la01vUdRkIQGT2FwxqPRXV5MDehUjO9aUD4wmndkzYFUi4YXPugH4ZSuG1VH HylwM3e96loKknv0F8fm8Fq97cYGiLgMa4DjENOVwAiuMn7xsbNxqppu7qfESsPuQCll +YRA== 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=hc7fiIiWmOSD+Ln83eWPMA2KwRVoDGhWsKvEerkgNWs=; b=eu4GI2qBXqchS0K4JuN6cPmh70POGXNjuEvCzKXmyBL0pI7XSo7rDxc3KVl2UBWMEa VVPUBMN+DndYsl1FTdKg+ugV27p8aCKK9OYVEWnmd/hoCijxbSQobl6bXo3rxCRSG8cK W/Hxtlts/DMXMSPQDfUP/ByRstgZ8DdinZzC0RXQrJhEs2n5114rOzdLjN0pJ8ig3PkA xa5gh8IF+FVKynoNZ9mcc17c5RMJ2uMbJYZrcaHfDwvV0WNbp58I9nDDDqEySgNSt/ix NlVJFgQHMu4vinLf4DpI/Gj1zmjvq1eBTSG1ojqRfhh62GwRkaUcp2bNnqsX2RcGQGbp MHvQ== 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 61si64491plq.154.2019.03.28.13.42.38; Thu, 28 Mar 2019 13:42:54 -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 S1727203AbfC1UkY (ORCPT + 99 others); Thu, 28 Mar 2019 16:40:24 -0400 Received: from mx2.suse.de ([195.135.220.15]:33504 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726195AbfC1UkX (ORCPT ); Thu, 28 Mar 2019 16:40:23 -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 20388AC18; Thu, 28 Mar 2019 20:40:22 +0000 (UTC) Date: Thu, 28 Mar 2019 21:40:20 +0100 From: Michal Hocko To: Yang Shi Cc: Dan Williams , Mel Gorman , Rik van Riel , Johannes Weiner , Andrew Morton , Dave Hansen , Keith Busch , Fengguang Wu , "Du, Fan" , "Huang, Ying" , Linux MM , Linux Kernel Mailing List Subject: Re: [RFC PATCH 0/10] Another Approach to Use PMEM as NUMA Node Message-ID: <20190328204020.GD7155@dhcp22.suse.cz> References: <20190327090100.GD11927@dhcp22.suse.cz> <20190327193918.GP11927@dhcp22.suse.cz> <6f8b4c51-3f3c-16f9-ca2f-dbcd08ea23e6@linux.alibaba.com> <20190328065802.GQ11927@dhcp22.suse.cz> <6487e0f5-aee4-3fea-00f5-c12602b8ad2b@linux.alibaba.com> <20190328191206.GC7155@dhcp22.suse.cz> <5934ed42-c512-a4c7-cbed-9062065bf276@linux.alibaba.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5934ed42-c512-a4c7-cbed-9062065bf276@linux.alibaba.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 Thu 28-03-19 12:40:14, Yang Shi wrote: > > > On 3/28/19 12:12 PM, Michal Hocko wrote: > > On Thu 28-03-19 11:58:57, Yang Shi wrote: > > > > > > On 3/27/19 11:58 PM, Michal Hocko wrote: > > > > On Wed 27-03-19 19:09:10, Yang Shi wrote: > > > > > One question, when doing demote and promote we need define a path, for > > > > > example, DRAM <-> PMEM (assume two tier memory). When determining what nodes > > > > > are "DRAM" nodes, does it make sense to assume the nodes with both cpu and > > > > > memory are DRAM nodes since PMEM nodes are typically cpuless nodes? > > > > Do we really have to special case this for PMEM? Why cannot we simply go > > > > in the zonelist order? In other words why cannot we use the same logic > > > > for a larger NUMA machine and instead of swapping simply fallback to a > > > > less contended NUMA node? It can be a regular DRAM, PMEM or whatever > > > > other type of memory node. > > > Thanks for the suggestion. It makes sense. However, if we don't specialize a > > > pmem node, its fallback node may be a DRAM node, then the memory reclaim may > > > move the inactive page to the DRAM node, it sounds not make too much sense > > > since memory reclaim would prefer to move downwards (DRAM -> PMEM -> Disk). > > There are certainly many details to sort out. One thing is how to handle > > cpuless nodes (e.g. PMEM). Those shouldn't get any direct allocations > > without an explicit binding, right? My first naive idea would be to only > > Wait a minute. I thought we were arguing about the default allocation node > mask yesterday. And, the conclusion is PMEM node should not be excluded from > the node mask. PMEM nodes are cpuless nodes. I think I should replace all > "PMEM node" to "cpuless node" in the cover letter and commit logs to make it > explicitly. No, this is not about the default allocation mask at all. Your allocations start from a local/mempolicy node. CPUless nodes thus cannot be a primary node so it will always be only in a fallback zonelist without an explicit binding. -- Michal Hocko SUSE Labs