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 X-Spam-Level: X-Spam-Status: No, score=-6.5 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E9152C433E0 for ; Mon, 21 Dec 2020 11:28:31 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E82FF227BF for ; Mon, 21 Dec 2020 11:28:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E82FF227BF Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:47396 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krJMb-0002LT-L9 for qemu-devel@archiver.kernel.org; Mon, 21 Dec 2020 06:28:29 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:56946) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krJL8-0001rl-Ts for qemu-devel@nongnu.org; Mon, 21 Dec 2020 06:26:58 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:2481) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krJL6-0004Q7-SN for qemu-devel@nongnu.org; Mon, 21 Dec 2020 06:26:58 -0500 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4Czxwv3PkFzM7XR; Mon, 21 Dec 2020 19:25:51 +0800 (CST) Received: from [10.174.186.6] (10.174.186.6) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.498.0; Mon, 21 Dec 2020 19:26:39 +0800 Subject: Re: [RFC PATCH v1] x86/cpu: initialize the CPU concurrently To: Igor Mammedov References: <26a765fb-dae1-db33-a406-cef79d5c1d58@huawei.com> <20201218181719.79d5bced@redhat.com> From: Zhenyu Ye Message-ID: <7edb4309-125a-8892-71cc-18e38832844e@huawei.com> Date: Mon, 21 Dec 2020 19:26:39 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.3.0 MIME-Version: 1.0 In-Reply-To: <20201218181719.79d5bced@redhat.com> Content-Type: text/plain; charset="gbk" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.186.6] X-CFilter-Loop: Reflected Received-SPF: pass client-ip=45.249.212.191; envelope-from=yezhenyu2@huawei.com; helo=szxga05-in.huawei.com X-Spam_score_int: -74 X-Spam_score: -7.5 X-Spam_bar: ------- X-Spam_report: (-7.5 / 5.0 requ) BAYES_00=-1.9, NICE_REPLY_A=-3.299, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ehabkost@redhat.com, "S. Tsirkin, Michael" , richard.henderson@linaro.org, qemu-devel@nongnu.org, Xiexiangyou , yebiaoxiang , Paolo Bonzini Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Hi Igor Mammedov, Thanks for your review. On 2020/12/19 1:17, Igor Mammedov wrote: > On Wed, 25 Nov 2020 19:54:17 +0800 > Zhenyu Ye wrote: > >> From 0b4318c9dbf6fa152ec14eab29837ea06e2d78e5 Mon Sep 17 00:00:00 2001 >> From: eillon >> Date: Wed, 25 Nov 2020 19:17:03 +0800 >> Subject: [PATCH] x86/cpu: initialize the CPU concurrently >> >> Currently we initialize cpu one by one in qemu_init_vcpu(), every cpu >> should have to wait util cpu->created = true. When cpus_accel->create_vcpu_thread >> costs too long time or the number of CPUs is too large, this will prolong >> the boot time. >> >> This patch initializes the CPU concurrently. > > could you benchmark and share results for before an after this patch? > (It would be even better to add it as part of commit message) > When using haxm as the accelerator on windows, it takes at least 200ms to initialize one cpu. For a 4-core VM, it takes: before 800ms -- 1000ms after 200ms Information about the processor on the host: Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz See another email(to Eduardo) for more information. Thanks, Zhenyu