Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp1140902pxv; Fri, 23 Jul 2021 00:18:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyqkY52WCL6hEc3oHs9OIWxiV2C/16VIHi4hwWFpKtr0V1WyskjVuRYOS6lU1UZkB1NaDXJ X-Received: by 2002:a17:906:7012:: with SMTP id n18mr3417213ejj.236.1627024709442; Fri, 23 Jul 2021 00:18:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627024709; cv=none; d=google.com; s=arc-20160816; b=iJtKGiParNCrhhaMjUcaeLPyCQWjuarMmCUT33b38bC7m5y+Ff7rLDzzvHLk5llrcy x4sRkhlpFu0CFf8DLDXvW5df3tqKx1flsujXBLZz6yCJ8824xtFC++yLOgJwoLJVs7mE UqdSlxezjmTAuNgn5cOVNwEsxnhdGETz/dQc4XompMLT2mKiD8NmjNL53LAU3freoiGt v0K/fYdKh4Hi+afNa7NuKIr8DaxVKtPPISPg9Mmzd8Bt/38d7hutqNyPzItSHG0Mvr7q w3BKI9odORMywYojW/xEpJmFLJgk9mZ+PXUzdKyj5eXvfSWGD2b3Q2zzR4R6O0vnJSCh gaZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=VNNmOox3Ta444JAri03+PFDQqVqwZnfbSPMxbnsJXI8=; b=LMVmn2eubE76aNfoHDbvnGwr+Bx3vbqlQXt5gTvq8+rW4/HaaFohSubbCDZbDoKPM7 qJ+D8z/5M7iK8CgVwySXhFoaUOsS9GznPGbIT6BFLPDLQW2uG1WPt+cEKYAqVfq88O/+ leWJtHvIfI7hTm55e2oDl5kvbsoOyawzKQWiF/7fDRhwkgqNxLX3tlUT2djpNqhyen+l gcCSEYL0J0hdBW2UR24GoN4xINwTShr3Y4fo1N47ha0wgmqgJpOrgPOCJ7WUklKDt177 ZBdUdUsrG4FpLYsueR3Oh3kRZPVlgR0+3tIUCpTTjaGpdehiiqfZtMSxSUjZV8vWkJRP +UaQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x23si34239199eds.52.2021.07.23.00.18.06; Fri, 23 Jul 2021 00:18:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229774AbhGWGgO (ORCPT + 99 others); Fri, 23 Jul 2021 02:36:14 -0400 Received: from mga12.intel.com ([192.55.52.136]:54299 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229616AbhGWGgN (ORCPT ); Fri, 23 Jul 2021 02:36:13 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10053"; a="191418868" X-IronPort-AV: E=Sophos;i="5.84,263,1620716400"; d="scan'208";a="191418868" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Jul 2021 00:16:47 -0700 X-IronPort-AV: E=Sophos;i="5.84,263,1620716400"; d="scan'208";a="471023868" Received: from zengguan-mobl.ccr.corp.intel.com (HELO [10.238.0.133]) ([10.238.0.133]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Jul 2021 00:16:41 -0700 Subject: Re: [PATCH v2 0/6] IPI virtualization support for VM To: Wanpeng Li Cc: Paolo Bonzini , Sean Christopherson , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , kvm , Dave Hansen , "Luck, Tony" , Kan Liang , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , Kim Phillips , Jarkko Sakkinen , Jethro Beekman , "Huang, Kai" , the arch/x86 maintainers , LKML , "Hu, Robert" , "Gao, Chao" References: <20210723051626.18364-1-guang.zeng@intel.com> From: Zeng Guang Message-ID: <4e8f8b7f-0b20-5c2a-f23d-3f5d5321dd3a@intel.com> Date: Fri, 23 Jul 2021 15:16:31 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/23/2021 2:11 PM, Wanpeng Li wrote: > On Fri, 23 Jul 2021 at 13:41, Zeng Guang wrote: > > -------------------------------------- > IPI microbenchmark: > (https://lore.kernel.org/kvm/20171219085010.4081-1-ynorov@caviumnetworks.com) > > 2 vCPUs, 1:1 pin vCPU to pCPU, guest VM runs with idle=poll, x2APIC mode > Improve the performance for unicast ipi is as expected, however, I > wonder whether the broadcast performance is worse than PV > IPIs/Thomas's IPI shorthands(IPI shorthands are supported by upstream > linux apic/x2apic driver). The hardware acceleration is not always > outstanding on AMD(https://lore.kernel.org/kvm/CANRm+Cx597FNRUCyVz1D=B6Vs2GX3Sw57X7Muk+yMpi_hb+v1w@mail.gmail.com/), > how about your Intel guys? Please try a big VM at least 96 vCPUs as > below or more bigger. Intel IPIv target to accelerate unicast ipi process, not benefit to broadcast performance. As to IPI benchmark, it's not big different to test with large or small scale of vCPUs. In essential, Normal IPI test try to send ipi to any other online CPU in sequence. The cost on IPI process itself should be similar. >> Result with IPIv enabled: >> >> Dry-run: 0, 272798 ns >> Self-IPI: 5094123, 11114037 ns >> Normal IPI: 131697087, 173321200 ns >> Broadcast IPI: 0, 155649075 ns >> Broadcast lock: 0, 161518031 ns >> >> Result with IPIv disabled: >> >> Dry-run: 0, 272766 ns >> Self-IPI: 5091788, 11123699 ns >> Normal IPI: 145215772, 174558920 ns >> Broadcast IPI: 0, 175785384 ns >> Broadcast lock: 0, 149076195 ns >> >> >> As IPIv can benefit unicast IPI to other CPU, Noraml IPI test case gain >> about 9.73% time saving on average out of 15 test runs when IPIv is >> enabled. >> >> w/o IPIv w/ IPIv >> Normal IPI: 145944306.6 ns 131742993.1 ns >> %Reduction -9.73% >> >> -------------------------------------- >> hackbench: >> >> 8 vCPUs, guest VM free run, x2APIC mode >> ./hackbench -p -l 100000 >> >> w/o IPIv w/ IPIv >> Time: 91.887 74.605 >> %Reduction: -18.808% >> >> 96 vCPUs, guest VM free run, x2APIC mode >> ./hackbench -p -l 1000000 >> >> w/o IPIv w/ IPIv >> Time: 287.504 235.185 >> %Reduction: -18.198% > Good to know this. > > Wanpeng