Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp550975pxk; Sun, 30 Aug 2020 13:45:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzpOvDWnVZAIFh6NwF/RHNnkA/9LEbafxY1MWNjQJq9kgbNO4V43b+Eh+lUBVP8UZGGSJ/F X-Received: by 2002:a17:906:54d3:: with SMTP id c19mr9544501ejp.408.1598820348000; Sun, 30 Aug 2020 13:45:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598820347; cv=none; d=google.com; s=arc-20160816; b=o2xS++1g9qKgQQjfKgCxiRn80fbNUz1E4wC614d1w+s1EfjRunFBwtwtHtIWVuX6Sb 4mNRiqzaKct32GiEQq+GUg4HH2HT0RZPIMxP3E2tWxBWaxqA927x+3v4HA1f0XXSJnCk fAZC6VnH2Ke9keq2g078DDPOQKqdj2q8kSQRdMqPDgrImj/zgEJafO6w6PFwsL8Y6AwF OLAtk/8vzNHHnCk72XvtyUI7wHMvh0msbuu5maaVxUq+jX6FUs0dHtwTVfXGy/ZTmnrO sZjOmiV/AdkKkgJR3kYFjPYs+l4qHQpzCUJypBkQU8c92UFB7PmF1GzURkSy0EqmOtAA mq0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:dkim-signature:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=VpXWPapMvQEi4/NaEs92wBWmsY7/i8I/51IItbed+yc=; b=Zk9s/HyOcegOLUqzNA8LKFTiFUEMbQxDrwkm6j3Dnmul67SQ9fhdrD6B9N4pPx4sC5 yrCpJxvln1Ind6axl1JdNrkVRHj1byDK9XZZJWKklqW3my4yKDlfPPvVZNlaeO2juct/ UIiMXFz/US29uvaM+QJtzRyh3IX73yawc9jZGg25ML2CCQA9VPVEm5uBC9lPXY/Hqhwr hgIL6p149QPNR4AYWBQlAT0yF+Xz3y91X75CqH6CBBRoFZ7L/wocaejI6gzWOa86Yx4+ Tma83oLexxK4tWxDrtOO5sFvDl8h+svpcPLZWc7PQ8oT8b5VzfYeYCjWDZtBTj9XxEOT Fv4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=JoJTBvi4; 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=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d14si3967604edx.156.2020.08.30.13.45.25; Sun, 30 Aug 2020 13:45:47 -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=@nvidia.com header.s=n1 header.b=JoJTBvi4; 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=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726492AbgH3UoC (ORCPT + 99 others); Sun, 30 Aug 2020 16:44:02 -0400 Received: from hqnvemgate24.nvidia.com ([216.228.121.143]:10824 "EHLO hqnvemgate24.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726150AbgH3UoB (ORCPT ); Sun, 30 Aug 2020 16:44:01 -0400 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate24.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Sun, 30 Aug 2020 13:41:55 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Sun, 30 Aug 2020 13:44:00 -0700 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Sun, 30 Aug 2020 13:44:00 -0700 Received: from [10.2.61.194] (10.124.1.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Sun, 30 Aug 2020 20:44:00 +0000 Subject: Re: [PATCH v2 2/3] iov_iter: introduce iov_iter_pin_user_pages*() routines To: Al Viro CC: Andrew Morton , Christoph Hellwig , Ilya Dryomov , Jens Axboe , , , , , LKML References: <20200829080853.20337-1-jhubbard@nvidia.com> <20200829080853.20337-3-jhubbard@nvidia.com> <20200830201705.GV1236603@ZenIV.linux.org.uk> From: John Hubbard Message-ID: <86b4af1b-12c1-4e01-3663-e87eb551c25b@nvidia.com> Date: Sun, 30 Aug 2020 13:44:00 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <20200830201705.GV1236603@ZenIV.linux.org.uk> X-Originating-IP: [10.124.1.5] X-ClientProxiedBy: HQMAIL101.nvidia.com (172.20.187.10) To HQMAIL107.nvidia.com (172.20.187.13) Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1598820115; bh=VpXWPapMvQEi4/NaEs92wBWmsY7/i8I/51IItbed+yc=; h=X-PGP-Universal:Subject:To:CC:References:From:Message-ID:Date: User-Agent:MIME-Version:In-Reply-To:X-Originating-IP: X-ClientProxiedBy:Content-Type:Content-Language: Content-Transfer-Encoding; b=JoJTBvi4j3NiX8QlotO9XwFW+WadrSTY53plUvJlG458WCiiZ0d8cFbYb6GDFJ1HT FrB7mA6enVZ6v2s35eh8bY/SQyDzJF81f278lMCqjUsGtQdLMfOSkN+PmH8B9qI9Z4 rrxqZ5a9DmmBtGiuk7KlZ9GqeC3XjTjq+q+5JleCZNSUoEzhog+Z5Rkj17aAJ/D87p k/KdUIByXkFSGvyOKDYBERQ1ZjA5GAqgPJ18/KIiX6E6r2N83asmT/IbE4m0jQpxme 1/g0f/tFQOPzlckT49nG1NIz2wDHNJx6fKhLboWOud33LT+CFcd211t6wln4NGUkiG 94S9chEHiwPXQ== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/30/20 1:17 PM, Al Viro wrote: ... >> Why: In order to incrementally change Direct IO callers from calling >> get_user_pages_fast() and put_page(), over to calling >> pin_user_pages_fast() and unpin_user_page(), there need to be mid-level >> routines that specifically call one or the other systems, for both page >> acquisition and page release. > > Hmm... Do you plan to kill iov_iter_get_pages* off, eventually getting > rid of that use_pup argument? > Yes. That is definitely something I'm interested in doing, and in fact, I started to write words to that effect into the v1 cover letter. I lost confidence at the last minute, after poking around the remaining call sites (which are mostly network file systems, plus notably io_uring), and wondering if I really understood what the hell I was doing. :) So I decided to reduce the scope of the proposal, until I got some feedback. Which I now have! Looking at this again, I see that there are actually *very* few ITER_KVEC and ITER_BVEC callers, so...yes, maybe this can all be collapsed down to calling the new functions, which would always use pup, and lead to the simplification you asked about. Any advance warnings, advice, design thoughts are definitely welcome here. thanks, -- John Hubbard NVIDIA