Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp21537110ybl; Mon, 6 Jan 2020 06:32:38 -0800 (PST) X-Google-Smtp-Source: APXvYqyLaauOd/2z+zDBUKpTpqAu1qDGyWydg+lnaFty1rE1IUmfTr6FmbaPQTNuEK+UgW5xUuBm X-Received: by 2002:a9d:7d09:: with SMTP id v9mr99605243otn.338.1578321158176; Mon, 06 Jan 2020 06:32:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578321158; cv=none; d=google.com; s=arc-20160816; b=goqFzLOASHsAfxds5MV54A5R10u5DkPy4fiWKD992mTFgePVseUu2Hlyjq5fxv+ndZ JVE7BjXKNzEJJCjFq3t2ybfD6ClVJZep/hMnkq+dCTxLvO5yAUMYMwaqeVBWtDuFlZNT Onhyv/bZx+uIt4WdDGWVYCMTdobNl8gY/CK+TxW4v64saDBLFUXQJGjplLMjIis/Na9R NL9VHXPuNHqXJt1XTtrWassEnfRhoCcL2Vq4EAw2Ynw+8cd6/mY9MOdKyXXyfuHV7DNh W8w0FoFbIjhazK+a0UbiW0u0uqEUR5fg4vM0zygQ28T6HedXhDapiuMMiTLYFGkcZIN/ NJAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=265OHPIF5LkCJAPTx5wZINcTKEnb/Hmo4cikummhh1M=; b=BvgES0HmB4vNN2gsxw8rOlAZYDKHlYlRpfUKeF9JGVjrHK9ypxTHzNyO8TIPB9ply1 ++adH7jfer8cUYGObYOst0I45qxk2sldos7EYWrcI5iuddTe+YtnBkJAqeogYoC+z+2L vsu9zFfsi0y/rfAB4YBGeCeWKq/3RiI5uxEgO/+mnh95nsl+Jj5BkBqzaF8LrPiQ1O0S XAXEDBd4I8fI0ASaDcSAp/1GZ09uWXZ9Zm1gdJxw0ZTAaRppCNX6fOf+fLP7PU6vn5WV dp7h9YyGPA2qzv5DHjsT2324mzig0C7Hl5TRfEJOueCyVPh32cqxFK+cG856VCnPH0IA ThiQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h18si4310284otr.265.2020.01.06.06.32.24; Mon, 06 Jan 2020 06:32:38 -0800 (PST) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726454AbgAFOb1 (ORCPT + 99 others); Mon, 6 Jan 2020 09:31:27 -0500 Received: from foss.arm.com ([217.140.110.172]:44612 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726303AbgAFOb1 (ORCPT ); Mon, 6 Jan 2020 09:31:27 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id BA4A231B; Mon, 6 Jan 2020 06:31:26 -0800 (PST) Received: from [192.168.0.7] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 8043E3F6C4; Mon, 6 Jan 2020 06:31:25 -0800 (PST) Subject: Re: [PATCH] cpu-topology: warn if NUMA configurations conflicts with lower layer To: "Zengtao (B)" , Valentin Schneider , Sudeep Holla Cc: Linuxarm , Greg Kroah-Hartman , "Rafael J. Wysocki" , "linux-kernel@vger.kernel.org" , Morten Rasmussen References: <1577088979-8545-1-git-send-email-prime.zeng@hisilicon.com> <20191231164051.GA4864@bogus> <678F3D1BB717D949B966B68EAEB446ED340AE1D3@dggemm526-mbx.china.huawei.com> <20200102112955.GC4864@bogus> <678F3D1BB717D949B966B68EAEB446ED340AEB67@dggemm526-mbx.china.huawei.com> <678F3D1BB717D949B966B68EAEB446ED340AFCA0@dggemm526-mbx.china.huawei.com> <7b375d79-2d3c-422b-27a6-68972fbcbeaf@arm.com> <66943c82-2cfd-351b-7f36-5aefdb196a03@arm.com> <678F3D1BB717D949B966B68EAEB446ED340B3203@dggemm526-mbx.china.huawei.com> From: Dietmar Eggemann Message-ID: <51a7d543-e35f-6492-fa51-02828832c154@arm.com> Date: Mon, 6 Jan 2020 15:31:24 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: <678F3D1BB717D949B966B68EAEB446ED340B3203@dggemm526-mbx.china.huawei.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/01/2020 02:48, Zengtao (B) wrote: [...] >> -----Original Message----- >> From: Dietmar Eggemann [mailto:dietmar.eggemann@arm.com] >> Sent: Saturday, January 04, 2020 1:21 AM >> To: Valentin Schneider; Zengtao (B); Sudeep Holla >> Cc: Linuxarm; Greg Kroah-Hartman; Rafael J. Wysocki; >> linux-kernel@vger.kernel.org; Morten Rasmussen >> Subject: Re: [PATCH] cpu-topology: warn if NUMA configurations conflicts >> with lower layer >> >> On 03/01/2020 13:14, Valentin Schneider wrote: >>> On 03/01/2020 10:57, Valentin Schneider wrote: >> Still don't see the actual problem case. The closest I came is: >> >> qemu-system-aarch64 -kernel ... -append ' ... loglevel=8 sched_debug' >> -smp cores=4,sockets=2 ... -numa node,cpus=0-2,nodeid=0 >> -numa node,cpus=3-7,nodeid=1 >> > > It's related to the HW topology, if you hw have got 2 clusters 0~3, 4~7, > with the mainline qemu, you will see the issue. > I think you can manually modify the MPIDR parsing to reproduce the > issue. > Linux will use the MPIDR to guess the MC topology since currently qemu > don't provide it. > Refer to: https://patchwork.ozlabs.org/cover/939301/ That makes sense to me. Valentin and I already discussed this setup as a possible system where this issue can happen. I already suspected that virt machines only support flat cpu toplogy. Good to know. Although I was able to to pass '... -smp cores=8 -dtb foo.dtb ...' into mainline qemu to achieve a 2 cluster system (MC and DIE sd level) with an extra cpu-map entry in the dts file: cpu-map { cluster0 { core0 { cpu = <&A53_0>; }; ... }; cluster1 { core0 { cpu = <&A53_4>; }; ... }; }; But I didn't succeed in combining this with the '... -numa node,cpus=0-3,nodeid=0 -numa node,cpus=4-7,nodeid=1 ...' params to create a system like yours. Your issue is related to the 'numa mask check for scheduler MC selection' functionality. It was introduced by commit 37c3ec2d810f and re-introduced by commit e67ecf647020 later. I don't know why we need this functionality? How does your setup behave when you revert commit e67ecf647020? Or do you want an explicit warning in case of NUMA boundaries not respecting physical topology?