Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp3390390rwb; Mon, 5 Sep 2022 10:46:52 -0700 (PDT) X-Google-Smtp-Source: AA6agR4LALSocQw7NYCS/p32L9hWWcfX2iIiC+1uBg9094ef43CaxLDoVUdJfFjCEanqaifWBhR7 X-Received: by 2002:a17:90b:1bc8:b0:200:43c7:5940 with SMTP id oa8-20020a17090b1bc800b0020043c75940mr9484135pjb.46.1662400012243; Mon, 05 Sep 2022 10:46:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662400012; cv=none; d=google.com; s=arc-20160816; b=UmXUVcWESkHfHC9pm6ax3WuUUfK4LYugOpv5UJ8vZuVyqaV6oz75ccD9vJn+K97t3l uzUbcv8J6bebtwi1hxc9O3xYl9ALriHDuJ4yRtZ79TncqFZHy0hxs/Wm8XtcyIxKs8QL GjELosP9+0kPPyUCKAG5ZVelh0K6LvvZgDvueP/ggQOCQxdN3UmIALlWGZs1v9+IRL0a J+tSxXPI3XUTx65bSDlX0FYCxGEfhUkzE9aUfLYeJYI5VY2zntNHrmmVl25HqACzBmH2 xsS0lgojH7bSaAadbf8UDAvqUydWK/HAUAkjLCuzE17HBXtpSuip88hngtiB1KM3KQok dJxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=4n3PkesAxfqTP4ijj/3fri2lVSH20l8Js5nGhqtIr38=; b=tHGlMiIiirdJ7hTGRhmdzvoy+PhQUZiLoMWydzN6cf0o4nM2Qio0Iq9LFzXgWB6y1H 4cvy0iTxwshQLUvK59xVhG0lTxwXBkcH3GuCxOeprt8xMoAkSPURfF1cE4ayConetR34 tfcqpd1IcPg5UnVHAdYAuMJuUVZXOWzgcu70F4/i/CG4+2jnQ5k8X9CT776J9L1PTlxi KfW57ZBnrFf6PJoABjJBwILRfCkti5fYvSELodqjmoA3AS7Gb0HD82MazDmuoevi2XaH NnMlGGhJ11Bl6G7E4S/mkxwSc4J4+Ttrg1QgmFt9fJKvNO6t/mhap4Cl3Yt9b31a8IFw zcQw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b35-20020a630c23000000b0041dcd13c180si11079726pgl.366.2022.09.05.10.46.40; Mon, 05 Sep 2022 10:46:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237829AbiIERHx (ORCPT + 99 others); Mon, 5 Sep 2022 13:07:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60584 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230447AbiIERHw (ORCPT ); Mon, 5 Sep 2022 13:07:52 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 187665E652 for ; Mon, 5 Sep 2022 10:07:50 -0700 (PDT) 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 F1C39139F; Mon, 5 Sep 2022 10:07:55 -0700 (PDT) Received: from bogus (unknown [10.57.45.93]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id AD8B93F534; Mon, 5 Sep 2022 10:07:47 -0700 (PDT) Date: Mon, 5 Sep 2022 18:07:23 +0100 From: Sudeep Holla To: Yicong Yang Cc: vincent.guittot@linaro.org, ionela.voinescu@arm.com, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, rafael@kernel.org, 21cnbao@gmail.com, jonathan.cameron@huawei.com, linuxarm@huawei.com, prime.zeng@huawei.com, yangyicong@hisilicon.com Subject: Re: [PATCH v3] arch_topology: Make cluster topology span at least SMT CPUs Message-ID: <20220905170723.ppikgcjtjwe2nj63@bogus> References: <20220905122615.12946-1-yangyicong@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220905122615.12946-1-yangyicong@huawei.com> X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 05, 2022 at 08:26:15PM +0800, Yicong Yang wrote: > From: Yicong Yang > > Currently cpu_clustergroup_mask() will return CPU mask if cluster span more > or the same CPUs as cpu_coregroup_mask(). This will result topology borken > on non-Cluster SMT machines when building with CONFIG_SCHED_CLUSTER=y. > > Test with: > qemu-system-aarch64 -enable-kvm -machine virt \ > -net none \ > -cpu host \ > -bios ./QEMU_EFI.fd \ > -m 2G \ > -smp 48,sockets=2,cores=12,threads=2 \ > -kernel $Image \ > -initrd $Rootfs \ > -nographic > -append "rdinit=init console=ttyAMA0 sched_verbose loglevel=8" > > We'll get below error: > [ 3.084568] BUG: arch topology borken > [ 3.084570] the SMT domain not a subset of the CLS domain > > Since cluster is a level higher than SMT, fix this by making cluster > spans at least SMT CPUs. > > Cc: Sudeep Holla Sorry for missing to figure this out earlier and thanks for fixing it. Reviewed-by: Sudeep Holla -- Regards, Sudeep