Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp3196936pxb; Tue, 12 Jan 2021 08:36:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJyJXY8NpKM/QaFu5rLar75LRxMOJvMgQSrQjWysEmRJLGGVkpcqgbcHAsPkcaPhyi8DYgC7 X-Received: by 2002:a17:906:1498:: with SMTP id x24mr3655921ejc.170.1610469411092; Tue, 12 Jan 2021 08:36:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610469411; cv=none; d=google.com; s=arc-20160816; b=CBbTTkd2gZIP4tJtp7th0J3mJYF+OtPiieBC9AzqVza9JhoLoLoCLP8DyGLeapqkgz Y8eIQbEzoeyBEHgEPap1EM0V4IX93i/w7jx95UW7N8M8X1EB59qkqM1WSmh/5fw3tZN0 NnTrmyO+LXpmvuzoaU49II39Z7KNd3p9tWMBhLT96+3wWWvZAVM3yug4q3NwgbCT93kE 8NNdoBV2NExNmuJN2UOkbnnOBKNftBqVAz5MInsVixdYjwlQW8bU+VDR2skXq/hVWbe8 TneW3/F+o2ri9S1YxUOrB4QMdJJACcLYGA9a77WHdNGX1cYyBswGOg34Su9qB5aO1cnT 8ZrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=mBioehHDUzlvAsPzae77HJfwX+E6M+3CVgwDUqEdzwQ=; b=bitpB4W88mdvQSUFaLRA309RTI5IUIj1sDBOvFw40BHX8qpxouLr2/DBeVJrtSeqDW niRTAdUNpiSszXdT9nyDPcEtRnm2fy7K4g0tFoTDNz2SO6s5rJJ44dLrh6wm/XiiFcb2 Xcy5uRwiSMWEu+Xkw4p4+FHhkMicVnt7fdmMBG6qmHX4diva9HDR9PBAsIElJOmpQol2 zJf0IgKmUuKscIMsZYy+ffL+B4q7LU6WSY/76z/rLT84DjNzZOu5v8Nw912vae/HGyc8 GOuNPFwRRmxpn4QPXBmCnX0jiHoc5a/IIgNpYfIhlQ6LJX3FEximRwXeZrYemJLa3O2Z waRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=U3gMFkib; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h12si1327361eje.122.2021.01.12.08.36.27; Tue, 12 Jan 2021 08:36:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=U3gMFkib; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2405490AbhALQek (ORCPT + 99 others); Tue, 12 Jan 2021 11:34:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35678 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727201AbhALQek (ORCPT ); Tue, 12 Jan 2021 11:34:40 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1241DC061786 for ; Tue, 12 Jan 2021 08:34:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=mBioehHDUzlvAsPzae77HJfwX+E6M+3CVgwDUqEdzwQ=; b=U3gMFkibCIPYY7WCMckP1Qz2w3 ehyPhKN/2d/DP7Gd5aG2g+3s/ZqAYAeQre+ra5TeoRwPg1ypLFH9UUlsin+PmI5oq5zzqNpejl4MT znWNWxSLdgcSYxRrBG85TkYMEYzlqOvsXl4dDwXla4lI/BwLhKxyMmrkiaSraNgKlbkGJStBPhhz2 NJ3Rts5EJe7yOHQJkn580Y2oqYqO7GisUZGNzMiT0RqkuTve4tCiM5wyq8ysoHa0eX/sdf1t00oQ/ yl38By6JYvCQe/vCKnAbzFQWzhUjpUDUkaOyOW0HLfhZqybTc3Oju99rYpQDzE/zOli9ssgnVbUNB cxs8EabQ==; Received: from hch by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1kzMbT-0052bL-NA; Tue, 12 Jan 2021 16:33:19 +0000 Date: Tue, 12 Jan 2021 16:33:07 +0000 From: Christoph Hellwig To: Robin Murphy Cc: "Isaac J. Manjarres" , will@kernel.org, joro@8bytes.org, pdaly@codeaurora.org, pratikp@codeaurora.org, linux-arm-kernel@lists.infradead.org, iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 0/5] Optimize iommu_map_sg() performance Message-ID: <20210112163307.GA1199965@infradead.org> References: <1610376862-927-1-git-send-email-isaacm@codeaurora.org> <8ad6db90-1d86-db2a-ccb5-dc3f01213289@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8ad6db90-1d86-db2a-ccb5-dc3f01213289@arm.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 12, 2021 at 04:00:59PM +0000, Robin Murphy wrote: > Out of curiosity, how much of the difference is attributable to actual > indirect call overhead vs. the additional massive reduction in visits to > arm_smmu_rpm_{get,put} that you fail to mention? There are ways to optimise > indirect calling that would benefit *all* cases, rather than just one > operation for one particular driver. Do we have systems that use different iommu_ops at the same time? If not this would be a prime candidate for static call optimizations. Also I've been pondering adding direct calls to the iommu dma ops like we do for DMA direct. This would allow to stop using dma_ops entirely for arm64.