Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2672011imm; Fri, 20 Jul 2018 02:52:28 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeUXx3uMKUqanrZlqDJg4I9iTcP86aBrtIWKwigZOYt2QtsGkhTHcv7zzlIF5D8krVbj/uF X-Received: by 2002:a65:5086:: with SMTP id r6-v6mr1359375pgp.375.1532080348729; Fri, 20 Jul 2018 02:52:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532080348; cv=none; d=google.com; s=arc-20160816; b=nqUthfjbXg6MIt/4+oohpm/2/NM7z8PK/AKKvwPuwNlNhc+zvBvnOluI9BppYhC1py WwCve1YLHgnKFRluPOoroZR49djmFe6iu4z5QptWl8KwXrpPU89HO/EkCvsNwHVBPNVZ v6I+kKFYf9IU3lqFjZiKv+ygxLTetxu689iEWvlWtx4P8/JXg1wcCSFYBLOhpt4lCRTj Uug5i88vE271hfqPQIqiwrPnZ8AERCp1oUh+69y65IVQVVw7oDIR9RsxfRO45F5zgUkb rzIriErH8HNvlim/OR2cN6yw8Wmh48Qh786fJcMCYzVncDhIRJJFNRVTiYosiwLZI9Fw /GTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=IPsch1a0NkBX9EmiNY3ZzA0iLEi83JEaGAauuiRxT0c=; b=jvPs8Vdv0owvgkubxuwbB7EGROgBt4P1esu6XxZ0wWt4XJh8nSc4wzHbcj7hmCYMeF IbU0xoHQ8wodoZvXG1lVqPH2EHOZ81WnNG/qx+dKq+0nVqnXmPQ+x3y1iDbA8POjfaFr 7fYviffOsQ90/ohWDsBu41WCxKgw1LvA5+3GFHafK8U/wDHWOWTxPG8bTzUDt6cdT1e5 eqYxcUYmYk7YHTwOyOIMYnU+32aKBL3MD/6DvSWK6F8ytV3qN1gWpCoszitJoYw82i3t ybBCuhu1JEZrE4n/8MoUQoZowKDKBh3vPeycsBPY6hrSnE3ARFmbJt731spDK4jmGw7+ 6AJw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m7-v6si1347961pgm.184.2018.07.20.02.52.14; Fri, 20 Jul 2018 02:52:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728104AbeGTKjG (ORCPT + 99 others); Fri, 20 Jul 2018 06:39:06 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:36374 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727321AbeGTKjG (ORCPT ); Fri, 20 Jul 2018 06:39:06 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DA2938182D0F; Fri, 20 Jul 2018 09:51:38 +0000 (UTC) Received: from flask (unknown [10.43.2.80]) by smtp.corp.redhat.com (Postfix) with SMTP id E3FE32142F20; Fri, 20 Jul 2018 09:51:36 +0000 (UTC) Received: by flask (sSMTP sendmail emulation); Fri, 20 Jul 2018 11:51:36 +0200 Date: Fri, 20 Jul 2018 11:51:36 +0200 From: Radim Krcmar To: Wanpeng Li Cc: LKML , kvm , Paolo Bonzini , Vitaly Kuznetsov Subject: Re: [PATCH v3 2/6] KVM: X86: Implement PV IPIs in linux guest Message-ID: <20180720095135.GA8330@flask> References: <1530598891-21370-1-git-send-email-wanpengli@tencent.com> <1530598891-21370-3-git-send-email-wanpengli@tencent.com> <20180719162826.GB11749@flask> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Fri, 20 Jul 2018 09:51:38 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Fri, 20 Jul 2018 09:51:38 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'rkrcmar@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2018-07-20 11:33+0800, Wanpeng Li: > On Fri, 20 Jul 2018 at 00:28, Radim Krčmář wrote: > > 2018-07-03 14:21+0800, Wanpeng Li: > > But because it is very similar to x2apic, I'd really need some real > > performance data to see if this benefits a real workload. > > Thanks for your review, Radim! :) I will find another real benchmark > instead of the micro one to evaluate the performance. Analyzing the cpu bitmap for every IPI request on a non-small guest (at least 32 VCPUs, ideally >256) during various workloads could also provide some insight regardless of workload/benchmark result -- we want to know how many VM exits we would save. > > > +static void kvm_send_ipi_all(int vector) > > > +{ > > > + __send_ipi_mask(cpu_online_mask, vector); > > > > These should be faster when using the native APIC shorthand -- is this > > the "Broadcast" in your tests? > > Not true, .send_IPI_all almost no callers though linux apic drivers > implement this hook, in addition, shortcut is not used for x2apic > mode(__x2apic_send_IPI_dest()), and very limited using in other > scenarios according to linux apic drivers. Good point, (xAPIC is using shorthands, so I didn't expect we'd stop doing so on x2APIC, but there was probably no need.) thanks.