Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp3858126ybi; Mon, 10 Jun 2019 18:49:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqzZT7KQKNZ6p63igAIFOfXSHPUloqVIYDvxfEe99iAZzpxewvFROpkyirxfoVlvbqx+dktk X-Received: by 2002:a63:eb0d:: with SMTP id t13mr18602968pgh.37.1560217753290; Mon, 10 Jun 2019 18:49:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560217753; cv=none; d=google.com; s=arc-20160816; b=NnpAud+wgJ+iO/N8hYxxQzsJurLndf2QmF1Wfyb5bu0YZkcZodi5/Z7NDqi9fw5W8L qMz0FuAZ3UxRqUR/S4eJjsIT/8YiKSmvLijnQ9TLEreSkUUS3dur6wnh4kov5J+UnRYY 4p2RA9Ti6ZqAO/pfAKeseCCUIJko1g/pOfEOnaq7aT9B3ouaDcGoRpDmeipdf9+owOUg 1hMXfeBMoqx8wkuQdhraGs/4hY+A9GBQx+kB2J24xLyXwzNAkQGmUzMhlSU+xc6WVUER uX51VjeLfoPldUZuX4GiKpujNkP+gMyDpby5shWjfE2vIvDIILrjNZCK8gP5mfO2pPE/ 2pGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:dkim-signature; bh=j+N/oz9ewSf1uzJtrwZj4fSW3UaedXAd0tvAVxxwGDQ=; b=PWsrLwNvDIObXWJSkIDWrk+ZV4kPufLmZsVRiuWGp2TFlFZHcMpzeRV2hZWBhKXmhw 47RkK4+fbDwal2mxmClG0h6HkPc/yWAaJoOXFmUHDYB85/NTV7QsovAcCo8GO6mZ5zjy EVw1lZsWd3I4XwMWHPashvs731m3ftw+fIgr5NcjxI4JlSIKrDNm8S0FyTVFvT82nCTG WkWC1MwS+sr17VLKw+ILcOMryuhwEs3ZC0vRbddf0RhKQtJ8ZhubKFA17OHZvgWTUbdB P76InJYwIyFTCYI2slszY9uqARA8E7S/g4GPL/PTFY4ubfE5ZRttVEhkwBCkDVfbzr3U 0iQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=TKKFa09Y; 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 d185si11601595pfa.182.2019.06.10.18.48.57; Mon, 10 Jun 2019 18:49:13 -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=TKKFa09Y; 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 S2390791AbfFKBsT (ORCPT + 99 others); Mon, 10 Jun 2019 21:48:19 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:36628 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726532AbfFKBsT (ORCPT ); Mon, 10 Jun 2019 21:48:19 -0400 Received: by mail-pg1-f194.google.com with SMTP id a3so5995607pgb.3; Mon, 10 Jun 2019 18:48:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=j+N/oz9ewSf1uzJtrwZj4fSW3UaedXAd0tvAVxxwGDQ=; b=TKKFa09YIMxRKoPIribOASB9kzjZArL2NWoHTraN60xpIXbpHyiEAyWwLbx8Kj4xoQ qYZIHAG+2gvyq9E6Q5KPrk8Dv/xAEkpoAhLr8aV1Ss6OjVeyq/y4v+VacT6y4Ie955ce vBQR2n1E/0ud36tnqNK3RVaqdfX2O58yYIo9HLv8j/Xj9fZoz3mBS5WvnKrrq9XZL5Y5 jMA5DeSa3Fne1z8uVfqgiU9QuXZ2NRJQNHi1+aDule9ctnyJG0YyvTF3T7MCTS2WiXI/ HjXmyV+A5I4w+pZbWRpkSay8bl+Xdf6UZ4qRP29t+579hp79bu6s9fAF0I/TEjiPiuni Wf+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=j+N/oz9ewSf1uzJtrwZj4fSW3UaedXAd0tvAVxxwGDQ=; b=LxQN9KfnZeERewAfVh5/bn+BQUSYFAE81OqtXsZ56QCohqzawTPRVg5bNbeHSlBzgM dTYbgxaRbRtjMq78Dh3SWzQymlZFvS2G96tbSOQNTmZlEcEfmUb35qOwEcK4iicRjDB2 melxnZ6DU/Mgss0YZxkPSF2G9MepiqzW7MmpgowajRFjbd3dwnO2FeQXFI+1lX3WjVjT k0f9nnUEoTT+voXC5jgJsh7h2+ufetO9x5X8gqdnD55hPdKtmKg7dYCiOsUStlRpo5P3 LcUPkfN8AhyPynDIffi/uJan41ySv3gAMAFIQ2xs1ZxfD34QK2vjIhekB/BETj09Rrs4 X2aw== X-Gm-Message-State: APjAAAU5T25Vvd+COVI5TiDwzNUdOGdqP2Qw7L3eK2t0q+Fe8zntWnap qXn70Y3mwBVWvFjFX0btSdA= X-Received: by 2002:a62:e917:: with SMTP id j23mr71948692pfh.55.1560217698427; Mon, 10 Jun 2019 18:48:18 -0700 (PDT) Received: from [10.2.189.129] ([66.170.99.2]) by smtp.gmail.com with ESMTPSA id e20sm11402106pfi.35.2019.06.10.18.48.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Jun 2019 18:48:17 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: [PATCH v3 0/3] KVM: Yield to IPI target if necessary From: Nadav Amit In-Reply-To: Date: Mon, 10 Jun 2019 18:48:15 -0700 Cc: Sean Christopherson , =?utf-8?B?UmFkaW0gS3LEjW3DocWZ?= , LKML , kvm , Paolo Bonzini Content-Transfer-Encoding: quoted-printable Message-Id: References: <1559178307-6835-1-git-send-email-wanpengli@tencent.com> <20190610143420.GA6594@flask> <20190611011100.GB24835@linux.intel.com> To: Wanpeng Li X-Mailer: Apple Mail (2.3445.104.11) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Jun 10, 2019, at 6:45 PM, Wanpeng Li wrote: >=20 > 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 = wrote: >>> 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). >>>=20 >>> Have you checked if we could gain performance by having the yield as = an >>> extension to our PV IPI call? >>>=20 >>> 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.) >>=20 >> 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. >=20 > Not sure why shorthand is not used for native x2apic mode. Why do you say so? native_send_call_func_ipi() checks if allbutself shorthand should be used and does so (even though the check can be more efficient - I=E2=80=99m looking at that code right now=E2=80=A6)=