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=-2.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=no 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 DE1CFC433FF for ; Tue, 13 Aug 2019 17:10:53 +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 B44D620679 for ; Tue, 13 Aug 2019 17:10:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="OhCgNtQe"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="VSoIwMBN" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B44D620679 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-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.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=PJWJn4ZogizYp0FJLz0tNCroW/JWt3hotN4LD/iCkI4=; b=OhCgNtQeuv55Ku XzDVDGmBFuYn+J1RqQszCeb8I7TMD2I3kA1IWkvJl+OUBdue/UsVu1wilOSwwqR6Kw4tdIqrwIPpW wQUC3yPCMBUYPIjWHZeNhQFRYUToCeQ9XtZcMLpioyzzszwVak9zXOO5C36ibaKs6mNkPvcp9Ryhm rgb7rGrY27I3z3KUJeA/saY3cEdIOURcmPXZ/ez2ZHItv7VLeZQWnkCzH+R0eT8ad96ODUopUEZ48 3j1S1uu98DA6TTTb1pesq7DrCEzLYqw2i3irwkDgJoa8f6lcnrbp9130ppGD16l8cErbTmgeY4cHZ c/u92C/2JRwHqykL1YLw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hxaJr-0007Hi-2V; Tue, 13 Aug 2019 17:10:47 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hxaJo-0007HJ-Nt for linux-arm-kernel@lists.infradead.org; Tue, 13 Aug 2019 17:10:45 +0000 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 CCE5E20679; Tue, 13 Aug 2019 17:10:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1565716244; bh=3HAujAOVhRvVLw9Wr49q0ihG1ZR2YhR/IpIuwrI01jM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=VSoIwMBNPftQwtRHK78noD6VrYTtEw2/zdtVMnZa+W21+JNwBjt4M/+CUmJoAKYgm vxnL6pOXtRJd3CWe1kfjMMNi8OVv8A4+2H2XXoExvno/NOG8KwCkt3EU/SRc/RJnOy 8Wu9Xp1qau4NNWdG7KQeXOPxv1afsB4fLI53LFeo= Date: Tue, 13 Aug 2019 18:10:40 +0100 From: Will Deacon To: John Garry Subject: Re: [PATCH] iommu/arm-smmu-v3: add nr_ats_masters to avoid unnecessary operations Message-ID: <20190813171039.y64wslo4dzgyis3e@willie-the-truck> References: <20190801122040.26024-1-thunder.leizhen@huawei.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190813_101044_800861_457E06F1 X-CRM114-Status: GOOD ( 14.74 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: jean-philippe@linaro.org, Jean-Philippe Brucker , Joerg Roedel , linux-kernel , iommu , Zhen Lei , Robin Murphy , linux-arm-kernel Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Aug 12, 2019 at 11:42:17AM +0100, John Garry wrote: > On 01/08/2019 13:20, Zhen Lei wrote: > > When (smmu_domain->smmu->features & ARM_SMMU_FEAT_ATS) is true, even if a > > smmu domain does not contain any ats master, the operations of > > arm_smmu_atc_inv_to_cmd() and lock protection in arm_smmu_atc_inv_domain() > > are always executed. This will impact performance, especially in > > multi-core and stress scenarios. For my FIO test scenario, about 8% > > performance reduced. > > > > In fact, we can use a atomic member to record how many ats masters the > > smmu contains. And check that without traverse the list and check all > > masters one by one in the lock protection. > > > > Hi Will, Robin, Jean-Philippe, > > Can you kindly check this issue? We have seen a signifigant performance > regression here. Sorry, John: Robin and Jean-Philippe are off at the moment and I've been swamped dealing with the arm64 queue. I'll try to get to this tomorrow. Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel