Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1327844pxj; Fri, 21 May 2021 11:23:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzndBV/FnSFpFn6SRy8X6fq8Dtt+I+o9w02H7FeXJnnB95FEaAPhyWGzBgrUAaQoYGB4ZeD X-Received: by 2002:a17:906:ff4b:: with SMTP id zo11mr10102454ejb.345.1621621420575; Fri, 21 May 2021 11:23:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621621420; cv=none; d=google.com; s=arc-20160816; b=o+LBjsUYgdY6r5ZGeZ26DJKhwAZlnPWsYZvjjlcXA7WnFouDEc+fMrNHDf1hSBrZUy ilWM9Hy6vgPwd5n4+CYXHHokVOv2IJzjJuBf+cIlAAVi3SoeRuxGIkxDH/eFmbrseHIe acjv0NicAFlvcdkGWV4ujusjhaov/oNc8AQ8uCxyUAjgoLIShyODklGQ/nWwbcTVu6TN qOL1WpihhPKjW850/0hm1v3keZN1mSAFD9uZy6c+xVrr9Sf8avSspKQuj9b6U9V/CNof YiMm9VB9WNY2SiohP6SiCLZbQb+/OcApeiuWftQ9lBRFEUG2pZcLU2ssszt0chL40oNP tWXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=p+yNGM0pxhIVTeTqPTVD4/T7IWqeFl+Pv+AS732wTCk=; b=gd3ovczzeR9EeKiyJL/hYeaBktdLNO9r11Jiljy/qKTFVlGxpkCct+tOG8wgQTV1q3 PzeP5syIRZmXFJ/Wxm4/VS+2l3BfCaRZUORqHQRBlXKYMLAtpucvL9dBvi9O4vdJbPxZ BfCQk4kJscEMcxdN5fR6MK2kO7bTriFfiMYeaaOLwET5HtulgqcSFvUuXv/nqM8auvH5 OhWm1lnCqAyDDmdeSCdsR075OXfKIK0fl0ezGD9lONDpJM3r6z1hUiPNCwbnRSXo7UpN yXII43yMNw3IVBKTeuJY5RoW6KBRg9OqsMGJJjJVumaTGP8T34UkGurOEPhECRw0isXo Hg+w== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x4si3784997ede.21.2021.05.21.11.23.16; Fri, 21 May 2021 11:23:40 -0700 (PDT) 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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233289AbhEUGmh (ORCPT + 99 others); Fri, 21 May 2021 02:42:37 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:3644 "EHLO szxga06-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233394AbhEUGjW (ORCPT ); Fri, 21 May 2021 02:39:22 -0400 Received: from dggems701-chm.china.huawei.com (unknown [172.30.72.59]) by szxga06-in.huawei.com (SkyGuard) with ESMTP id 4FmcLM4xKxzmXTd; Fri, 21 May 2021 14:35:39 +0800 (CST) Received: from dggpemm500022.china.huawei.com (7.185.36.162) by dggems701-chm.china.huawei.com (10.3.19.178) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Fri, 21 May 2021 14:37:56 +0800 Received: from [10.174.187.155] (10.174.187.155) by dggpemm500022.china.huawei.com (7.185.36.162) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Fri, 21 May 2021 14:37:56 +0800 Subject: Re: [RFC PATCH v3 4/8] vfio/type1: Pre-map more pages than requested in the IOPF handling To: Alex Williamson CC: Cornelia Huck , Will Deacon , "Robin Murphy" , Joerg Roedel , "Jean-Philippe Brucker" , Eric Auger , , , , , , Kevin Tian , Lu Baolu , , Christoph Hellwig , Jonathan Cameron , "Barry Song" , , References: <20210409034420.1799-1-lushenming@huawei.com> <20210409034420.1799-5-lushenming@huawei.com> <20210518125826.7ba38b78.alex.williamson@redhat.com> From: Shenming Lu Message-ID: Date: Fri, 21 May 2021 14:37:55 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.2.2 MIME-Version: 1.0 In-Reply-To: <20210518125826.7ba38b78.alex.williamson@redhat.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.187.155] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggpemm500022.china.huawei.com (7.185.36.162) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021/5/19 2:58, Alex Williamson wrote: > On Fri, 9 Apr 2021 11:44:16 +0800 > Shenming Lu wrote: > >> To optimize for fewer page fault handlings, we can pre-map more pages >> than requested at once. >> >> Note that IOPF_PREMAP_LEN is just an arbitrary value for now, which we >> could try further tuning. > > I'd prefer that the series introduced full end-to-end functionality > before trying to improve performance. The pre-map value seems > arbitrary here and as noted in the previous patch, the IOMMU API does > not guarantee unmaps of ranges smaller than the original mapping. This > would need to map with single page granularity in order to guarantee > page granularity at the mmu notifier when the IOMMU supports > superpages. Thanks, Yeah, I will drop this patch in the current stage. Thanks, Shenming > > Alex > > . >