From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.1 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 033E2C3A5A2 for ; Tue, 3 Sep 2019 14:35:32 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 787A6215EA for ; Tue, 3 Sep 2019 14:35:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="hScFHEtW" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 787A6215EA Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 46N8cw6z0zzDqS3 for ; Wed, 4 Sep 2019 00:35:28 +1000 (AEST) Authentication-Results: lists.ozlabs.org; spf=none (mailfrom) smtp.mailfrom=infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=peterz@infradead.org; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=infradead.org header.i=@infradead.org header.b="hScFHEtW"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 46N8Vb29BgzDqnV for ; Wed, 4 Sep 2019 00:29:59 +1000 (AEST) 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=O0vMqdd0CVfcLwe8ztibkw7pTl1sYEubPo8aMD2xLx0=; b=hScFHEtWp1N1rzg5nlCTz+Y7W +tUV4KU9048Mdt0gs//aT/p8NbdNDFzqXzyT7Hq+O3dM4aK47758OEA43NBs5hhl7YsjAC4DLG8V9 cuQIjW9qmvhc7YNvWFjkn6k0G/VAocrRxMfLRmFSX3WLF8Wstq2ts/ffKvzWPvnxx8nVyFfEL1Tba w9nMXoTByi9GSWC6eckGCD8CJ+ae1XNFmfzBnR8A/+LOe1Gvwt1rXl0VUbz6JqzJyj/XTF/JMbvth QYNZzNFIEC2qpggjMo8xRXga5GJJRdp+9Y4UREXMnI24TosND5eL4FWzE1jC/tImZvsc1f61jFFDf m6tYNCrvg==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.92 #3 (Red Hat Linux)) id 1i59nm-0005Cx-Oq; Tue, 03 Sep 2019 14:28:59 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id AD646306037; Tue, 3 Sep 2019 16:28:16 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id D58D82097776B; Tue, 3 Sep 2019 16:28:52 +0200 (CEST) Date: Tue, 3 Sep 2019 16:28:52 +0200 From: Peter Zijlstra To: Salil Mehta Subject: Re: [PATCH v2 2/9] x86: numa: check the node id consistently for x86 Message-ID: <20190903142852.GT2349@hirez.programming.kicks-ass.net> References: <20190831085539.GG2369@hirez.programming.kicks-ass.net> <4d89c688-49e4-a2aa-32ee-65e36edcd913@huawei.com> <20190831161247.GM2369@hirez.programming.kicks-ass.net> <20190902072542.GN2369@hirez.programming.kicks-ass.net> <5fa2aa99-89fa-cd41-b090-36a23cfdeb73@huawei.com> <20190902125644.GQ2369@hirez.programming.kicks-ass.net> <1f48081c-c9d6-8f3e-9559-8b0bec98f125@huawei.com> <20190903071111.GU2369@hirez.programming.kicks-ass.net> <3bc19c01095545ddbe2ba424f5488b4d@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3bc19c01095545ddbe2ba424f5488b4d@huawei.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "dalias@libc.org" , "linux-sh@vger.kernel.org" , "catalin.marinas@arm.com" , "dave.hansen@linux.intel.com" , "heiko.carstens@de.ibm.com" , Linuxarm , "jiaxun.yang@flygoat.com" , "linux-kernel@vger.kernel.org" , "mwb@linux.vnet.ibm.com" , "paulus@samba.org" , "hpa@zytor.com" , "sparclinux@vger.kernel.org" , "chenhc@lemote.com" , "will@kernel.org" , "cai@lca.pw" , "linux-s390@vger.kernel.org" , "ysato@users.sourceforge.jp" , "x86@kernel.org" , "paul.burton@mips.com" , "rppt@linux.ibm.com" , "borntraeger@de.ibm.com" , "dledford@redhat.com" , "mingo@redhat.com" , "jeffrey.t.kirsher@intel.com" , "jhogan@kernel.org" , "nfont@linux.vnet.ibm.com" , "mattst88@gmail.com" , "len.brown@intel.com" , "gor@linux.ibm.com" , "anshuman.khandual@arm.com" , "robin.murphy@arm.com" , "bp@alien8.de" , "luto@kernel.org" , "tglx@linutronix.de" , "naveen.n.rao@linux.vnet.ibm.com" , "linux-arm-kernel@lists.infradead.org" , "rth@twiddle.net" , "axboe@kernel.dk" , Greg Kroah-Hartman , "Rafael J. Wysocki" , "linux-mips@vger.kernel.org" , "ralf@linux-mips.org" , "tbogendoerfer@suse.de" , linyunsheng , "linux-alpha@vger.kernel.org" , "ink@jurassic.park.msu.ru" , "akpm@linux-foundation.org" , "linuxppc-dev@lists.ozlabs.org" , "davem@davemloft.net" Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Tue, Sep 03, 2019 at 12:15:24PM +0000, Salil Mehta wrote: > > From: Linuxarm [mailto:linuxarm-bounces@huawei.com] On Behalf Of Peter Zijlstra > > On Tue, Sep 03, 2019 at 02:19:04PM +0800, Yunsheng Lin wrote: > > > Is it possible that the node id set by device_add() become invalid > > > if the node is offlined, then dev_to_node() may return a invalid > > > node id. > > > > In that case I would expect the device to go away too. Once the memory > > controller goes away, the PCI bus connected to it cannot continue to > > function. > > I am not sure if this is *exactly* true on our system as NUMA nodes are > part of the SoCs and devices could still be used even if all the memory > and CPUs part of the node are turned off. Although, it is highly unlikely > anybody would do that(maybe could be debated for the Power Management case?) Cute; anyway, we never change nr_node_ids (after boot), so once a node is deemed valid it always is. The worst that can happen in the above case, is that cpumask_of_node() returns an empty mask, which, if all CPUs (of said node) are offline, is an accurate representation.