Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2576811pxa; Mon, 24 Aug 2020 19:15:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw1BchamjeP8ANERFgRDeUiVD25fC5PCxjXJ0g3lQot2H1FjpINsRrqYr7zVOkYgr9TgzOi X-Received: by 2002:a17:906:4ac6:: with SMTP id u6mr3874023ejt.539.1598321723275; Mon, 24 Aug 2020 19:15:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598321723; cv=none; d=google.com; s=arc-20160816; b=hKMvI+bcNOwKtBuSimrUuZaHmdsxpN0kK5EvbbGK+JdOowl7J9lPZ0jR80JwMxk80n tswQd65lbOP4Vp9kC4LubZkCBtVlr81vLRXjgHhgY2Fde3dKMQX6O7h7/3TnnJzFuPC+ pLBdegnxp83F26GxdH50NAolr5svJJVMcTH1M0rzklyz+18Todcdya7D6ziOt/LXu1e8 X32GrYpmkBSkYXIaKQJJXoub6KGUSw8xszFpHZUWsG8aAGjmIXWBlym2JEJAWuF1PUfZ tkjl8GOsUZOJpQW4bR2p2VEHO7TlZUawRWaKPVGd25rmiAS0fBOy1/uVhSjM0OIqT7rc DNqQ== 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=GIRbiEa7azLOIxon4iO5FS/T0uGJkiVpYwweEhJNBpo=; b=X1e+yj+VJATsa1dxKzm6/kUYg5TLib3KDS6MKx0x0uF6AbyUNGlpE4Kg8hKCw00mJL XVLr67toNuguLNEpKgeqUIsFgbf7bhbkisM2SOlGQjjCWq2nrpESR9FclUspcm3ciQL1 0qS47pqFk8wdwltbpcCWaAkgyu34qxN8r4GObfkjJbqGIlLhS8TgOxqKb5aHTE+zB5vT TcYZ23laGbwN62GbHKEyrd1A9unPjxft7m8B2fFWuZ4VajUV4P8YN98+XqsWX/Kzv5Gq eD1AltVFIhSN9j7N8w7VViVV5S3oGKknd+hvRXfkfMhh5SwY2wfUTKpleVPA0Pp/0Z7U zLrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=UmGWTkcr; 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 o5si5699442ejd.439.2020.08.24.19.15.00; Mon, 24 Aug 2020 19:15:23 -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=UmGWTkcr; 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 S1727973AbgHYCN3 (ORCPT + 99 others); Mon, 24 Aug 2020 22:13:29 -0400 Received: from hqnvemgate24.nvidia.com ([216.228.121.143]:8803 "EHLO hqnvemgate24.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725850AbgHYCN3 (ORCPT ); Mon, 24 Aug 2020 22:13:29 -0400 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate24.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Mon, 24 Aug 2020 19:11:29 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Mon, 24 Aug 2020 19:13:28 -0700 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Mon, 24 Aug 2020 19:13:28 -0700 Received: from [10.2.53.36] (172.20.13.39) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Tue, 25 Aug 2020 02:13:28 +0000 Subject: Re: [PATCH 0/5] bio: Direct IO: convert to pin_user_pages_fast() To: Al Viro CC: Andrew Morton , Christoph Hellwig , Ilya Dryomov , Jens Axboe , Jeff Layton , , , , , , LKML References: <20200822042059.1805541-1-jhubbard@nvidia.com> <20200825015428.GU1236603@ZenIV.linux.org.uk> <20200825020700.GV1236603@ZenIV.linux.org.uk> From: John Hubbard Message-ID: <26bf92af-a7ab-b53f-45dd-9e3d7a1340ec@nvidia.com> Date: Mon, 24 Aug 2020 19:13:27 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: <20200825020700.GV1236603@ZenIV.linux.org.uk> X-Originating-IP: [172.20.13.39] X-ClientProxiedBy: HQMAIL107.nvidia.com (172.20.187.13) 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=1598321489; bh=GIRbiEa7azLOIxon4iO5FS/T0uGJkiVpYwweEhJNBpo=; 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=UmGWTkcrZ9y1HwcrElFPjcGx3VjBPiGha3uyULxM2OY1I/bwLKzfacmPOQxQ9GyZK HaJxO8iWVCSV2SjHo2+oV6rNZVVtuNWVw3a/vVVyVbIVd8RMrpp+UP3P0Qbcvs7Hml dV1gOlzPwkqYsdvsO7kr1skfGk6S+1fTD2GPIOmac0RirS4lQih9RBp5lKrfB9SntS 5OPL4gnMZFbN6Ed6wHZJHy3HjGvuuzSoREEObkE/ig7JZyF0FotPHyFHVAx1B88Jo5 NSgr+DaOPpw0gqM8+krNIZpyhHdQJ6bP6DwweQCl+lwB3zfKhGjKRQYKeWO2jKZ41E RM8alNM34Jb2g== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/24/20 7:07 PM, Al Viro wrote: > On Tue, Aug 25, 2020 at 02:54:28AM +0100, Al Viro wrote: >> On Fri, Aug 21, 2020 at 09:20:54PM -0700, John Hubbard wrote: >> >>> Direct IO behavior: >>> >>> ITER_IOVEC: >>> pin_user_pages_fast(); >>> break; >>> >>> ITER_KVEC: // already elevated page refcount, leave alone >>> ITER_BVEC: // already elevated page refcount, leave alone >>> ITER_PIPE: // just, no :) >> >> Why? What's wrong with splice to O_DIRECT file? > > Sorry - s/to/from/, obviously. > > To spell it out: consider generic_file_splice_read() behaviour when > the source had been opened with O_DIRECT; you will get a call of > ->read_iter() into ITER_PIPE destination. And it bloody well > will hit iov_iter_get_pages() on common filesystems, to pick the > pages we want to read into. > > So... what's wrong with having that "pin" primitive making sure > the pages are there and referenced by the pipe? > (our emails crossed) OK, yes, let me hook that up. I was just unaware of that flow, I'll go off and figure it out. Thanks for looking at this! thanks, -- John Hubbard NVIDIA