Received: by 10.223.164.202 with SMTP id h10csp32343wrb; Mon, 6 Nov 2017 01:59:14 -0800 (PST) X-Google-Smtp-Source: ABhQp+Q3Yz6sjZXwEifyl3CmslkK1dRWe7khBxlNmo43Swt1vlO1CsAr+h2PnI8pJxcKDOGS5gb9 X-Received: by 10.101.65.200 with SMTP id b8mr14920949pgq.274.1509962354037; Mon, 06 Nov 2017 01:59:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1509962353; cv=none; d=google.com; s=arc-20160816; b=HOvpJfeDUeKCEwuf4OC5e+sejt4PerW4hrhDGQNnYxvq1+h+3eHhCo0h4pYIv2UeZn ixHuLjP0V9ytmzhGWWgmuRbdz4d3MkeSoBbC3sMFl7jgGx6+TO2SiX+wIkkS1yZMUW++ lKOWKCtqHShnQ+hjDIuLIqcsDztM08qMV0jggG0DNzwctR9bgODQOhZpG5jbRxbvP3xJ Oh9axltrPxffShxLdsC2LuxBIeDNJbuFJbTCiralBLXfSC6O5LNuanOts3HLaYhTsS9l C3W06GQzBHz5lyn375EgxnXrbwTGwXQs1oPrtC6ycXkFVIDUpUXApYMabw7Uq/xs4CRk jgFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=Q7gA712DZsw6jQXGQFldTe0GHHYUTEOUGieHNAeLQ8A=; b=Qd6v4x4jRpzDHuj0Sr0OLpoiwe7DHd5b9x7qX4Tp3XXL9MIe+X9KAhGpW52Jx+nx0R iEPYf5Q4FjR/mUb4/CsEYQ6mEn5z9HfhoBMpKF4M89NGBhbjCAUwOuZGhjqhKSdHkBVp /HUdMyKM3FOuqcP0oAez5/si9XA30UJA3TnUPWlCQQFQFnvBBRfu5X7HVU/eaGwd+VlI c7ovJVMEgGCZqEQSoi4xZUy0kKHQVav3mUWbXltY3YLV1WEP0nn0FMJmtlbrHQvG+HmI rcapvyIvkC6HjIUP+Dh/l+NSCy3TdJz3Ls0TTZk6vgWT7Mqbdiw+Yx2M7n/W9JxWXvlZ 2mHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=J7oUhSmP; 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=NONE 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 k6si11041789pgt.315.2017.11.06.01.59.00; Mon, 06 Nov 2017 01:59:13 -0800 (PST) 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=J7oUhSmP; 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=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753429AbdKFJ5I (ORCPT + 99 others); Mon, 6 Nov 2017 04:57:08 -0500 Received: from mail-oi0-f66.google.com ([209.85.218.66]:48529 "EHLO mail-oi0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751490AbdKFJ5F (ORCPT ); Mon, 6 Nov 2017 04:57:05 -0500 Received: by mail-oi0-f66.google.com with SMTP id m198so6640071oig.5; Mon, 06 Nov 2017 01:57:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Q7gA712DZsw6jQXGQFldTe0GHHYUTEOUGieHNAeLQ8A=; b=J7oUhSmP8TZHB9PcLIoOogPh5X3py2bjtJbG/MxqCdgN7aX1DGjQLiCjxzXWcrhWLJ 0yRvZJGCIamiOFtR/zFYsX9DceZlCG1p0beIGa9NJirZDjhmoySaVWA12Vjj94UOnCFY tuu/iUzHHef0PV2Joq89idM7A52OIzlIjerqhMfQX2sRZ2VVdZ+ROiYIFYTgw2MOd+sl Nysce/FwpUCIq1mocG3PQzuXc/OvjHWBc360emFzUmvCUBkTz3C4vnGA9IcEdWXbI61e 9FTc/tQLxKatrF7zsurDAsuUC7U9FyOROnIiUzs/AEgES1dt3vEiO2rJ4VZaA1i4qWA0 RKag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Q7gA712DZsw6jQXGQFldTe0GHHYUTEOUGieHNAeLQ8A=; b=hgTldz6RQ1xPorSMfx65Dioe3X1rkMiVsL8avg1e7TvhE77QysSaE2Q3Yu7rE5sAer C9IVUG+zAsG8aem9F+5gF5HoM9TL7pvXxe9eWlmlKHMwhGM5UVmcgUaicjNP0vnqLYhz YHyXq1gSwTUNDFzU/dRnajJHSBAlo6gHfD9u1JNj/kgDZuslLBRscUQFW/VELyE587Ej ErdHnZYauLZKk6FmEShZsDeLbdOmFHh9tIGDxYtlrYkxVMJGMhuiNCyrrHLXvsdNaS0l xw7+FzTISoSFeCJBlIbV6F+7AzF8TyUq0B1ZtwQcXcyL1azct+eEBgVUyjeZsU1yVtBf cAng== X-Gm-Message-State: AMCzsaXzNRCjkyOyjvnYOZn3kQMoxRbTVwd8ig3PZq2FGQXit5FSq6Uk d1AA+Uth0pupvvv/KHYNEhgmZPJypg/iAUyFL+o= X-Received: by 10.202.220.3 with SMTP id t3mr9114691oig.237.1509962224714; Mon, 06 Nov 2017 01:57:04 -0800 (PST) MIME-Version: 1.0 Received: by 10.74.53.27 with HTTP; Mon, 6 Nov 2017 01:57:04 -0800 (PST) In-Reply-To: <87d14vrcou.fsf@vitty.brq.redhat.com> References: <20170802160921.21791-1-vkuznets@redhat.com> <87d14vrcou.fsf@vitty.brq.redhat.com> From: Wanpeng Li Date: Mon, 6 Nov 2017 17:57:04 +0800 Message-ID: Subject: Re: [PATCH v10 0/9] Hyper-V: paravirtualized remote TLB flushing and hypercall improvements To: Vitaly Kuznetsov Cc: "the arch/x86 maintainers" , devel@linuxdriverproject.org, "linux-kernel@vger.kernel.org" , "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Steven Rostedt , Jork Loeser , Simon Xiao , Andy Lutomirski , Andy Shevchenko , Paolo Bonzini , kvm Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2017-11-06 17:14 GMT+08:00 Vitaly Kuznetsov : > Wanpeng Li writes: > >> 2017-08-03 0:09 GMT+08:00 Vitaly Kuznetsov : >>> Changes since v9: >>> - Rebase to 4.13-rc3. >>> - Drop PATCH1 as it was already taken by Greg to char-misc tree. There're no >>> functional dependencies on this patch so the series can go through a different tree >>> (and it actually belongs to x86 if I got Ingo's comment right). >>> - Add in missing void return type in PATCH1 [Colin King, Ingo Molnar, Greg KH] >>> - A few minor fixes in what is now PATCH7: add pr_fmt, tiny style fix in >>> hyperv_flush_tlb_others() [Andy Shevchenko] >>> - Fix "error: implicit declaration of function 'virt_to_phys'" in PATCH2 >>> reported by kbuild test robot (#include ) >>> - Add Steven's 'Reviewed-by:' to PATCH9. >>> >>> Original description: >>> >>> Hyper-V supports hypercalls for doing local and remote TLB flushing and >>> gives its guests hints when using hypercall is preferred. While doing >>> hypercalls for local TLB flushes is probably not practical (and is not >>> being suggested by modern Hyper-V versions) remote TLB flush with a >>> hypercall brings significant improvement. >>> >>> To test the series I wrote a special 'TLB trasher': on a 16 vCPU guest I >>> was creating 32 threads which were doing 100000 mmap/munmaps each on some >>> big file. Here are the results: >>> >>> Before: >>> # time ./pthread_mmap ./randfile >>> real 3m33.118s >>> user 0m3.698s >>> sys 3m16.624s >>> >>> After: >>> # time ./pthread_mmap ./randfile >>> real 2m19.920s >>> user 0m2.662s >>> sys 2m9.948s >>> >>> This series brings a number of small improvements along the way: fast >>> hypercall implementation and using it for event signaling, rep hypercalls >>> implementation, hyperv tracing subsystem (which only traces the newly added >>> remote TLB flush for now). >>> >> >> Hi Vitaly, >> >> Could you attach your benchmark? I'm interested in to try the >> implementation in paravirt kvm. >> > > Oh, this would be cool) I briefly discussed the idea with Radim (one of > KVM maintainers) during the last KVM Forum and he wasn't opposed to the > idea. Need to talk to Paolo too. Good thing is that we have everything I talk with Paolo today and he points this feature to me, so I believe he likes it. :) In addition, https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/reference/tlfs I search Hypervisor Top Level Functional Specification v5.0b.pdf document but didn't find a section introduce the Hyper-V: paravirtualized remote TLB flushing and hypercall stuff, could you point out? Regards, Wanpeng Li > in place for guests now (HAVE_RCU_TABLE_FREE is enabled globaly on x86). > > Please see the microbenchmark attached. Adjust defines in the beginning > to match your needs. It is not anything smart, basically just a TLB > trasher. > > In theory, the best result is achived when we're overcommiting the host > by running multiple vCPUs on each pCPU. In this case PV tlb flush avoids > touching vCPUs which are not scheduled and avoid the wait on the main > CPU. > > -- > Vitaly > From 1583307904382142267@xxx Mon Nov 06 09:21:23 +0000 2017 X-GM-THRID: 1574636603958149385 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread