Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp4017949pxk; Tue, 8 Sep 2020 08:37:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxaXbqsEq/VR1dAuLaeUaVc2jzXQUcUfORKwKur6b9cinchrgNkoN59UcbMMx7OTYwB6BrK X-Received: by 2002:a17:906:3f89:: with SMTP id b9mr17992713ejj.463.1599579425132; Tue, 08 Sep 2020 08:37:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599579425; cv=none; d=google.com; s=arc-20160816; b=dGYupWDiVtMllD0naWZVYlN2q8hm+OEJzS387pVqJqXgpkox3iDzlVutU9RvS1R1CP i5EzSwW6ew0ZBQTKXr9AdSmFbclWc4Zpmd7Di8Rm35hsFw46PTNwXepFT/vxodUrb6Aw /ycqjOkxxLJrm8cjsht0st1TUAZDCFTEL+zNDdmSN0ch37j2rMnbawXcq+V5CPTNgnKm myMXeD7QcMdZB21Agvggqe+gbCQ8/Q3C285e8/U4+pFgsd31z3Zm9e3NrXq7Y0TDJc8/ uuWbJe3yt3i4aNtpHkmrWfef4Ej8PhYLbNTAMuYefIra4gDddNt7lhTgTEGca+E+ZihW OS1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=qUWQAoxw9IbpUvhCTryhn0GzrvdjmOfpKS2Q9BHkQ18=; b=dJOmYzjKrDonf/xom+qFXSjw6p++gRNN46xuLlOh5fI6jdFb8InLtAna4FB40o+Lqw pEtx2w3cqgE9HbLinpwevxpfvgH0yiptgODyAWp5NiL+4W72bjel1NsfqHEYDXC2leMd HsM2Ckl/BITCMk+hUAH33lVvzyD+jTpjEw0REKGE/atVszOCb/pxt0I3bWs1eH0ohEkd 8q4ccVNzZ7b0SrD9PcExwmOXbkJWjOrIGPRmjDYS7y5FkXPI4YpBl6+E47t3WYoCHTDg 4DNohTRMiWmyVRoHBIi/78a/GFWQZGINgRg2qzFhiVDlw1+ZaPKyJTIfBq4O3KwwuRKl xXQg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g8si13052918ejm.633.2020.09.08.08.36.41; Tue, 08 Sep 2020 08:37:05 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730570AbgIHPgA (ORCPT + 99 others); Tue, 8 Sep 2020 11:36:00 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:10847 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730205AbgIHPfO (ORCPT ); Tue, 8 Sep 2020 11:35:14 -0400 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 9275A3EFE096A39CE752; Tue, 8 Sep 2020 21:32:17 +0800 (CST) Received: from localhost (10.174.151.129) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.487.0; Tue, 8 Sep 2020 21:32:10 +0800 From: Ming Mao To: , , , , CC: , , , , , , Ming Mao Subject: [PATCH V4 0/2] vfio: optimized for hugetlbf pages when dma map/unmap Date: Tue, 8 Sep 2020 21:32:02 +0800 Message-ID: <20200908133204.1338-1-maoming.maoming@huawei.com> X-Mailer: git-send-email 2.26.2.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.174.151.129] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This series deletes the for loop in dma_map/unmap for hugetlb pages. In the original process, the for loop could spend much time to check all normal pages.If we use hugetlb pages, it is not necessary to do this. Changes from v3 - add a new API unpin_user_hugetlb_pages_dirty_lock() - use the new API to unpin hugetlb pages Ming Mao (2): vfio dma_map/unmap: optimized for hugetlbfs pages vfio: optimized for unpinning pages drivers/vfio/vfio_iommu_type1.c | 373 ++++++++++++++++++++++++++++++-- include/linux/mm.h | 3 + mm/gup.c | 91 ++++++++ 3 files changed, 450 insertions(+), 17 deletions(-) -- 2.23.0