Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp6194966ybx; Mon, 11 Nov 2019 05:28:36 -0800 (PST) X-Google-Smtp-Source: APXvYqxY5wxJPPfjLFadhceldMRS9WkXzeWdVULkUJ3bghH0huKMCbR3hNJFY3t5JsMqN97GZiI/ X-Received: by 2002:a17:906:9248:: with SMTP id c8mr23210330ejx.47.1573478916007; Mon, 11 Nov 2019 05:28:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573478916; cv=none; d=google.com; s=arc-20160816; b=aMuMBNG9ueBjrugdCBiLSRcDKqWAifihcnJSm2AnpnLhM5TuhWJqKAjspAxZt6kwd0 1psfR8LpDimEcduf1gOrzmlWpV5N0uywS/HVofhv8ScC7AXcO4Jq6a1PuBxivUBL0nE2 oF/8HvjNxVlL/Mx/G5hNfpDe7gAuOEOY8WiTkiYuGqE9A6wQdi9CsorVOTkSd2m5IMtY 6n5WLjS1guawbnSuuDCkRzCHq2+uBEbOYKbGDoY2QZAWi2TQzSwnd5NKmIwbMUumbycf /4s5hFKvLsHqdzsuEOBSs01Y34Un8CsBzPzlN3tsND6YXoazkhAqj1mvyVmy48XQNytj ZyJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=ctDypB0itV83Sy18k8Yn6Y9pBFe26J14QODzVrigM6Y=; b=IFQKDnhQeWd5OctnveMJXMerBqlFMbtfQ6RVPgUMOaB/ARQ96EcDGv25zexx29IXeG H1xLyFH3l858UwKbz2I1F1eNiX5uRjAg1rUfd+wyMB3ZKk07RbVV9f4H2/J90xVlHTQ5 n0dunYzel0uyPDTBZEZdfaRL1DoQA/1fWTbghubhYruADQlgWADyVbTUpXpVLS12BhcO kEQx17VUiG88wc1yaV/5aZJpWtgLMtfuHXiAO6JO+bH0sbWA7prbmmxNA5kUj69oqZOZ hbN7z3BIqMwh0+NKxIJCSd37yNVbKpBtPnMy2DMBbEkXgJOglcjYKxt0Gve07wCqGZwn sfaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=m+qMg8uH; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y24si6098529ejc.170.2019.11.11.05.28.11; Mon, 11 Nov 2019 05:28:35 -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=@kernel.org header.s=default header.b=m+qMg8uH; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726959AbfKKN1X (ORCPT + 99 others); Mon, 11 Nov 2019 08:27:23 -0500 Received: from mail.kernel.org ([198.145.29.99]:40442 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726879AbfKKN1X (ORCPT ); Mon, 11 Nov 2019 08:27:23 -0500 Received: from willie-the-truck (236.31.169.217.in-addr.arpa [217.169.31.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DBCC32196E; Mon, 11 Nov 2019 13:27:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573478842; bh=3khfY817g3PS5TkES+rklqgKgMSJFdurf0htRIWV3E8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=m+qMg8uHBw99MxUsk26njdjGjDT/Ta8ES+ZVEG2GQ0udk7tYSiKb+Jd1xciKXpB8F twU/HuO8oIndjNsYOzuMjoEa907GWnUixaMXCV1d3Wa3GFZc5BFH+gfgMfWCP1lcli Fpo2XworndBJncJiA4o6dYYhc2YNDoBJat65lfPM= Date: Mon, 11 Nov 2019 13:27:17 +0000 From: Will Deacon To: Zhenyu Ye Cc: catalin.marinas@arm.com, maz@kernel.org, suzuki.poulose@arm.com, mark.rutland@arm.com, tangnianyao@huawei.com, xiexiangyou@huawei.com, linux-kernel@vger.kernel.org, arm@kernel.org Subject: Re: [RFC PATCH v2] arm64: cpufeatures: add support for tlbi range instructions Message-ID: <20191111132716.GA9394@willie-the-truck> References: <5DC960EB.9050503@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5DC960EB.9050503@huawei.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 11, 2019 at 09:23:55PM +0800, Zhenyu Ye wrote: > ARMv8.4-TLBI provides TLBI invalidation instruction that apply to a > range of input addresses. This patch adds support for this feature. > This is the second version of the patch. > > I traced the __flush_tlb_range() for a minute and get some statistical > data as below: > > PAGENUM COUNT > 1 34944 > 2 5683 > 3 1343 > 4 7857 > 5 838 > 9 339 > 16 933 > 19 427 > 20 5821 > 23 279 > 41 338 > 141 279 > 512 428 > 1668 120 > 2038 100 > > Those data are based on kernel-5.4.0, where PAGENUM = end - start, COUNT > shows number of calls to the __flush_tlb_range() in a minute. There only > shows the data which COUNT >= 100. The kernel is started normally, and > transparent hugepage is opened. As we can see, though most user TLBI > ranges were 1 pages long, the num of long-range can not be ignored. > > The new feature of TLB range can improve lots of performance compared to > the current implementation. As an example, flush 512 ranges needs only 1 > instruction as opposed to 512 instructions using current implementation. > > And for a new hardware feature, support is better than not. > > Signed-off-by: Zhenyu Ye > --- > ChangeLog v1 -> v2: > - Change the main implementation of this feature. > - Add some comments. How does this address my concerns here: https://lore.kernel.org/linux-arm-kernel/20191031131649.GB27196@willie-the-truck/ ? Will