Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp4242746ybi; Tue, 11 Jun 2019 03:26:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqy9p2uzY9wic3wgfym4XgHjLtqt57ARfqwLdBnNp5rYsX7VIMS8ElwNJozIo0KZYDVLp0K1 X-Received: by 2002:a17:90a:7f91:: with SMTP id m17mr26237844pjl.86.1560248810863; Tue, 11 Jun 2019 03:26:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560248810; cv=none; d=google.com; s=arc-20160816; b=b0trTXsDMrX6/tZSEVcsuKTU6MUwFLB0RPoNBilQc+ZglWRpM04KLytRuwbJhbLxsS 9nMenIMJvpdwpp3i9OoalBv4cZKahIDeS6JdD7t7RuuADQHlhTYCzTt5Ia5sCyE9Bzv1 afGN4u6bftyo/yv2Zru4LYdScBNijv9zDEx4f5penbOd58Bhdl8KMJMHz6kgrSwy81/v XFfb7zWvodPmqSCYXuXsd1Fb7NlBJqrr+Jq9EYVjqd3bH57bzrq/o/9JgSZgayqrUrz9 PsF/JPuiXSI9IcFC8k4BL/XWscViZ9WaPTRh+ojqwMytfnwA7+q0sF/S4rHM3XskMZXf ueNw== 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=GQNk2X+mqFzYu/l14YqOj+MZd5VlmZKor3lgSCt8XE0=; b=sf6zkd079J8qm15rUiGYEvSLu5nW2VKmi0AKWF/Hk3l7iDRGZ2db68Hy6XvxKRG9Cp 5VCydHM1oMxBaWrDb+w3pMIMf5LRapMV+TuAzum0IXvIkHdBboJpBs2BQGpao3x79LLp 0NBJuoZdiQwqNKo5XrRRqEUEt5yPkS2DLreFIXOOK+vqlnfkGlEFPAgjeMYTvfSCMbY8 wzhiGD8wa7JFjVbjZ7WMMdbDS8SxDe+AcN8U/0g28HNYtIthJw4vHg+enxwdC7Vdv9Wl xYDULqSknuDH+3uZls2z58TmwlJV0XXZKLqMzfDZvhPs45eIFNL6TZ1z6xXBS+RhflHe laUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ZazrBdVD; 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 h4si11769008plr.24.2019.06.11.03.26.35; Tue, 11 Jun 2019 03:26:50 -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=ZazrBdVD; 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 S2405415AbfFKK0A (ORCPT + 99 others); Tue, 11 Jun 2019 06:26:00 -0400 Received: from mail-oi1-f195.google.com ([209.85.167.195]:40106 "EHLO mail-oi1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405196AbfFKK0A (ORCPT ); Tue, 11 Jun 2019 06:26:00 -0400 Received: by mail-oi1-f195.google.com with SMTP id w196so8525831oie.7; Tue, 11 Jun 2019 03:25:59 -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=GQNk2X+mqFzYu/l14YqOj+MZd5VlmZKor3lgSCt8XE0=; b=ZazrBdVDFN8xniS08ceQaj2CoYGYZdy/ZbsdBHxGR4WGi7Bp8XyaC8+AfJ1eSNyb2S uJi+eqLRcTo4KVFmVW/3nP0TXpWRSWKY6NRle6hwXroCAAfKp46B6fOrjXjnSvJ4hNGJ 4nCnwcLQSlVPXwLyf56rgRYBS51zXNz9RiytZg+ZF0ArVPZSB8v7VlyVHQUDr/Vpo8lO btygHZC2671DTDknU3K3q3oud3HO+mIm5RmBMiPD8AIoXasM36pt3nKJ00vNJibLjxAa HqmDbo2BujiaEwcmjgzd+ufqyV510KsVC2n4/d/YVxteYgVGpHjB7SPNh3XCsEQAJD8V +HLQ== 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=GQNk2X+mqFzYu/l14YqOj+MZd5VlmZKor3lgSCt8XE0=; b=pSV0BX+tkl0UO3Pg0j6sR2TLAZRy1mWEs1Hqms9S3caRP6GDIgCH1WVahSNMLHB/xT chwfQxE9QBAOHlOupAyJ5ca3OJxuFmnjN6dxf5YVOjZO237vaOFfL5L5h/ZieBNFNoRL h4ydcR7Aur5c4xC38wTTNjQYDgU+iDBqgvnXO6HN/T79CaWybrFw5FMcBaq5U3yoFi0P dR9O9LLE3beD8fBgwJiy3gIXoJdVRpH9g8ooRzE3dUpf/iVCELvY6S0dqAlXPZj/MTgk fkO3ENJ4qtmEY7FTJgElpoYYx4862krWHOHh/P511QNMh/f4VpFlxidvsbtu68vhVBQ+ ezsQ== X-Gm-Message-State: APjAAAXnoXr8g+od1Ag1hKdDePaelK0V2Nwm4ySDGU+Dj/sR39LFSgiR QGvW7zo+rkDE2NTgdK3B5duMpFrzAUIP8P/SWY8= X-Received: by 2002:aca:b9d4:: with SMTP id j203mr3907896oif.5.1560248759174; Tue, 11 Jun 2019 03:25:59 -0700 (PDT) MIME-Version: 1.0 References: <1559178307-6835-1-git-send-email-wanpengli@tencent.com> <20190610143420.GA6594@flask> In-Reply-To: <20190610143420.GA6594@flask> From: Wanpeng Li Date: Tue, 11 Jun 2019 18:26:43 +0800 Message-ID: Subject: Re: [PATCH v3 0/3] KVM: Yield to IPI target if necessary To: =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= Cc: 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 Mon, 10 Jun 2019 at 22:34, 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). > > Have you checked if we could gain performance by having the yield as an > extension to our PV IPI call? It will extend irq disabled time in __send_ipi_mask(). In addition, sched yield can be used to optimize other synchronization primitives in guest I think. Regards, Wanpeng Li