Received: by 10.223.164.202 with SMTP id h10csp88074wrb; Mon, 6 Nov 2017 03:08:19 -0800 (PST) X-Google-Smtp-Source: ABhQp+RcW0OFF1qHguM0zLGSegU+6UaGUC5sVVomqZoAp6POaQbiB/I4u/4fpMHJ6+mxFsAOyU5A X-Received: by 10.159.244.19 with SMTP id x19mr14559262plr.373.1509966499125; Mon, 06 Nov 2017 03:08:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1509966499; cv=none; d=google.com; s=arc-20160816; b=vicY5xUSUPgbMC9Xk94KRrwEdRm1vdSv7YrgPyW1+GUEmLTJ0NutfJ90OJCxhX4h+4 eK5NJgdKHCw4A3FEwu60xey/kqUC4/AnWR2+923CReD7I2uYDMr/U+CUL42Cl6mLksWv c9VPcuZhyO7powB5erJ9HcvIEYFuo0HQQJGPy44iaL1++P8s6GjMoCd5wjGMm8zk9E0R Wa3ON4PIB4EhktNIMe2D+L17QA4e+RpNTEXDz3rl/BQK3ZMs4UoGSeIC8ShunWUYVh+S kNgYQtsOwef2icWnLPQsAdrNERyAjLeqj8DXsOnyjm3CBDYsoDg5IYk/6Iu0vDmJGI9A +5AA== 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=vL3kOSCprK4w3bN3+8E8vbWUjU/mC2zwgAlfgmt0BmQ=; b=vQu4gtcmDSydR78eeDZaVJUeG/Dh3+rDXjuIM4DA3qPuqENABSzcIjG3EbJptsgVB9 c7Da6A7pAculrvYwFSgawDpsF42TIUExxO96a4FpK+ZTicok0OyUYeNSE5aM7ntK8i0C aJMM/nZnfqNCZQoF7aCV1m6s+9UAQBWRUXP1mpaOHKLvOFYnIjUMUXUFBqo5VOxe6KF7 Aks7XlREIICwE+R96xyzydfGQyJDlybhg4cYKossuqgMPFsg0rkhY6L5+XaYulPsPq0h O3TioR7Zrnip6lHl1Zg9jZaN/shsKHjWyaiaC0T1SG/zkoTnBn/CnZj4xbUOz+DpJypu 0R3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=R1H8TCjs; 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 h34si4011387pld.142.2017.11.06.03.08.05; Mon, 06 Nov 2017 03:08:19 -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=R1H8TCjs; 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 S1752128AbdKFLHb (ORCPT + 99 others); Mon, 6 Nov 2017 06:07:31 -0500 Received: from mail-ot0-f169.google.com ([74.125.82.169]:53509 "EHLO mail-ot0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751457AbdKFLH3 (ORCPT ); Mon, 6 Nov 2017 06:07:29 -0500 Received: by mail-ot0-f169.google.com with SMTP id n17so2193481otb.10; Mon, 06 Nov 2017 03:07:28 -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=vL3kOSCprK4w3bN3+8E8vbWUjU/mC2zwgAlfgmt0BmQ=; b=R1H8TCjsfntF0q4K4vQpKGprXDCpzcCnXGns32bjyMFIbCVzXNSPOBFYHtAKNTV1qB 90Pib0ql+IN19n0KCJlbYt5Z6R1tAUx+di97rf/HAmA3UAl46nO0YvZpzUEVzJgD5Vgw +y/tKVvTGoneQ5BokwwgUMTz8lyfnyNOz7it2OOHCDPvYsWvtUeAkyJ6XdL9xJI0jj9I mfjSq1TVa3iQrHylg2tA+Ppk2G3sKEE+dbO6znkwDMfnoVxbOnIhSaZtxX0Vk9QuvoPk gGNim6JDgJkXLLxfmqsNd+AHANDLQBQ3s0WKPIJ+erwVE38MyjM1e1iKPZzYr/3AZE+/ j6WA== 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=vL3kOSCprK4w3bN3+8E8vbWUjU/mC2zwgAlfgmt0BmQ=; b=bqQJ2j9BNwIOiOqWRAT69fny2saTVJDvtKs7Vi3eS/Y9DKs352Yeb0W6JhWgtWtkZx j64ef9x2Gbvxax3Z0XlWtRcZLW6gjfZArcBpfG85G7eCoCIhNe88CRTBWJPSeU3l+FI3 mmFcoyAk+BSbI+37hqCTDnVUtj+wrzTLPeUD9Aqn9kJfvJlhXqmdfdW7wwjoEQWO5dfW UaWFMzvQtWU4hNB2TqvYc9HM0GsOHiUri22B6GfiDVSm32UhW3hESeepRZLmajxM6wYL GHQHaAy6IUGsY/z7kTrx2lqBGBnAoPfezxwoPkDdSOFS5o4QfKKszSb3+6uzaL+FuAwL VEQw== X-Gm-Message-State: AJaThX4pndCPJzIQ8UAAcGYftYsL3eg7LIu4bGSF06AEbRbRczq3qi/9 AiaU+QUiI1bVBvoMv6UcOHYPjnjkE5T18QpdO2U= X-Received: by 10.157.90.24 with SMTP id v24mr9588201oth.380.1509966448485; Mon, 06 Nov 2017 03:07:28 -0800 (PST) MIME-Version: 1.0 Received: by 10.74.53.27 with HTTP; Mon, 6 Nov 2017 03:07:28 -0800 (PST) In-Reply-To: <874lq7ra4n.fsf@vitty.brq.redhat.com> References: <20170802160921.21791-1-vkuznets@redhat.com> <87d14vrcou.fsf@vitty.brq.redhat.com> <874lq7ra4n.fsf@vitty.brq.redhat.com> From: Wanpeng Li Date: Mon, 6 Nov 2017 19:07:28 +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 18:10 GMT+08:00 Vitaly Kuznetsov : > Wanpeng Li writes: > >> 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? >> > > It's there, search for > HvFlushVirtualAddressSpace/HvFlushVirtualAddressSpaceEx and > HvFlushVirtualAddressList/HvFlushVirtualAddressListEx. Got it, thanks. Regards, Wanpeng Li From 1583311095225729641@xxx Mon Nov 06 10:12:06 +0000 2017 X-GM-THRID: 1574636603958149385 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread