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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B552DC64EC4 for ; Wed, 22 Feb 2023 10:11:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231965AbjBVKLi (ORCPT ); Wed, 22 Feb 2023 05:11:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50390 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231135AbjBVKLg (ORCPT ); Wed, 22 Feb 2023 05:11:36 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6508E311C1; Wed, 22 Feb 2023 02:11:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=MIME-Version:Content-Type:References: In-Reply-To:Date:Cc:To:From:Subject:Message-ID:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=6RLhAU+f6q95oZiSHcBDbYXj999knVkAB3pQvxE3sTY=; b=U2s3JDJ+wTHGlqmzJFyZR8V18H cXtVf98VCqIGkz9yIcReZPUGSD0jLEN+C3wUEnDtmhrQ3rufgKfMR/FEu9KWE0n0JLj8SFFPUEQFZ n21w47m2E0bznjeZNnuxgEUaNFHgTNhZTfpOrrOcGa4W1D4xsAaPZgpITP48ElZMnlmzrV74wan6o rX1mEptjizqdtz3nWMjVBcfHvtugCR0lJI9ym+Gkezjp7Ac3/lfRatH0hwPnAt3hD7axNFnv1M4Xs ywIFrqqoxaFEU0X+Kv6E1YoUgQGMD2/vkQTHzMhSya46AUnvm6CJDft8C48kYXyOg1bf4r0KZmGgr ym3vpf5Q==; Received: from [2001:8b0:10b:5::bb3] (helo=u3832b3a9db3152.ant.amazon.com) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1pUm5a-00DNQX-Dz; Wed, 22 Feb 2023 10:11:07 +0000 Message-ID: <62ee53770b4010f065346b7f2a1200013836be97.camel@infradead.org> Subject: Re: [PATCH v9 0/8] Parallel CPU bringup for x86_64 From: David Woodhouse To: Usama Arif , tglx@linutronix.de, kim.phillips@amd.com Cc: arjan@linux.intel.com, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, x86@kernel.org, pbonzini@redhat.com, paulmck@kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, rcu@vger.kernel.org, mimoja@mimoja.de, hewenliang4@huawei.com, thomas.lendacky@amd.com, seanjc@google.com, pmenzel@molgen.mpg.de, fam.zheng@bytedance.com, punit.agrawal@bytedance.com, simon.evans@bytedance.com, liangma@liangbit.com Date: Wed, 22 Feb 2023 10:11:05 +0000 In-Reply-To: <20230215145425.420125-1-usama.arif@bytedance.com> References: <20230215145425.420125-1-usama.arif@bytedance.com> Content-Type: multipart/signed; micalg="sha-256"; protocol="application/pkcs7-signature"; boundary="=-dNAJuXc0XhzbDOVsGexc" User-Agent: Evolution 3.44.4-0ubuntu1 MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-dNAJuXc0XhzbDOVsGexc Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, 2023-02-15 at 14:54 +0000, Usama Arif wrote: > The main change over v8 is dropping the patch to avoid repeated saves of = MTRR > at boot time. It didn't make a difference to smpboot time and is independ= ent > of parallel CPU bringup, so if needed can be explored in a separate patch= set. >=20 > The patches have also been rebased to v6.2-rc8 and retested and the > improvement in boot time is the same as v8. Thanks for picking this up, Usama. So the next thing that might be worth looking at is allowing the APs all to be running their hotplug thread simultaneously, bringing themselves from CPUHP_BRINGUP_CPU to CPUHP_AP_ONLINE. This series eats the initial INIT/SIPI/SIPI latency, but if there's any significant time in the AP hotplug thread, that could be worth parallelising. There may be further wins in the INIT/SIPI/SIPI too. Currently we process each CPU at a time, sending INIT, SIPI, waiting 10=C2=B5s and sending another SIPI. What if we sent the first INIT+SIPI to all CPUs, then did another pass sending another SIPI only to those which hadn't already started running and set their bit in cpu_initialized_mask ?=20 Might not be worth it, and there's an added complexity that they all have to wait for each other (on the real mode trampoline lock) before they can take their turn and get as far as setting their bit in cpu_initialized_mask. So we'd probably end up sending the second SIPI to most of them *anyway*. --=-dNAJuXc0XhzbDOVsGexc Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Disposition: attachment; filename="smime.p7s" Content-Transfer-Encoding: base64 MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgEFADCABgkqhkiG9w0BBwEAAKCCEkQw ggYQMIID+KADAgECAhBNlCwQ1DvglAnFgS06KwZPMA0GCSqGSIb3DQEBDAUAMIGIMQswCQYDVQQG EwJVUzETMBEGA1UECBMKTmV3IEplcnNleTEUMBIGA1UEBxMLSmVyc2V5IENpdHkxHjAcBgNVBAoT FVRoZSBVU0VSVFJVU1QgTmV0d29yazEuMCwGA1UEAxMlVVNFUlRydXN0IFJTQSBDZXJ0aWZpY2F0 aW9uIEF1dGhvcml0eTAeFw0xODExMDIwMDAwMDBaFw0zMDEyMzEyMzU5NTlaMIGWMQswCQYDVQQG EwJHQjEbMBkGA1UECBMSR3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHEwdTYWxmb3JkMRgwFgYD VQQKEw9TZWN0aWdvIExpbWl0ZWQxPjA8BgNVBAMTNVNlY3RpZ28gUlNBIENsaWVudCBBdXRoZW50 aWNhdGlvbiBhbmQgU2VjdXJlIEVtYWlsIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKC AQEAyjztlApB/975Rrno1jvm2pK/KxBOqhq8gr2+JhwpK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