Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp3856731ybi; Mon, 10 Jun 2019 18:46:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqyRLF9qeKJ62jgNkfBETOw01SeDCuWsxnVndDAbBvX6AqwP87AF6+XgJ5rADVbEZHXwUzAL X-Received: by 2002:a17:902:968b:: with SMTP id n11mr36583534plp.120.1560217601127; Mon, 10 Jun 2019 18:46:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560217601; cv=none; d=google.com; s=arc-20160816; b=JKM/z+xQEPgevLU3nzIUruTQgXF6iOa6PQ5mN1ss7HS0RJrhWJA5wAwa8wFtJ/Sh16 0xYd4QEhNmgJGyvJ7GKbDv1PJlJEl4aPkMeRnhkmA6v2Ec0Qyy5vtLDaFr/oLk8tK8d5 xAIumP6Ew97lJ3B9Ad4fTbpOiO+hDHEnWyRXE5M/t/CnmciwHttov/YbXOLHQ1rowJLF SDc6Tms9Vd78iF1dc1kYHUY0CxNU6xHNl8JmBdOyK69mYjnliviiKoYJYXNBPemsfDr1 fQRKzS+9E6rvfYKDFG7jZK4En885eYMRW9NTSHlqvdY06WMfpPjvJJx7PUl6lvBuDOYx CleQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=EBarjJh8uVzKHhlG9hBvipdn1U2btzfvAG+mGnyJE/s=; b=ZEi2fJZPcFAbM0U7ZnivqPtXikhgquk4Xeqxy6w05WgEgk5nlFHZlCvYeRzrtoAyDW skClPt2StRV3ghKQ41dIceYm+p2GMQaphAHri/onEJK7XgEgDlo8wlthqNY3aBw15jXy 8cCos0CUY1HnDGSw+aqdjSszVIz3l4BFQbNiken5cjJ92IMA7dpgesjdvWd+td0BShip YceWpjjw3ctmIHvyMYXEfbwsF6AJb43DM42F2W2N/Vfqb9DwmfRCib7So+BrgA4zEVjN FICsYriMcMF3OKJyaFlg15s13baKAjdMzNneQE1lu2hhg5D6g59FODpW3vh3DGjgQ3Xz v+7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=IcS7ZWjy; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u4si11691819pfh.42.2019.06.10.18.46.26; Mon, 10 Jun 2019 18:46:41 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=IcS7ZWjy; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390803AbfFKBos (ORCPT + 99 others); Mon, 10 Jun 2019 21:44:48 -0400 Received: from mail-oi1-f193.google.com ([209.85.167.193]:38138 "EHLO mail-oi1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389168AbfFKBos (ORCPT ); Mon, 10 Jun 2019 21:44:48 -0400 Received: by mail-oi1-f193.google.com with SMTP id v186so7730366oie.5; Mon, 10 Jun 2019 18:44:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=EBarjJh8uVzKHhlG9hBvipdn1U2btzfvAG+mGnyJE/s=; b=IcS7ZWjy7l1IhNBfOmuDgIBqPeFMKztzk14fOpvzbgBf5LhncMCWPT2npZhKCYCVLL 3h13e/9i+DqPpCi03FquEfMzkMGpP/zNuNImWpQMEsqwazGc9pv7g79XPGc3wcXK5dSO LQoxUixsgbsUj/VkiGeORK6dNHGpQ/w/1z0QAtTv7ytVGa5GpXHZX6hzsG/KASt17NWw TlMbfLKSBCN3X3bjLK6FitH6cmxkzN7I+RBBz4cbjiALZoPIbl3ycDfp3Wm7+3+SxTay dgZWHQ7jqx+2Uv7Q1uOrs8sx3iybsFaaKSUx54bosbVpWfZ7r03kcTOTEiE4ZTXalCVM XlNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=EBarjJh8uVzKHhlG9hBvipdn1U2btzfvAG+mGnyJE/s=; b=DYsTFITnRtnnJaxxA0Oe696fLNP8bV3U0EO/dyCCqIQfZLYvCzNYsVEolir7hcgjse Q0n9Fl1+8awg0fjSU3DL34TqsynhOyeNhJ2cR1zUr+Nsx98MvYWXrzNrJ2Vvn7vfm8lD HVIddlx3+SS0oRc0ayd8yK+0ycvy8ephuv8sywVX0CcD0gSbVPKhbH4L6qLbCNFwxiPx NLfOWdi9MOYZJ5ElYv9w4d4uy6dVWVPbufCvBWOFU+e1EB9KDw9zrW4XOXNFX8G6l9WY WB8tpC0YlKptzDAENDtq/HsxRzGJhffHqG8XKja+yBhB1vzwfMUjkdSc2INcGFbtPq+C Bsnw== X-Gm-Message-State: APjAAAVQZayVnxQW4McRhK2w+Dz3is0kbsWEFQ4VcQJIMb2+Vz9lYimf RyjEF9zPEKElOQs4iHMTDE8vTfAddD9MdzdgBni3Dg== X-Received: by 2002:aca:3305:: with SMTP id z5mr11896170oiz.141.1560217487769; Mon, 10 Jun 2019 18:44:47 -0700 (PDT) MIME-Version: 1.0 References: <1559178307-6835-1-git-send-email-wanpengli@tencent.com> <20190610143420.GA6594@flask> <20190611011100.GB24835@linux.intel.com> In-Reply-To: <20190611011100.GB24835@linux.intel.com> From: Wanpeng Li Date: Tue, 11 Jun 2019 09:45:33 +0800 Message-ID: Subject: Re: [PATCH v3 0/3] KVM: Yield to IPI target if necessary To: Sean Christopherson Cc: =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , LKML , kvm , Paolo Bonzini Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 11 Jun 2019 at 09:11, Sean Christopherson wrote: > > On Mon, Jun 10, 2019 at 04:34:20PM +0200, Radim Kr=C4=8Dm=C3=A1=C5=99 wro= te: > > 2019-05-30 09:05+0800, Wanpeng Li: > > > The idea is from Xen, when sending a call-function IPI-many to vCPUs, > > > yield if any of the IPI target vCPUs was preempted. 17% performance > > > increasement of ebizzy benchmark can be observed in an over-subscribe > > > environment. (w/ kvm-pv-tlb disabled, testing TLB flush call-function > > > IPI-many since call-function is not easy to be trigged by userspace > > > workload). > > > > Have you checked if we could gain performance by having the yield as an > > extension to our PV IPI call? > > > > It would allow us to skip the VM entry/exit overhead on the caller. > > (The benefit of that might be negligible and it also poses a > > complication when splitting the target mask into several PV IPI > > hypercalls.) > > Tangetially related to splitting PV IPI hypercalls, are there any major > hurdles to supporting shorthand? Not having to generate the mask for > ->send_IPI_allbutself and ->kvm_send_ipi_all seems like an easy to way > shave cycles for affected flows. Not sure why shorthand is not used for native x2apic mode. Regards, Wanpeng Li