Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp312256img; Mon, 18 Mar 2019 03:50:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqzILaeXPKtkIQF+qDTKmFEm8TrYgKy7i2ID+yZh3L7khMfvnxRKMIMv8/1OD/BQS9gtk3T7 X-Received: by 2002:a63:dc4a:: with SMTP id f10mr15966503pgj.231.1552906204823; Mon, 18 Mar 2019 03:50:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552906204; cv=none; d=google.com; s=arc-20160816; b=hYf83oZ1TlzN9k0T7u4Vf8xxb/m3HWaEsS8AiBfKc8+E9UhOljC544NMr3iO/NeyH8 upP7q7N0+aTOoOah7mLWJ6v7sApNHt3WP/+29T+9xLmXrC22Cj1L9wGHs9wS7CejrojS Kg+dYwVvf00IXwRXZezomDtUdKPoDcPGE8Q6ZNXyHAEdBjdeSTvAu9LCHvdBntLe0Ofs gB+PWcft1Mz+GC8G1CLSlXWEtwcw9OjSoZgSO/ki2NOsq5nJJwrX54WUWIV5PRQ75AU6 sYerRICftw+28+RD2L8CvlQ0qbso6GmBSc8eG/2jxJS75pv5yzWO1JZa713XRQSXBk/S ThnQ== 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=6pKLSse9KhnPfIXU2KcqjOFZbW1WZgx63mFk65VVv0Y=; b=1EkBQBLPoyubHMh6KNmwrrL1HOEM1qbXTkvA3nHTqudFO9kedliELR19ZbN2e3Ku44 R3iR3LzHaKG4jQXOnhpfSyp8u/9l31jOu8eOSyKQK3ckPKNc+wHAr57ODy+G/FAkxXlc 8NGCbnYQub/HcVmlrjLXN3CGplg9Xu5KUPQO/ikyyEVkp2HpYNAgu779kHuHwFJroNjs 29xsOE+Xbl8iKOWwSydcbhYR99tooVdM+iCl4ADbvQ7Ukm9F9/gctlLhSq16OmNvWXOX Cm7JV8enOe6udybMd/mGHATJMQkrHqjIv19g4che3sNtWS/CTBjSJoRqetGIGQPJf42v o+9g== 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 x9si8939669pll.228.2019.03.18.03.49.49; Mon, 18 Mar 2019 03:50:04 -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 S1727390AbfCRKrl (ORCPT + 99 others); Mon, 18 Mar 2019 06:47:41 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:54412 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727234AbfCRKrl (ORCPT ); Mon, 18 Mar 2019 06:47:41 -0400 Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x2IAiHpn067531 for ; Mon, 18 Mar 2019 06:47:39 -0400 Received: from e06smtp05.uk.ibm.com (e06smtp05.uk.ibm.com [195.75.94.101]) by mx0b-001b2d01.pphosted.com with ESMTP id 2ra786ytwb-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 18 Mar 2019 06:47:39 -0400 Received: from localhost by e06smtp05.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 18 Mar 2019 10:47:34 -0000 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) by e06smtp05.uk.ibm.com (192.168.101.135) 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 10:47:31 -0000 Received: from b06wcsmtp001.portsmouth.uk.ibm.com (b06wcsmtp001.portsmouth.uk.ibm.com [9.149.105.160]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x2IAlXs241418764 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 18 Mar 2019 10:47:33 GMT Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5AFDCA4067; Mon, 18 Mar 2019 10:47:33 +0000 (GMT) Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6E348A405F; Mon, 18 Mar 2019 10:47:31 +0000 (GMT) Received: from linux.vnet.ibm.com (unknown [9.126.150.29]) by b06wcsmtp001.portsmouth.uk.ibm.com (Postfix) with SMTP; Mon, 18 Mar 2019 10:47:31 +0000 (GMT) Date: Mon, 18 Mar 2019 16:17:30 +0530 From: Srikar Dronamraju To: Peter Zijlstra Cc: Laurent Vivier , linux-kernel@vger.kernel.org, Suravee Suthikulpanit , Borislav Petkov , David Gibson , Michael Ellerman , Nathan Fontenot , Michael Bringmann , linuxppc-dev@lists.ozlabs.org, Ingo Molnar 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> <20190305115952.GH32477@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <20190305115952.GH32477@hirez.programming.kicks-ass.net> User-Agent: Mutt/1.10.1 (2018-07-13) X-TM-AS-GCONF: 00 x-cbid: 19031810-0020-0000-0000-00000324A9D4 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19031810-0021-0000-0000-00002176BC02 Message-Id: <20190318104730.GA4450@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-1903180082 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > node 0 (because firmware doesn't provide the distance information for > > memoryless/cpuless nodes): > > > > node 0 1 2 3 > > 0: 10 40 10 10 > > 1: 40 10 40 40 > > 2: 10 40 10 10 > > 3: 10 40 10 10 > > *groan*... what does it do for things like percpu memory? ISTR the > per-cpu chunks are all allocated early too. Having them all use memory > out of node-0 would seem sub-optimal. In the specific failing case, there is only one node with memory; all other nodes are cpu only nodes. However in the generic case since its just a cpu hotplug ops, the memory allocated for per-cpu chunks allocated early would remain. May be Michael Ellerman can correct me here. > > > We should have: > > > > node 0 1 2 3 > > 0: 10 40 40 40 > > 1: 40 10 40 40 > > 2: 40 40 10 40 > > 3: 40 40 40 10 > > Can it happen that it introduces a new distance in the table? One that > hasn't been seen before? This example only has 10 and 40, but suppose > the new node lands at distance 20 (or 80); can such a thing happen? > > If not; why not? Yes distances can be 20, 40 or 80. There is nothing that makes the node distance to be 40 always. > So you're relying on sched_domain_numa_masks_set/clear() to fix this up, > but that in turn relies on the sched_domain_numa_levels thing to stay > accurate. > > This all seems very fragile and unfortunate. > Any reasons why this is fragile? -- Thanks and Regards Srikar Dronamraju