From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A26CBC07E94 for ; Fri, 4 Jun 2021 08:15:05 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6ABA7613FA for ; Fri, 4 Jun 2021 08:15:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6ABA7613FA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:In-Reply-To:References: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=grs+mFcVxl7PIiVECaDa0ClpMOe0OC4vkbmdh1sqt9E=; b=Qkauj6c989S9Tc n2TNd8UVwC+ANzfkvCR/FV7XcB8YHINr1YE5+bC+tUbJeZPcgCLy65tnhERor13cfypGgHq1KwJmU t0ktO/NdzPQnnFyRm4QdlhrEo9ZDFIit7v/oDnFp0ZFzPAuzFCWd10Qs/eVfCKzlCdXe0+9yAfTwJ J7nkES4AS872R71OUsyZ4m2JpzNUA/PTOHLS9KWXMSnVhsZW3C8o0K4IAEIm5hvqaMCYa9ONhNVoI 1zdBfr5BLd4/IDRp9iHAK3qhRNbRGElEgcYehjF94k0MAtPVZ1Mb1L8iZgzfcjdd6l3dV8gHiwVD4 pmUhfIMlYxXpKX9nevAA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lp4xJ-00CE6j-DS; Fri, 04 Jun 2021 08:13:25 +0000 Received: from szxga01-in.huawei.com ([45.249.212.187]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lp4xD-00CE43-Ur for linux-arm-kernel@lists.infradead.org; Fri, 04 Jun 2021 08:13:22 +0000 Received: from dggemv711-chm.china.huawei.com (unknown [172.30.72.53]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4FxFl0079FzWrcJ; Fri, 4 Jun 2021 16:08:28 +0800 (CST) Received: from dggpeml500022.china.huawei.com (7.185.36.66) by dggemv711-chm.china.huawei.com (10.1.198.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Fri, 4 Jun 2021 16:13:13 +0800 Received: from lhreml710-chm.china.huawei.com (10.201.108.61) by dggpeml500022.china.huawei.com (7.185.36.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Fri, 4 Jun 2021 16:13:12 +0800 Received: from lhreml710-chm.china.huawei.com ([169.254.81.184]) by lhreml710-chm.china.huawei.com ([169.254.81.184]) with mapi id 15.01.2176.012; Fri, 4 Jun 2021 09:13:10 +0100 From: Shameerali Kolothum Thodi To: "linux-arm-kernel@lists.infradead.org" , "kvmarm@lists.cs.columbia.edu" , "linux-kernel@vger.kernel.org" CC: "maz@kernel.org" , "will@kernel.org" , "catalin.marinas@arm.com" , "james.morse@arm.com" , "julien.thierry.kdev@gmail.com" , "suzuki.poulose@arm.com" , "jean-philippe@linaro.org" , Linuxarm Subject: RE: [RFC PATCH 0/3] kvm/arm: New VMID allocator based on asid(2nd approach) Thread-Topic: [RFC PATCH 0/3] kvm/arm: New VMID allocator based on asid(2nd approach) Thread-Index: AQHXQph5pwodb0a/4kShAMz7Pnc+rqsDq0rQ Date: Fri, 4 Jun 2021 08:13:10 +0000 Message-ID: References: <20210506165232.1969-1-shameerali.kolothum.thodi@huawei.com> In-Reply-To: <20210506165232.1969-1-shameerali.kolothum.thodi@huawei.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.47.88.52] MIME-Version: 1.0 X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210604_011320_410778_2498AA57 X-CRM114-Status: GOOD ( 25.36 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi, > -----Original Message----- > From: Shameerali Kolothum Thodi > Sent: 06 May 2021 17:52 > To: linux-arm-kernel@lists.infradead.org; kvmarm@lists.cs.columbia.edu; > linux-kernel@vger.kernel.org > Cc: maz@kernel.org; will@kernel.org; catalin.marinas@arm.com; > james.morse@arm.com; julien.thierry.kdev@gmail.com; > suzuki.poulose@arm.com; jean-philippe@linaro.org; Linuxarm > > Subject: [RFC PATCH 0/3] kvm/arm: New VMID allocator based on asid(2nd > approach) > > This is based on a suggestion from Will [0] to try out the asid > based kvm vmid solution as a separate VMID allocator instead of > the shared lib approach attempted in v4[1]. > > The idea is to compare both the approaches and see whether the > shared lib solution with callbacks make sense or not. A gentle ping on this. Please take a look and let me know. Thanks, Shameer > Though we are not yet using the pinned vmids yet, patch #2 has > code for pinned vmid support. This is just to help the comparison. > > Test Setup/Results > ---------------- > The measurement was made with maxcpus set to 8 and with the > number of VMID limited to 4-bit. The test involves running > concurrently 40 guests with 2 vCPUs. Each guest will then > execute hackbench 5 times before exiting. > > The performance difference between the current algo and the > new one are(avg. of 10 runs): > - 1.9% less entry/exit from the guest > - 0.5% faster > This is more or less comparable to v4 numbers. > > For the complete series, please see, > https://github.com/hisilicon/kernel-dev/tree/private-v5.12-rc7-vmid-2nd-rfc > > and for the shared asid lib v4 solution, > https://github.com/hisilicon/kernel-dev/tree/private-v5.12-rc7-asid-v4 > > As you can see there are of course code duplication with this > approach but may be this one is more easy to maintain considering > the complexity involved. > > Please take a look and let me know your feedback. > > Thanks, > Shameer > > > [0] https://lore.kernel.org/lkml/20210422160846.GB2214@willie-the-truck/ > [1] > https://lore.kernel.org/lkml/20210414112312.13704-1-shameerali.kolothum.t > hodi@huawei.com/ > > Julien Grall (2): > arch/arm64: Introduce a capability to tell whether 16-bit VMID is > available > kvm/arm: Align the VMID allocation with the arm64 ASID one > > Shameer Kolothum (1): > kvm/arm: Introduce a new vmid allocator for KVM > > arch/arm64/include/asm/cpucaps.h | 3 +- > arch/arm64/include/asm/kvm_asm.h | 4 +- > arch/arm64/include/asm/kvm_host.h | 11 +- > arch/arm64/include/asm/kvm_mmu.h | 7 +- > arch/arm64/kernel/cpufeature.c | 9 + > arch/arm64/kvm/Makefile | 2 +- > arch/arm64/kvm/arm.c | 115 ++++-------- > arch/arm64/kvm/hyp/nvhe/hyp-main.c | 6 +- > arch/arm64/kvm/hyp/nvhe/tlb.c | 10 +- > arch/arm64/kvm/hyp/vhe/tlb.c | 10 +- > arch/arm64/kvm/mmu.c | 1 - > arch/arm64/kvm/vmid.c | 285 > +++++++++++++++++++++++++++++ > 12 files changed, 354 insertions(+), 109 deletions(-) > create mode 100644 arch/arm64/kvm/vmid.c > > -- > 2.17.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel