Message ID | 20200818081104.57888-3-srikar@linux.vnet.ibm.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=G0TP=B4=kvack.org=owner-linux-mm@kernel.org> Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 12A5914F6 for <patchwork-linux-mm@patchwork.kernel.org>; Tue, 18 Aug 2020 08:12:30 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D45742075E for <patchwork-linux-mm@patchwork.kernel.org>; Tue, 18 Aug 2020 08:12:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="VPW9gpds" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D45742075E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.vnet.ibm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 098916B0010; Tue, 18 Aug 2020 04:12:29 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 070C66B0023; Tue, 18 Aug 2020 04:12:29 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EA0EC6B0024; Tue, 18 Aug 2020 04:12:28 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0060.hostedemail.com [216.40.44.60]) by kanga.kvack.org (Postfix) with ESMTP id CE5E36B0010 for <linux-mm@kvack.org>; Tue, 18 Aug 2020 04:12:28 -0400 (EDT) Received: from smtpin04.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 92AA03626 for <linux-mm@kvack.org>; Tue, 18 Aug 2020 08:12:28 +0000 (UTC) X-FDA: 77162972376.04.nerve97_170c6fe2701d Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin04.hostedemail.com (Postfix) with ESMTP id 6A977800AB59 for <linux-mm@kvack.org>; Tue, 18 Aug 2020 08:12:28 +0000 (UTC) X-Spam-Summary: 1,0,0,07d9efc00cbec737,d41d8cd98f00b204,srikar@linux.vnet.ibm.com,,RULES_HIT:41:355:379:541:800:960:967:973:988:989:1260:1261:1311:1314:1345:1359:1431:1437:1515:1535:1542:1711:1730:1747:1777:1792:2194:2198:2199:2200:2393:2525:2553:2559:2563:2682:2685:2693:2859:2898:2902:2933:2937:2939:2942:2945:2947:2951:2954:3022:3138:3139:3140:3141:3142:3352:3865:3867:3868:3872:3934:3936:3938:3941:3944:3947:3950:3953:3956:3959:4117:4321:5007:6117:6261:6653:6742:7875:7903:7904:9025:9592:10004:11026:11232:11473:11658:11914:12043:12296:12297:12438:12555:12895:12986:13846:13894:14096:14181:14394:14721:21080:21451:21627:21749:21811:21939:30054:30070:30080:30090,0,RBL:148.163.158.5:@linux.vnet.ibm.com:.lbl8.mailshell.net-62.8.0.100 64.201.201.201;04yryejm55ykhq4nj7gm6akm8wqo1ycr5yii7sk8shx5wkf7z8w7yqnnz31pu1w.jqxjz33jicrxas1bh1qpd4tm4rxotwxw4io8zk9dp5mjgi1gycdpnjthw1zmcuc.c-lbl8.mailshell.net-223.238.255.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bul k,SPF:fn X-HE-Tag: nerve97_170c6fe2701d X-Filterd-Recvd-Size: 6572 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by imf04.hostedemail.com (Postfix) with ESMTP for <linux-mm@kvack.org>; Tue, 18 Aug 2020 08:12:27 +0000 (UTC) Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 07I82W5E031920; Tue, 18 Aug 2020 04:12:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=dOcHTGETAboVHqX++3ykKZMkrtQXqVf1Dw4Vw3EzTtM=; b=VPW9gpds47c6w7m/1GB12Sz4XS1uvSGAdn5u7VeVP+eU0eLOmKKnV1+Yv8PH34s9XgS8 CnyErScOce248zNVqz0Zx0+4Z2qO0ISX5llQBnYxnrfIDNh+xIHBUyFpjnETd/3+Csn0 W4CQfudT6hqk3Ez1NzJVnrqoWLeqCNfF2tzrl7o0nDp4ADFOYG2/VS89P+lGULLGQD7q kpjAu77MKMIb+nzFlaIT/AroxNUCpjj7ewotieTlZhSjENEqh5ZUg+XpNEwkZY1VQ2MU Tpo+TEqTRS/XNANt0ehyIr0Wq8CddUUGTpZTPXIYq0TG4wYsOWaSCDutdajZlo6+YrUv /A== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 3304sw1euq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 18 Aug 2020 04:12:24 -0400 Received: from m0098421.ppops.net (m0098421.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 07I82aYO032485; Tue, 18 Aug 2020 04:12:23 -0400 Received: from ppma04ams.nl.ibm.com (63.31.33a9.ip4.static.sl-reverse.com [169.51.49.99]) by mx0a-001b2d01.pphosted.com with ESMTP id 3304sw1est-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 18 Aug 2020 04:12:23 -0400 Received: from pps.filterd (ppma04ams.nl.ibm.com [127.0.0.1]) by ppma04ams.nl.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 07I8Ab4j031939; Tue, 18 Aug 2020 08:12:20 GMT Received: from b06avi18626390.portsmouth.uk.ibm.com (b06avi18626390.portsmouth.uk.ibm.com [9.149.26.192]) by ppma04ams.nl.ibm.com with ESMTP id 3304cc0cus-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 18 Aug 2020 08:12:20 +0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06avi18626390.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 07I8AmHM51380712 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 18 Aug 2020 08:10:48 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 940B1A405D; Tue, 18 Aug 2020 08:12:17 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 636DAA4040; Tue, 18 Aug 2020 08:12:13 +0000 (GMT) Received: from srikart450.in.ibm.com (unknown [9.85.93.83]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 18 Aug 2020 08:12:13 +0000 (GMT) From: Srikar Dronamraju <srikar@linux.vnet.ibm.com> To: Michael Ellerman <mpe@ellerman.id.au> Cc: linuxppc-dev <linuxppc-dev@lists.ozlabs.org>, Srikar Dronamraju <srikar@linux.vnet.ibm.com>, linux-mm@kvack.org, Michal Hocko <mhocko@suse.com>, Mel Gorman <mgorman@suse.de>, Vlastimil Babka <vbabka@suse.cz>, Christopher Lameter <cl@linux.com>, Andrew Morton <akpm@linux-foundation.org>, Linus Torvalds <torvalds@linux-foundation.org>, Gautham R Shenoy <ego@linux.vnet.ibm.com>, Satheesh Rajendran <sathnaga@linux.vnet.ibm.com>, David Hildenbrand <david@redhat.com>, Aneesh Kumar KV <aneesh.kumar@linux.ibm.com> Subject: [PATCH v6 2/3] powerpc/numa: Prefer node id queried from vphn Date: Tue, 18 Aug 2020 13:41:03 +0530 Message-Id: <20200818081104.57888-3-srikar@linux.vnet.ibm.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200818081104.57888-1-srikar@linux.vnet.ibm.com> References: <20200818081104.57888-1-srikar@linux.vnet.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235,18.0.687 definitions=2020-08-18_04:2020-08-18,2020-08-18 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 adultscore=0 mlxscore=0 malwarescore=0 spamscore=0 mlxlogscore=999 lowpriorityscore=0 bulkscore=0 phishscore=0 impostorscore=0 suspectscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2008180051 X-Rspamd-Queue-Id: 6A977800AB59 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam02 Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> |
Series |
Offline memoryless cpuless node 0
|
expand
|
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c index 72f6cca1332c..10c5064eeb88 100644 --- a/arch/powerpc/mm/numa.c +++ b/arch/powerpc/mm/numa.c @@ -728,21 +728,22 @@ static int __init parse_numa_properties(void) */ for_each_present_cpu(i) { struct device_node *cpu; - int nid; - - cpu = of_get_cpu_node(i, NULL); - BUG_ON(!cpu); - nid = of_node_to_nid_single(cpu); - of_node_put(cpu); + int nid = vphn_get_nid(i); /* * Don't fall back to default_nid yet -- we will plug * cpus into nodes once the memory scan has discovered * the topology. */ - if (nid < 0) - continue; - node_set_online(nid); + if (nid == NUMA_NO_NODE) { + cpu = of_get_cpu_node(i, NULL); + BUG_ON(!cpu); + nid = of_node_to_nid_single(cpu); + of_node_put(cpu); + } + + if (likely(nid > 0)) + node_set_online(nid); } get_n_mem_cells(&n_mem_addr_cells, &n_mem_size_cells);
Node id queried from the static device tree may not be correct. For example: it may always show 0 on a shared processor. Hence prefer the node id queried from vphn and fallback on the device tree based node id if vphn query fails. Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-mm@kvack.org Cc: Michal Hocko <mhocko@suse.com> Cc: Mel Gorman <mgorman@suse.de> Cc: Vlastimil Babka <vbabka@suse.cz> Cc: Christopher Lameter <cl@linux.com> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Gautham R Shenoy <ego@linux.vnet.ibm.com> Cc: Satheesh Rajendran <sathnaga@linux.vnet.ibm.com> Cc: David Hildenbrand <david@redhat.com> Cc: Aneesh Kumar KV <aneesh.kumar@linux.ibm.com> Signed-off-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com> --- Changelog v2:->v3: - Resolved comments from Gautham. Link v2: https://lore.kernel.org/linuxppc-dev/20200428093836.27190-1-srikar@linux.vnet.ibm.com/t/#u Changelog v1:->v2: - Rebased to v5.7-rc3 arch/powerpc/mm/numa.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-)