Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp964417rwr; Thu, 4 May 2023 12:03:14 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5qkuG5zhIGDe4cpMwCe6/wbtKl1LMtuYbzZXP/toV5G+wi8enRoumFkd+wV0m8hmLpVD7Y X-Received: by 2002:a17:90b:f08:b0:24d:ec21:b83c with SMTP id br8-20020a17090b0f0800b0024dec21b83cmr2988595pjb.16.1683226994216; Thu, 04 May 2023 12:03:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683226994; cv=none; d=google.com; s=arc-20160816; b=DDFMbvjH3PACJTElTlnRJ96C+hDhJQPvhnag190P6Zo/EFz9VtDSAU/hvP8xynkDuY Aek/g9Ywv/L4fTmkSarvyCuWr9tHwcGB1skcDShu6vr8f+9Lb/NElCRG0j4IXyqf3bFy hqMOQs+OLiM5Wc0n4sTLpWYMmlr1vwFdrRGSx/HN/LSL0nQOKWMB/LISrN9nT3Qp4hcE 1Ch787ovSJUhz1dmBiXU7vwLmZ8XY/xa1cPm3pXZDpsl6WBk+HRVqpMZ381BEMXPtiyR s5XoKwC5JeSpoFGPeVfAvA0LfQH/2Ypz9YYewmQMHdvJrxSxEZd0A3ME7UOm32/b5b+z uCeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=OIAcVs2YXBnNfaPvpuizW2PEW4lhJ1YnG6MUoZkO7aY=; b=AHg+9CfV3Xw7AK5c/SuoFtn32maZ3Qq4d/mo07gspjEIFzKKuIxYFT383JyrKNhWmq UMzmBc/1/bAOxqa0sRGhxB5kwiTtm2gFw/vVAZfO8CaQMcrJjcfI14e8S8N1Nxhb5X1U v8yMlmbQ3kE/dE3qqofrqdL7KcNpvaF8gqHr8+kz5t7nc8wxmyxLQcj/vqphbRP28Ste 04uY4+9Q8Q6g+5CF2MWK/uUAAxhIMPTahKm6jNST6/HQr0a9ACbxljeIYEXPOaYd/njo Q4TfULw5a1L6mDKQpLqId6iSlGNilAmtSWUCe/U6x9LxYcE0Mu8zh/VknaqqaGeEB50H ZPAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=3+tD+LTP; dkim=neutral (no key) header.i=@linutronix.de header.b=pPb8Wqh2; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o12-20020a170902d4cc00b0019cd3a6016esi35234169plg.210.2023.05.04.12.02.54; Thu, 04 May 2023 12:03:14 -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; dkim=pass header.i=@linutronix.de header.s=2020 header.b=3+tD+LTP; dkim=neutral (no key) header.i=@linutronix.de header.b=pPb8Wqh2; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229944AbjEDSqU (ORCPT + 99 others); Thu, 4 May 2023 14:46:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43292 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229680AbjEDSqS (ORCPT ); Thu, 4 May 2023 14:46:18 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9A5F83C33; Thu, 4 May 2023 11:46:17 -0700 (PDT) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1683225976; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=OIAcVs2YXBnNfaPvpuizW2PEW4lhJ1YnG6MUoZkO7aY=; b=3+tD+LTP2nHbLKQ6ayQSSKK8VpBIuQK3gXforAfUYbXvx4vM+fYGuufKzSpG2saVKOpTsV to0Q6mzIGbAQjDqsOQkje2Tja0U/TKz3F+TviP3kf+19hr3bEm6s4uGo2F+s+PdBgPIGkj gHjK9Yi0pM4GUZc5ZpONvd31Hppwcu+Bcbd8TlaOcVKhOuZIjToIAW5YXeXW3Go5sZpcCh htSi5EE8To3+PKCGlsNtyNrMRTsE8PlVdNzqWmd8pkRxZ1vMQC2VO2mXVu6cVctYauCbM0 4H8XFlx6BIILGrhdr/EBrOtC8Cm0866nFAfWkkLlHu0QtdUMHZ2jk6jWm8xf3Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1683225976; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=OIAcVs2YXBnNfaPvpuizW2PEW4lhJ1YnG6MUoZkO7aY=; b=pPb8Wqh2Bj6AkjBEVHoo9nA/DLOEH7EgQ6O+EgS1RtAjQlyepgF0Tr/3dF7rDdC5tR1PRC DisRQOSHrsQxZlDw== To: "Michael Kelley (LINUX)" , LKML Cc: "x86@kernel.org" , David Woodhouse , Andrew Cooper , Brian Gerst , Arjan van de Veen , Paolo Bonzini , Paul McKenney , Tom Lendacky , Sean Christopherson , Oleksandr Natalenko , Paul Menzel , "Guilherme G. Piccoli" , Piotr Gorski , David Woodhouse , Usama Arif , Juergen Gross , Boris Ostrovsky , "xen-devel@lists.xenproject.org" , Russell King , Arnd Bergmann , "linux-arm-kernel@lists.infradead.org" , Catalin Marinas , Will Deacon , Guo Ren , "linux-csky@vger.kernel.org" , Thomas Bogendoerfer , "linux-mips@vger.kernel.org" , "James E.J. Bottomley" , Helge Deller , "linux-parisc@vger.kernel.org" , Paul Walmsley , Palmer Dabbelt , "linux-riscv@lists.infradead.org" , Mark Rutland , Sabin Rapan Subject: RE: [patch 00/37] cpu/hotplug, x86: Reworked parallel CPU bringup In-Reply-To: References: <20230414225551.858160935@linutronix.de> Date: Thu, 04 May 2023 20:46:15 +0200 Message-ID: <878re43pfs.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 Michael! On Thu, Apr 27 2023 at 14:48, Michael Kelley wrote: > From: Thomas Gleixner Sent: Friday, April 14, 2023 4:44 PM > > I smoke-tested several Linux guest configurations running on Hyper-V, > using the "kernel/git/tglx/devel.git hotplug" tree as updated on April 26th. > No functional issues, but encountered one cosmetic issue (details below). > > Configurations tested: > * 16 vCPUs and 32 vCPUs > * 1 NUMA node and 2 NUMA nodes > * Parallel bring-up enabled and disabled via kernel boot line > * "Normal" VMs and SEV-SNP VMs running with a paravisor on Hyper-V. > This config can use parallel bring-up because most of the SNP-ness is > hidden in the paravisor. I was glad to see this work properly. > > There's not much difference in performance with and without parallel > bring-up on the 32 vCPU VM. Without parallel, the time is about 26 > milliseconds. With parallel, it's about 24 ms. So bring-up is already > fast in the virtual environment. Depends on the environment :) > The cosmetic issue is in the dmesg log, and arises because Hyper-V > enumerates SMT CPUs differently from many other environments. In > a Hyper-V guest, the SMT threads in a core are numbered as > pairs. Guest CPUs #0 & #1 are SMT threads in core, as are #2 & #3, etc. With > parallel bring-up, here's the dmesg output: > > [ 0.444345] smp: Bringing up secondary CPUs ... > [ 0.445139] .... node #0, CPUs: #2 #4 #6 #8 #10 #12 #14 #16 #18 #20 #22 #24 #26 #28 #30 > [ 0.454112] x86: Booting SMP configuration: > [ 0.456035] #1 #3 #5 #7 #9 #11 #13 #15 #17 #19 #21 #23 #25 #27 #29 #31 > [ 0.466120] smp: Brought up 1 node, 32 CPUs > [ 0.467036] smpboot: Max logical packages: 1 > [ 0.468035] smpboot: Total of 32 processors activated (153240.06 BogoMIPS) > > The function announce_cpu() is specifically testing for CPU #1 to output the > "Booting SMP configuration" message. In a Hyper-V guest, CPU #1 is the second > SMT thread in a core, so it isn't started until all the even-numbered CPUs are > started. Ah. Didn't notice that because SMT siblings are usually enumerated after all primary ones in ACPI. > I don't know if this cosmetic issue is worth fixing, but I thought I'd point it out. That's trivial enough to fix. I'll amend the topmost patch before posting V2. Thanks for giving it a ride! tglx