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=-5.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham 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 7DE50C18E5B for ; Tue, 17 Mar 2020 14:22:46 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4C10F20735 for ; Tue, 17 Mar 2020 14:22:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4C10F20735 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.ibm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id DCB756B0005; Tue, 17 Mar 2020 10:22:45 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D7AAF6B0006; Tue, 17 Mar 2020 10:22:45 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C42BD6B0007; Tue, 17 Mar 2020 10:22:45 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0096.hostedemail.com [216.40.44.96]) by kanga.kvack.org (Postfix) with ESMTP id A5DAD6B0005 for ; Tue, 17 Mar 2020 10:22:45 -0400 (EDT) Received: from smtpin08.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 7FB45181AEF07 for ; Tue, 17 Mar 2020 14:22:45 +0000 (UTC) X-FDA: 76605070290.08.bit39_8c7071a7a2604 X-HE-Tag: bit39_8c7071a7a2604 X-Filterd-Recvd-Size: 5046 Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by imf31.hostedemail.com (Postfix) with ESMTP for ; Tue, 17 Mar 2020 14:22:44 +0000 (UTC) Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 02HELZZC097301 for ; Tue, 17 Mar 2020 10:22:44 -0400 Received: from e06smtp02.uk.ibm.com (e06smtp02.uk.ibm.com [195.75.94.98]) by mx0b-001b2d01.pphosted.com with ESMTP id 2yrsdscp0q-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 17 Mar 2020 10:22:44 -0400 Received: from localhost by e06smtp02.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 17 Mar 2020 14:22:42 -0000 Received: from b06cxnps4075.portsmouth.uk.ibm.com (9.149.109.197) by e06smtp02.uk.ibm.com (192.168.101.132) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Tue, 17 Mar 2020 14:22:37 -0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 02HEMbct58589262 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 17 Mar 2020 14:22:37 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E26F34C040; Tue, 17 Mar 2020 14:22:36 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C22224C046; Tue, 17 Mar 2020 14:22:34 +0000 (GMT) Received: from in.ibm.com (unknown [9.199.32.136]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Tue, 17 Mar 2020 14:22:34 +0000 (GMT) Date: Tue, 17 Mar 2020 19:52:32 +0530 From: Bharata B Rao To: Srikar Dronamraju Cc: Andrew Morton , linux-mm@kvack.org, Mel Gorman , Michael Ellerman , Sachin Sant , Michal Hocko , Christopher Lameter , linuxppc-dev@lists.ozlabs.org, Joonsoo Kim , Kirill Tkhai , Vlastimil Babka Subject: Re: [PATCH 4/4] powerpc/numa: Set fallback nodes for offline nodes Reply-To: bharata@linux.ibm.com References: <3381CD91-AB3D-4773-BA04-E7A072A63968@linux.vnet.ibm.com> <20200317131753.4074-1-srikar@linux.vnet.ibm.com> <20200317131753.4074-5-srikar@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200317131753.4074-5-srikar@linux.vnet.ibm.com> User-Agent: Mutt/1.12.1 (2019-06-15) X-TM-AS-GCONF: 00 x-cbid: 20031714-0008-0000-0000-0000035EC18B X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 20031714-0009-0000-0000-00004A80187D Message-Id: <20200317142232.GB26049@in.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.645 definitions=2020-03-17_05:2020-03-17,2020-03-17 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 phishscore=0 suspectscore=0 spamscore=0 lowpriorityscore=0 impostorscore=0 mlxscore=0 adultscore=0 malwarescore=0 mlxlogscore=999 clxscore=1015 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2003170059 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: This patchset can also fix a related problem that I reported earlier at https://lists.ozlabs.org/pipermail/linuxppc-dev/2020-March/206076.html with an additional change, suggested by Srikar as shown below: On Tue, Mar 17, 2020 at 06:47:53PM +0530, Srikar Dronamraju wrote: > Currently fallback nodes for offline nodes aren't set. Hence by default > node 0 ends up being the default node. However node 0 might be offline. > > Fix this by explicitly setting fallback node. Ensure first_memory_node > is set before kernel does explicit setting of fallback node. > > arch/powerpc/mm/numa.c | 11 ++++++++++- > 1 file changed, 10 insertions(+), 1 deletion(-) > > diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c > index 281531340230..6e97ab6575cb 100644 > --- a/arch/powerpc/mm/numa.c > +++ b/arch/powerpc/mm/numa.c > @@ -827,7 +827,16 @@ void __init dump_numa_cpu_topology(void) > if (!numa_enabled) > return; > > - for_each_online_node(node) { > + for_each_node(node) { > + /* > + * For all possible but not yet online nodes, ensure their > + * node_numa_mem is set correctly so that kmalloc_node works > + * for such nodes. > + */ > + if (!node_online(node)) { Change the above line to like below: + if (!node_state(node, N_MEMORY)) { Regards, Bharata.