From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752687AbdDHO5X (ORCPT ); Sat, 8 Apr 2017 10:57:23 -0400 Received: from mail-sn1nam02on0113.outbound.protection.outlook.com ([104.47.36.113]:27135 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752076AbdDHO5O (ORCPT ); Sat, 8 Apr 2017 10:57:14 -0400 From: KY Srinivasan To: Vitaly Kuznetsov , "devel@linuxdriverproject.org" , "x86@kernel.org" CC: "linux-kernel@vger.kernel.org" , "Haiyang Zhang" , Stephen Hemminger , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Steven Rostedt , "Jork Loeser" Subject: RE: [PATCH 0/7] Hyper-V: praravirtualized remote TLB flushing and hypercall improvements Thread-Topic: [PATCH 0/7] Hyper-V: praravirtualized remote TLB flushing and hypercall improvements Thread-Index: AQHSr5HlxOsRnYlOnEq6ngeoa65b26G7kSyg Date: Sat, 8 Apr 2017 14:57:11 +0000 Message-ID: References: <20170407112701.17157-1-vkuznets@redhat.com> In-Reply-To: <20170407112701.17157-1-vkuznets@redhat.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: redhat.com; dkim=none (message not signed) header.d=none;redhat.com; dmarc=none action=none header.from=microsoft.com; x-originating-ip: [2601:600:8c00:1040:bdd6:d020:3aef:2c08] x-microsoft-exchange-diagnostics: 1;BLUPR0301MB2100;7:p69gZ0g6ao9ZgTPsJQf9OIluHD/8rpXgsFb1l9/LgmimiegSf2QxliiXrKQVBx4p7ny0s/CzJInMZYUyoRXKBKClvQtChPfVU0Qh6FKoAgpxzs0visg/qF57+cyIZHbqwi5w2nUik6ukFKQ5dtpZfFfwrCOOlBBWvqkUBrcHNSiLpC0CokiN8ozSW+gUYonDTALHV0kYvCcgLV0L0YrPzkPM9mcn5GO3f3RaEeHoLyLfswyBaa2CVvYr1jlTEZd7WfR30xUqHD/8a85PFR6kEkbPrqo8H9z3QfwvV6zzwsf4ttpiCE1emeT/QiI+nLdhIv9a+5hWKgVgdighs516tZXzCtackH2G+LWZlK2o8YE= x-ms-office365-filtering-correlation-id: e30885f4-8350-4e0f-69b0-08d47e8f89a5 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(2017030254075)(48565401081)(201703131423075)(201703031133081)(201702281549075);SRVR:BLUPR0301MB2100; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(9452136761055); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(61425038)(6040450)(601004)(2401047)(8121501046)(5005006)(10201501046)(93006095)(93001095)(3002001)(6055026)(61426038)(61427038)(6041248)(201703131423075)(201702281528075)(201703061421075)(20161123564025)(20161123560025)(20161123555025)(20161123562025)(6072148);SRVR:BLUPR0301MB2100;BCL:0;PCL:0;RULEID:;SRVR:BLUPR0301MB2100; x-forefront-prvs: 0271483E06 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(39410400002)(39400400002)(39850400002)(39860400002)(39450400003)(39840400002)(13464003)(377454003)(3280700002)(122556002)(77096006)(6506006)(53936002)(4326008)(6246003)(7696004)(2906002)(3660700001)(2900100001)(99286003)(6436002)(55016002)(9686003)(86362001)(2201001)(86612001)(25786009)(2501003)(575784001)(5005710100001)(10290500002)(2950100002)(8936002)(10090500001)(38730400002)(107886003)(8990500004)(50986999)(54356999)(76176999)(102836003)(6116002)(189998001)(33656002)(5660300001)(7736002)(74316002)(305945005)(8676002)(81166006);DIR:OUT;SFP:1102;SCL:1;SRVR:BLUPR0301MB2100;H:BN6PR03MB2481.namprd03.prod.outlook.com;FPR:;SPF:None;MLV:sfv;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Apr 2017 14:57:11.8352 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0301MB2100 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id v38EvThc032244 > -----Original Message----- > From: Vitaly Kuznetsov [mailto:vkuznets@redhat.com] > Sent: Friday, April 7, 2017 4:27 AM > To: devel@linuxdriverproject.org; x86@kernel.org > Cc: linux-kernel@vger.kernel.org; KY Srinivasan ; > Haiyang Zhang ; Stephen Hemminger > ; Thomas Gleixner ; Ingo > Molnar ; H. Peter Anvin ; Steven > Rostedt ; Jork Loeser > Subject: [PATCH 0/7] Hyper-V: praravirtualized remote TLB flushing and > hypercall improvements > > Hi, > > 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 3m44.994s > user 0m3.829s > sys 3m36.323s > > After: > # time ./pthread_mmap ./randfile > real 2m57.145s > user 0m3.797s > sys 2m34.812s > > 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). Thanks Vitaly. We are currently testing these patches on Azure and other Hyper-V platforms and will report back. K. Y > > Vitaly Kuznetsov (7): > x86/hyperv: make hv_do_hypercall() inline > x86/hyper-v: fast hypercall implementation > hyper-v: use fast hypercall for HVCALL_SIGNAL_EVENT > x86/hyperv: implement rep hypercalls > hyper-v: globalize vp_index > x86/hyper-v: use hypercall for remove TLB flush > tracing/hyper-v: trace hyperv_mmu_flush_tlb_others() > > MAINTAINERS | 1 + > arch/x86/hyperv/Makefile | 2 +- > arch/x86/hyperv/hv_init.c | 90 +++++++++++-------------- > arch/x86/hyperv/mmu.c | 134 > +++++++++++++++++++++++++++++++++++++ > arch/x86/include/asm/mshyperv.h | 131 > ++++++++++++++++++++++++++++++++++++ > arch/x86/include/uapi/asm/hyperv.h | 26 +++++++ > arch/x86/kernel/cpu/mshyperv.c | 1 + > drivers/hv/channel_mgmt.c | 22 +++--- > drivers/hv/connection.c | 8 ++- > drivers/hv/hv.c | 9 --- > drivers/hv/hyperv_vmbus.h | 11 --- > drivers/hv/vmbus_drv.c | 17 ----- > include/linux/hyperv.h | 21 +++--- > include/trace/events/hyperv.h | 30 +++++++++ > 14 files changed, 386 insertions(+), 117 deletions(-) > create mode 100644 arch/x86/hyperv/mmu.c > create mode 100644 include/trace/events/hyperv.h > > -- > 2.9.3