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=-10.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham 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 E9BE0C4361A for ; Thu, 3 Dec 2020 14:55:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8E5F0206D5 for ; Thu, 3 Dec 2020 14:55:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728124AbgLCOzo (ORCPT ); Thu, 3 Dec 2020 09:55:44 -0500 Received: from frasgout.his.huawei.com ([185.176.79.56]:2200 "EHLO frasgout.his.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726056AbgLCOzo (ORCPT ); Thu, 3 Dec 2020 09:55:44 -0500 Received: from fraeml743-chm.china.huawei.com (unknown [172.18.147.200]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4CmzND2Zsqz67LbF; Thu, 3 Dec 2020 22:53:00 +0800 (CST) Received: from lhreml724-chm.china.huawei.com (10.201.108.75) by fraeml743-chm.china.huawei.com (10.206.15.224) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Thu, 3 Dec 2020 15:54:57 +0100 Received: from [10.47.8.200] (10.47.8.200) by lhreml724-chm.china.huawei.com (10.201.108.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1913.5; Thu, 3 Dec 2020 14:54:56 +0000 Subject: Re: [RESEND PATCH v3 0/4] iommu/iova: Solve longterm IOVA issue To: Dmitry Safonov <0x7f454c46@gmail.com>, Will Deacon CC: Joerg Roedel , , Catalin Marinas , , , , , open list References: <1605608734-84416-1-git-send-email-john.garry@huawei.com> <160685669713.992935.17438167536143205811.b4-ty@kernel.org> From: John Garry Message-ID: <6e09d847-fb7f-1ec1-02bf-f0c8b315845f@huawei.com> Date: Thu, 3 Dec 2020 14:54:27 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.1.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Originating-IP: [10.47.8.200] X-ClientProxiedBy: lhreml734-chm.china.huawei.com (10.201.108.85) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/12/2020 06:04, Dmitry Safonov wrote: > On Tue, 1 Dec 2020 at 21:50, Will Deacon wrote: >> On Tue, 17 Nov 2020 18:25:30 +0800, John Garry wrote: >>> This series contains a patch to solve the longterm IOVA issue which >>> leizhen originally tried to address at [0]. >>> >>> A sieved kernel log is at the following, showing periodic dumps of IOVA >>> sizes, per CPU and per depot bin, per IOVA size granule: >>> https://raw.githubusercontent.com/hisilicon/kernel-dev/topic-iommu-5.10-iova-debug-v3/aging_test >>> >>> [...] >> Applied the final patch to arm64 (for-next/iommu/iova), thanks! >> >> [4/4] iommu: avoid taking iova_rbtree_lock twice >> https://git.kernel.org/arm64/c/3a651b3a27a1 > Glad it made in next, 2 years ago I couldn't convince iommu maintainer > it's worth it (but with a different justification): > https://lore.kernel.org/linux-iommu/20180621180823.805-3-dima@arista.com/ Hi Dmitry, I was unaware of your series, and it’s unfortunate that your optimization never made it. However I was having a quick look there, and, in case you did not notice, that the code which you were proposing changing in patch #1 for intel-iommu.c was removed in e70b081c6f37 ("iommu/vt-d: Remove IOVA handling code from the non-dma_ops path"). BTW, split_and_remove_iova() has no in-tree users anymore, so I can send a patch to delete if nobody else wants to. BTW2, there's some more patches in my series which could use a review if you're feeling very helpful :) Cheers, John