Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753968AbdHRDT5 (ORCPT ); Thu, 17 Aug 2017 23:19:57 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:4060 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753775AbdHRDT4 (ORCPT ); Thu, 17 Aug 2017 23:19:56 -0400 Subject: Re: [PATCH 0/5] arm-smmu: performance optimization To: Will Deacon References: <1498484330-10840-1-git-send-email-thunder.leizhen@huawei.com> <20170817143650.GB30338@arm.com> CC: Joerg Roedel , linux-arm-kernel , iommu , Robin Murphy , linux-kernel , Zefan Li , Xinwei Hu , Tianhong Ding , Hanjun Guo , John Garry , From: "Leizhen (ThunderTown)" Message-ID: <59965CA4.10907@huawei.com> Date: Fri, 18 Aug 2017 11:19:00 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <20170817143650.GB30338@arm.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.23.164] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020206.59965CAF.00FE,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: cd85c98cc7b0b5d4cc7bdf8d1f09ecf1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1497 Lines: 42 On 2017/8/17 22:36, Will Deacon wrote: > Thunder, Nate, Robin, > > On Mon, Jun 26, 2017 at 09:38:45PM +0800, Zhen Lei wrote: >> I described the optimization more detail in patch 1 and 2, and patch 3-5 are >> the implementation on arm-smmu/arm-smmu-v3 of patch 2. >> >> Patch 1 is v2. In v1, I directly replaced writel with writel_relaxed in >> queue_inc_prod. But Robin figured that it may lead SMMU consume stale >> memory contents. I thought more than 3 whole days and got this one. >> >> This patchset is based on Robin Murphy's [PATCH v2 0/8] io-pgtable lock removal. > > For the time being, I think we should focus on the new TLB flushing > interface posted by Joerg: > > http://lkml.kernel.org/r/1502974596-23835-1-git-send-email-joro@8bytes.org > > which looks like it can give us most of the benefits of this series. Once > we've got that, we can see what's left in the way of performance and focus > on the cmdq batching separately (because I'm still not convinced about it). OK, this is a good news. But I have a review comment(sorry, I have not subscribed it yet, so can not directly reply it): I don't think we should add tlb sync for map operation 1. at init time, all tlbs will be invalidated 2. when we try to map a new range, there are no related ptes bufferd in tlb, because of above 1 and below 3 3. when we unmap the above range, make sure all related ptes bufferd in tlb to be invalidated before unmap finished > > Thanks, > > Will > > . > -- Thanks! BestRegards