Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp1236386pxa; Fri, 28 Aug 2020 07:27:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyHH316SnaR42im8K9nXCzbk5rDKZcEpRaPzRwn9IG9NhshKrXnuQmadBq7qXpzpwrRZGsJ X-Received: by 2002:a17:906:85c1:: with SMTP id i1mr2034009ejy.97.1598624852085; Fri, 28 Aug 2020 07:27:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598624852; cv=none; d=google.com; s=arc-20160816; b=AsXQrbjVAQcali5ceWQZ7Bc+IxKGIBVB2m3u9tkrm+ow2m0nj8f2WQqYeRrG+vbJrE t8zuF0GYLjiZjFxq1zO/ogLgEszTHn6GcboDaenRgp4nuPDzByTNqpwkolBoz2QrBgp6 lk72ZzkxvKIGDjq0gKlfVL/to2/xp6Vdb+npKskOSND5mgh3lEAsSzmq1h7dOTnp/Imd 6i1WEmEWNG/5h0e9h7fdnJQoSGCxMEfz798a+tJObj/SLwyTiy0ffElW/QsYCMDWQWX+ LZAI71YSMp7Xxs1KjYNO+fOJUf/GbEZYBDpd0vplmnVgbm+7EBEiYHWkDgUhqBitgRDX yqBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=qm4yw14oZW1kOamiCPd98+q7tZwl+c/TO08c6jDr94k=; b=F5++W5obfuG+y+tJbK37aQ3e5RiXnrTPvn4/OvHiXCgRZ8vMmq/mOK2Qoc+c3OYaAC 67SKjWGnYRaTs1nbg7FAonNOC6LYvvGX/A//dkjqvZasyDtR+cwDligpFj0U1WTizTHa cyyCQl71pKL3ztu5w7DYJZYpAw3zgKC9FTabMefOPOV6R6PagWVGb0OJZlV9g2X7XIFt w42Bn6p4U5VupSL7I0oG4WKj53wj2dhfYDoJk0ny2aHw4sxJMN+8HeqCUHJ9f3pSoEVv 4Shrv3027huts46pqn19GgRwR7QuKQjNwzGPMJs1V+a8c9qzVY4UQNfv1MXjlOuLrSru qzOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=C7j6jrIt; 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 cy23si710074edb.311.2020.08.28.07.27.07; Fri, 28 Aug 2020 07:27:32 -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=C7j6jrIt; 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 S1727046AbgH1OYK (ORCPT + 99 others); Fri, 28 Aug 2020 10:24:10 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:34166 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725857AbgH1OYG (ORCPT ); Fri, 28 Aug 2020 10:24:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598624645; 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: in-reply-to:in-reply-to:references:references; bh=qm4yw14oZW1kOamiCPd98+q7tZwl+c/TO08c6jDr94k=; b=C7j6jrItVMCieRNx3cbjEcKhJ1tODwxO2T/xYEhc1D6su05L+vrzTH0toqCEIdS4844INV /gZOyYDW0JL9rRhyrUVeEjaekPpV12roYLzHNpJ4MqI1wd1IVTrybU0SilQ9svlfFnmNkt 7nnGiUCKlWwZI097KDfKzBwOe/YnBdE= Received: from mail-qt1-f200.google.com (mail-qt1-f200.google.com [209.85.160.200]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-253-3D6blhN6NKW2-YOSRy6utg-1; Fri, 28 Aug 2020 10:24:04 -0400 X-MC-Unique: 3D6blhN6NKW2-YOSRy6utg-1 Received: by mail-qt1-f200.google.com with SMTP id p43so127951qtb.23 for ; Fri, 28 Aug 2020 07:24:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=qm4yw14oZW1kOamiCPd98+q7tZwl+c/TO08c6jDr94k=; b=LZK/p0LXPnCYnv1wA0BWqUkH+3lCKLWEvVW7PusnzweQCalFZ3ybIvZivU9FrYqyjL tmg5bBSnBemXelRUWvR4mMilvA2utIhkvq2DMrxPHj40106TIq9mOgG44LdQ8DrpfYzR hlJ84H6htcb7LtQhiAsXatOzXR46a82Rgsox3aLJ+G4gP6pWRzj3hiiUj+PuNdQ/zZ/b sAZwkdZzeLgSJagUPfAfKxBZHKw1nT8PfnJ3l4OcrIwtGZda4dRvQrWnnmF3QI1j/3OH eAm0PeGO7g1S1TdcqMQWuWzCHsvnC9JAsrKrpCRK+05Hcxr/mlQVFQdXHeMmw77LYglX Krxw== X-Gm-Message-State: AOAM532TRZk8/+yLqXtqUGt0PUvalAlcbYglSf2nta0HNVLweCHF+Xky 2G/ZrW+NeNXa3Csijj48Qfaon9F/wIcxJG6Nw+NaJdi+xYPgGCnQOiUG/iOAryubo/yDIU3rfRC s/XCRx5/lCawtroM/mvh9f2as X-Received: by 2002:a0c:dd05:: with SMTP id u5mr1964733qvk.143.1598624643646; Fri, 28 Aug 2020 07:24:03 -0700 (PDT) X-Received: by 2002:a0c:dd05:: with SMTP id u5mr1964698qvk.143.1598624643273; Fri, 28 Aug 2020 07:24:03 -0700 (PDT) Received: from xz-x1 (bras-vprn-toroon474qw-lp130-11-70-53-122-15.dsl.bell.ca. [70.53.122.15]) by smtp.gmail.com with ESMTPSA id w3sm886056qkc.10.2020.08.28.07.24.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Aug 2020 07:24:02 -0700 (PDT) Date: Fri, 28 Aug 2020 10:24:00 -0400 From: Peter Xu To: "Maoming (maoming, Cloud Infrastructure Service Product Dept.)" Cc: "linux-kernel@vger.kernel.org" , "kvm@vger.kernel.org" , "alex.williamson@redhat.com" , "cohuck@redhat.com" , "Zhoujian (jay)" , "Huangweidong (C)" , "aarcange@redhat.com" , wangyunjian Subject: Re: =?utf-8?B?562U5aSNOiDnrZTlpI06IFtQQVRD?= =?utf-8?Q?H?= V2] vfio dma_map/unmap: optimized for hugetlbfs pages Message-ID: <20200828142400.GA3197@xz-x1> References: <20200814023729.2270-1-maoming.maoming@huawei.com> <20200825205907.GB8235@xz-x1> <8B561EC9A4D13649A62CF60D3A8E8CB28C2D9ABB@dggeml524-mbx.china.huawei.com> <20200826151509.GD8235@xz-x1> <8B561EC9A4D13649A62CF60D3A8E8CB28C2DBE7A@dggeml524-mbx.china.huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <8B561EC9A4D13649A62CF60D3A8E8CB28C2DBE7A@dggeml524-mbx.china.huawei.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 28, 2020 at 09:23:08AM +0000, Maoming (maoming, Cloud Infrastructure Service Product Dept.) wrote: > In hugetlb_put_pfn(), I delete unpin_user_pages_dirty_lock() and use some simple code to put hugetlb pages. > Is this right? I think we should still use the APIs because of the the same reason. However again I don't know the performance impact of that to your patch, but I still think that could be done inside gup itself when needed (e.g., a special path for hugetlbfs for [un]pinning continuous pages; though if that's the case that could be something to be discussed on -mm then as a separate patch, imho). Thanks, -- Peter Xu