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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D932CC433EF for ; Tue, 24 May 2022 09:07:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:Reply-To:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date: Message-ID:From:References:Cc:To:Subject:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ixmKAJHsdHReSTR+jXdEJEzA9fxBU2lSiB6AdEjnNXI=; b=ZNCbTpnyJXDZMF hACrltKzZmBPqsJfqOEVAcasWKy8WRElECQS59uGxmIFrdC040cyi0tHY7zTLajIYzKCgDleLvNnC VRmmcliLRxk49WulrrELJOzTV+M384yW+IQpKZ0gb3R4fePtO+TcyFQ2cB7OGsoHDeNVl4zp7zZUO lyY15VXbagyPfj2sbUyjWyTQRbBMQUO+LTYHxE4E3PMdJ+f5vwvMiY9pDxBSd92yX6tVZZngASPt8 HrR5sAEsyGANlw/tj57daNUORbTuZiqBEzwXOTR85LuzJm6+Pg2KrScp/yY8nwgmOqHgtF2uIzRLQ yrAyE2NyeusvGiB6LDyg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ntQTz-007MsA-2u; Tue, 24 May 2022 09:05:39 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ntQTv-007Mrg-R0 for linux-arm-kernel@lists.infradead.org; Tue, 24 May 2022 09:05:37 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1653383133; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=991Yoy904FM5Pcpym2p+cdFnBELZSboveUf5hdm5xss=; b=HNSeOJfnPKoUhO/mHf5uW/RSrV5xiXL3OAZxN6YikpNNzUYt2na84rs1tEmQnXbchuE8Dk ffcnf5MTa1cpT6vLPzB/0mV5qiJNqqhx6ZEST5FuoqOOWKXPDIP/iiAkaRUeiwh/mQKEZ9 yhjzdsAUM+UHYEkHwC6kZpFKKb3r/vY= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-600-11oyp70QNwaABnW2F0PlDw-1; Tue, 24 May 2022 05:05:30 -0400 X-MC-Unique: 11oyp70QNwaABnW2F0PlDw-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id DEDC03C025BE; Tue, 24 May 2022 09:05:29 +0000 (UTC) Received: from [10.72.12.91] (ovpn-12-91.pek2.redhat.com [10.72.12.91]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 044692026D6A; Tue, 24 May 2022 09:05:25 +0000 (UTC) Subject: Re: [PATCH] arch_topology: Limit threads to one specific cluster To: Sudeep Holla Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, rafael@kernel.org, Jonathan.Cameron@huawei.com, drjones@redhat.com, zhenyzha@redhat.com, shan.gavin@gmail.com References: <20220524081212.1363105-1-gshan@redhat.com> <20220524085157.o3ie6hjy3tg5of5y@bogus> From: Gavin Shan Message-ID: <7cc4eef4-bdb6-bd53-450b-f2348f722cf5@redhat.com> Date: Tue, 24 May 2022 17:05:22 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.0 MIME-Version: 1.0 In-Reply-To: <20220524085157.o3ie6hjy3tg5of5y@bogus> Content-Language: en-US X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220524_020535_998755_029DF284 X-CRM114-Status: GOOD ( 21.88 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Gavin Shan Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Sudeep, On 5/24/22 4:51 PM, Sudeep Holla wrote: > On Tue, May 24, 2022 at 04:12:12PM +0800, Gavin Shan wrote: >> The sibling information for one particular CPU is updated after ACPI >> PPTT table is parsed. struct cpu_topology::thread_sibling tracks the >> the CPUs in same core. However, cluster isn't considered when it's >> populated. In this case, multiple threads belonging to different >> clusters can be put together through the sibling information. It >> eventually leads to unexpected warning from sched subsystem. >> >> For example, the following warning is observed in a VM where we have >> 2 sockets, 4 clusters, 8 cores and 16 threads and the CPU topology >> is populated as below. >> >> CPU Socket-ID Cluster-ID Core-ID Thread-ID >> ---------------------------------------------- >> 0 0 0 0 0 >> 1 0 0 0 1 >> 2 0 0 1 0 >> 3 0 0 1 1 >> 4 0 1 0 0 >> 5 0 1 0 1 >> 6 0 1 1 0 >> 7 0 1 1 1 >> 8 1 0 0 0 >> 9 1 0 0 1 >> 10 1 0 1 0 >> 11 1 0 1 1 >> 12 1 1 0 0 >> 13 1 1 0 1 >> 14 1 1 1 0 >> 15 1 1 1 1 >> >> [ 0.592181] CPU: All CPU(s) started at EL1 >> [ 0.593766] alternatives: patching kernel code >> [ 0.595890] BUG: arch topology borken >> [ 0.597210] the SMT domain not a subset of the CLS domain >> [ 0.599286] child=0-1,4-5 sd=0-3 >> >> # cat /sys/devices/system/cpu/cpu0/topology/cluster_cpus_list >> 0-3 >> # cat /sys/devices/system/cpu/cpu0/topology/thread_siblings_list >> 0-1,4-5 >> >> This fixes the issue by limiting threads to one specific cluster. >> With this applied, the unexpected warning disappears in the VM. >> > > I have similar fix but as part of bigger series[1] to get DT support in > line with ACPI. > Your patch resolves the issue I have. So please ignore mine. Sorry for the noise. https://lore.kernel.org/lkml/20220518093325.2070336-3-sudeep.holla@arm.com # cat /sys/devices/system/cpu/cpu0/topology/cluster_cpus_list 0-3 # cat /sys/devices/system/cpu/cpu0/topology/thread_siblings_list 0-1 Thanks, Gavin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel