Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp5705493img; Wed, 27 Mar 2019 13:36:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqzRuIdlhvj+vvua1x2KVSHjAra7ik4BqV1LzipJQxcwGVAa4thSGkjzUa58pqdI3ze/38jQ X-Received: by 2002:a62:3186:: with SMTP id x128mr19708509pfx.30.1553718999200; Wed, 27 Mar 2019 13:36:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553718999; cv=none; d=google.com; s=arc-20160816; b=UYtBOfZnpP4wApq9qVeej/q0M1EVNXwFoTg7cDsnSFhoMt8rglp2bz0s00I+iPCjAU sxa2tPTjCOwH4HrJqWwZSidNg/TRmltybmmbpSSjxEvTltPrd/SIGIaD1vNFc/VpCO3y FFXSzRy4XIwuflkdqU7HY2MXiNli0QtroqWhaAUUNlHbUm9w04pTpNslNzR8ORfsA2Wu QBTv5CJRNRUYxBsV+twl6jjXae4E29sxokh/tW34Iv7a2W07p3C+Tg8Y43MM4urx///y iotXgxIZuijxjHbGOrfwh4Zgro0dSAa5SE4tSeZlTGpcAru01bEW8F/T0710Ulu+9w0F Xe8g== 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=QPOloOxRTaTdLOpUVbW+jky/YMc8w2U+BABUuwfTLpA=; b=a6eB7HIppBAkFmjd6gmz5rRfRkmePv/xdbVa5Ktl7XivTyLT6q7hhCd7Xn6xDDMYKY oMScnDzK8dEVvAObtr+8Sr2bMPo3qfzmculA1JFR+jx6OnPxq2C+cFNvcXsJp92rE8bi 3ii97jHGjdUec+DxD7nNxBEiXXLXpwhdjUKvaNTDiLRS95GJ5CvTMa/cmzxsvHY721Ng /IQQwaGuEA6YyxeOIdml+hvsAX7vSJKxu4s6dkJlEAnY9//TJga5TCq0S65SG63pMNfz sDDPO8Ov73cS9cxImte9tWiNCKiroOBIM3XZU27+rJs3GdMvMKKqBERwp/QPCe0DP9Fd XsWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=fwqIWCOy; 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 z8si10375178pfi.214.2019.03.27.13.36.23; Wed, 27 Mar 2019 13:36:39 -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=fwqIWCOy; 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 S1727675AbfC0Ufd (ORCPT + 99 others); Wed, 27 Mar 2019 16:35:33 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:51384 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726108AbfC0Ufd (ORCPT ); Wed, 27 Mar 2019 16:35:33 -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=QPOloOxRTaTdLOpUVbW+jky/YMc8w2U+BABUuwfTLpA=; b=fwqIWCOyonfUBxY/jYxMe7Cta LrKDdKpoPiEiX7TXLGKbtSDRk/5QtQcNckocOCp8bTsUWepcPLwBuOqq+/xDvMEF0e+QopEX7cANr JoeMqtKfG8rbY1K3WEx87Da5m0eAaf9B8ttoJA2eDYrgHbS4IJ+Uz4vfee4bsIHsRezaMTFyIM5k4 M7X+3il7hPr53Ks7kLecEjfE0hxw+RM8yd3estaG1wS7OUN7aDUIBasLdDqt3UultvUAFs1FvxzIj GZ23+02PfyUH5M0xsQGPoZWMQQr2saeEdpTLMAcGWdUMkQZnLaDb714B7QWoF3YcoW0lWU4jLbxFk Kx7LMerQA==; Received: from willy by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1h9FGa-0006KX-GT; Wed, 27 Mar 2019 20:35:20 +0000 Date: Wed, 27 Mar 2019 13:35:20 -0700 From: Matthew Wilcox To: Dan Williams Cc: Michal Hocko , Yang Shi , 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: <20190327203520.GU10344@bombadil.infradead.org> References: <1553316275-21985-1-git-send-email-yang.shi@linux.alibaba.com> <20190326135837.GP28406@dhcp22.suse.cz> <43a1a59d-dc4a-6159-2c78-e1faeb6e0e46@linux.alibaba.com> <20190326183731.GV28406@dhcp22.suse.cz> <20190327090100.GD11927@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Wed, Mar 27, 2019 at 10:34:11AM -0700, Dan Williams wrote: > On Wed, Mar 27, 2019 at 2:01 AM Michal Hocko wrote: > > No, Linux NUMA implementation makes all numa nodes available by default > > and provides an API to opt-in for more fine tuning. What you are > > suggesting goes against that semantic and I am asking why. How is pmem > > NUMA node any different from any any other distant node in principle? > > Agree. It's just another NUMA node and shouldn't be special cased. > Userspace policy can choose to avoid it, but typical node distance > preference should otherwise let the kernel fall back to it as > additional memory pressure relief for "near" memory. I think this is sort of true, but sort of different. These are essentially CPU-less nodes; there is no CPU for which they are fast memory. Yes, they're further from some CPUs than from others. I have never paid attention to how Linux treats CPU-less memory nodes, but it would make sense to me if we don't default to allocating from remote nodes. And treating pmem nodes as being remote from all CPUs makes a certain amount of sense to me. eg on a four CPU-socket system, consider this as being pmem1 --- node1 --- node2 --- pmem2 | \ / | | X | | / \ | pmem3 --- node3 --- node4 --- pmem4 which I could actually see someone building with normal DRAM, and we should probably handle the same way as pmem; for a process running on node3, allocate preferentially from node3, then pmem3, then other nodes, then other pmems.