Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp325364img; Mon, 18 Mar 2019 04:08:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqwF4GEmDzU1r5M0J6oH04jn9JcnHMWxG+w5Zo5g9qRA4UuQMRst6f+OGg2FZg6wRbdAsJ8o X-Received: by 2002:a17:902:f095:: with SMTP id go21mr18789878plb.199.1552907320204; Mon, 18 Mar 2019 04:08:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552907320; cv=none; d=google.com; s=arc-20160816; b=k9VlnZlerHAdmsN4dToQzLFlSlOhjiZ6MxzHA9t7CLxScKgFsrV/IcYURLojNZ+cK+ zYz+TfglQo4hi2E8frCWOSqVI4LIxeFln8VDhc57kt3SLrBt8BiGsgQij5TtRQIO7TEK 6OFklpidGBnZQn7cEl5Rzs5yzIVbmGV1LK1gMr3DR5dnpG5t8QL9AHiXdnR+xI2vsUpI Z1qCZHDjYcSLVcHFXznnHrfAMhuxhw1sG8dVzBar4fg9rlFw7g30GA+1obkaX+HKZCD7 rT6gpBh7boqs6abHNKuXc/3UQkYkzI36J5tGTtlbVYRFm3/+gMWkX8Hzcsuq6ogtuFjc zM0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:user-agent:in-reply-to :content-disposition:mime-version:references:reply-to:subject:cc:to :from:date; bh=w96w7vZhzOBOGqbaUY0uybiJgZzYr9wq/NoieIBVo0Q=; b=qPJHWoIbejKPvxSP99Z9zVh5FhGv9Bhki3do+4HXN7sNg/K1L2W4J5okI39Hhl8LLt 1B92a/go9y8NZDDeCoizuRL7qoEU8dGOcYwEq5mLAuDPr9WoVG3oH6DpBYqEf2rHwtPE VtdUD6EBO92+ZC7Enk3kPNtJo0/Nt4GjOTdJEf1oUDPK163A+JPD2bSbciuCVXCN/2nl TDwO5SbpqjsZnkxRVubyjaKOBczjG29WBD7SDHcwsUZ3jiV2FQ5+NLY2b0bZsl5FQ5UH p5SHsDlXIO6GwNnV2PB2wVvQaxW0/ASLuEApHhHhYL+7/hKdWxPY08xx5Szmv+SdkzCC azaw== 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=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 25si8943275pgt.419.2019.03.18.04.08.24; Mon, 18 Mar 2019 04:08:40 -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=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727124AbfCRLGV (ORCPT + 99 others); Mon, 18 Mar 2019 07:06:21 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:43482 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726452AbfCRLGV (ORCPT ); Mon, 18 Mar 2019 07:06:21 -0400 Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x2IB4ERm092014 for ; Mon, 18 Mar 2019 07:06:20 -0400 Received: from e06smtp07.uk.ibm.com (e06smtp07.uk.ibm.com [195.75.94.103]) by mx0a-001b2d01.pphosted.com with ESMTP id 2raa1c0ev9-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 18 Mar 2019 07:06:19 -0400 Received: from localhost by e06smtp07.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 18 Mar 2019 11:06:17 -0000 Received: from b06cxnps4075.portsmouth.uk.ibm.com (9.149.109.197) by e06smtp07.uk.ibm.com (192.168.101.137) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Mon, 18 Mar 2019 11:06:14 -0000 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x2IB6Ej135455214 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 18 Mar 2019 11:06:14 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 22AB811C05B; Mon, 18 Mar 2019 11:06:14 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2517B11C04C; Mon, 18 Mar 2019 11:06:11 +0000 (GMT) Received: from linux.vnet.ibm.com (unknown [9.126.150.29]) by d06av25.portsmouth.uk.ibm.com (Postfix) with SMTP; Mon, 18 Mar 2019 11:06:10 +0000 (GMT) Date: Mon, 18 Mar 2019 16:36:10 +0530 From: Srikar Dronamraju To: Laurent Vivier Cc: linux-kernel@vger.kernel.org, Suravee Suthikulpanit , Borislav Petkov , David Gibson , Michael Ellerman , Nathan Fontenot , Michael Bringmann , linuxppc-dev@lists.ozlabs.org, Ingo Molnar , Peter Zijlstra Subject: Re: [RFC v3] sched/topology: fix kernel crash when a CPU is hotplugged in a memoryless node Reply-To: Srikar Dronamraju References: <20190304195952.16879-1-lvivier@redhat.com> <77b142fe-0886-1510-28bd-d432ea2c796a@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <77b142fe-0886-1510-28bd-d432ea2c796a@redhat.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-TM-AS-GCONF: 00 x-cbid: 19031811-0028-0000-0000-0000035561FD X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19031811-0029-0000-0000-00002413F9B0 Message-Id: <20190318110610.GB4450@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-03-18_08:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1903180085 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Laurent Vivier [2019-03-15 12:12:45]: > > Another way to avoid the nodes overlapping for the offline nodes at > startup is to ensure the default values don't define a distance that > merge all offline nodes into node 0. > > A powerpc specific patch can workaround the kernel crash by doing this: > > diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c > index 87f0dd0..3ba29bb 100644 > --- a/arch/powerpc/mm/numa.c > +++ b/arch/powerpc/mm/numa.c > @@ -623,6 +623,7 @@ static int __init parse_numa_properties(void) > struct device_node *memory; > int default_nid = 0; > unsigned long i; > + int nid, dist; > > if (numa_enabled == 0) { > printk(KERN_WARNING "NUMA disabled by user\n"); > @@ -636,6 +637,10 @@ static int __init parse_numa_properties(void) > > dbg("NUMA associativity depth for CPU/Memory: %d\n", > min_common_depth); > > + for (nid = 0; nid < MAX_NUMNODES; nid ++) > + for (dist = 0; dist < MAX_DISTANCE_REF_POINTS; dist++) > + distance_lookup_table[nid][dist] = nid; > + The only reason, this would have worked in the specific case, is because we are overriding the distance_lookup_table with a unique distance. So node_distance for any other node other than itself will return max distance which is 40 in this case. (since distance_ref_points_depth is 2) I am not sure if this will work if the node distance between the two nodes happens to be 20. > /* > * Even though we connect cpus to numa domains later in SMP > * init, we need to know the node ids now. This is because > -- Thanks and Regards Srikar Dronamraju