Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1689047pxj; Wed, 19 May 2021 11:31:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxhUF+Tmip8wsfVFgM62atrSx/5/EupA0mGagwZLU42cZUN5bF7CvtrydHwQENNM6Vt+qLY X-Received: by 2002:a17:907:1749:: with SMTP id lf9mr542598ejc.178.1621449062399; Wed, 19 May 2021 11:31:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621449062; cv=none; d=google.com; s=arc-20160816; b=zJGRbfP3eMonmBo78GeAn7WXKtnBHdUFlwBgV58JjWkqjwFa3lUwGQDgGDf0LpVGJH HHrQ2fv8EvPsOB+7jtCwcbNpAMzMDQBN4+j8SxdaoWnaLzRJ0mPCfshHgaAkPjaAXmYX 1mL2ptfNLQCi4I4XFqzz+QFiakllSTwuMHws2IEp92aK76Hqe1xgbKONofIrzhdP+CX/ vl1obLw+PW/4R/Bg6T/TosiWTDtXvoxcLfw96GOQg6Jmlm+zGFrEyvsjwolmixVftiwh RrB4hc1acN0gdJcOYL/m+DMPHTFzrEN0kpJ6rftiPV1iofi0XuxYt9xpGNvL914B5X8h 06hA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=KnsitSUYNYIrkYp5/4jTUdGYLDO+k29G3HMJTBbuxHc=; b=wIfD7+R7cE1jMYmaqSilgAWRtoMMQK2XJlp1wq6fn7MFRSWUV/HCEg/O1An2Eop4rw pLmKXbOw/FSEEhMT/KisQIopXdu67vqIPTjdOkCyn2iHmlhTPQn5xK6/mcyBOSLejlme 5sBWtBmsvjK+KIdj+J+/Lyd8Udao5Nz0RhPSmECmzjxeG0QO8Rp814CLrYMGu2gWak9O hhxeQjELOYk7vzJIlVtkbk3M9coZzRi3vomc+Cr4IDV6lUg/KTA5j5DKiDMFbzvuzHSK vu8wBVkEBhQUKYcBQV/R0tBzG5TQt4RpP0TGzDLf6s/yDBC5uNyQ73263pE33cF+3ePR NQ5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=PR8yCb6K; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bj22si446225ejb.53.2021.05.19.11.30.36; Wed, 19 May 2021 11:31:02 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=PR8yCb6K; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351774AbhERTAp (ORCPT + 99 others); Tue, 18 May 2021 15:00:45 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:58033 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351733AbhERTA0 (ORCPT ); Tue, 18 May 2021 15:00:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1621364348; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=KnsitSUYNYIrkYp5/4jTUdGYLDO+k29G3HMJTBbuxHc=; b=PR8yCb6KefxGUnh5IvzYQO4efBfyKvd7bJ7XrhTMtZzhzIpMqV2pRbXQeoZRWNK/XxtBzE 1b0Lq7XDhiQ/lB/m+aP3EoCmbwajpjlY4ek0mGiofEYymwVUt3ROTJtBS9bvbtU/B6r9Yq yZ5LbNQrNsjxxevkFstM0gW024i/ZCU= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-209-vS--UL1LNZqF1pGSTXmJPQ-1; Tue, 18 May 2021 14:59:04 -0400 X-MC-Unique: vS--UL1LNZqF1pGSTXmJPQ-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id DDEE11012D9A; Tue, 18 May 2021 18:59:01 +0000 (UTC) Received: from redhat.com (ovpn-113-225.phx2.redhat.com [10.3.113.225]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2345B100F49F; Tue, 18 May 2021 18:59:01 +0000 (UTC) Date: Tue, 18 May 2021 12:58:26 -0600 From: Alex Williamson To: Shenming Lu Cc: Cornelia Huck , Will Deacon , Robin Murphy , Joerg Roedel , Jean-Philippe Brucker , Eric Auger , , , , , , Kevin Tian , Lu Baolu , , Christoph Hellwig , Jonathan Cameron , Barry Song , , Subject: Re: [RFC PATCH v3 4/8] vfio/type1: Pre-map more pages than requested in the IOPF handling Message-ID: <20210518125826.7ba38b78.alex.williamson@redhat.com> In-Reply-To: <20210409034420.1799-5-lushenming@huawei.com> References: <20210409034420.1799-1-lushenming@huawei.com> <20210409034420.1799-5-lushenming@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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, Alex