Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2582226pxa; Mon, 24 Aug 2020 19:29:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwJV6PZb/QEDTSzzi81D+j3gTWKmjcwvA2tnyx5jaidb3tVyVpB2NAtQwlIufWK6njJLgGC X-Received: by 2002:a50:fa94:: with SMTP id w20mr8451029edr.82.1598322577257; Mon, 24 Aug 2020 19:29:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598322577; cv=none; d=google.com; s=arc-20160816; b=t01iUWdgw3XsD9U6wISZ9cTVvWONZ8Tfn1fP7VWKEWINluNEt+sVGridylJ1G5/eAZ lYBNkumKEyntVQHlduH6tuSq+QuhLXH1MxRjB3jLSbiGa6bfqxZjHHy7jDrnCLUxLPOS N4pQ1xaw1CcehzbDAr6Nl+3ArmcXGlCxWiCQ3tz8I/umrHczpd9sPuoldcmB9lusGljZ HiVIoO2DH9k+1bE2H9jaufKJqzQb29iprg0vEznbBfNK+fiohZ7Xqfcp+2xMZF/jw3gt 2hygBvuKjqTFilo+V/swUUcNMN5Y0f4wIINSceHFlWfZAik6RQaRvf6WoA79/iOgBiRy LHQw== 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=pXMapS4KmKmBUkx1+DJBiB0+8TtxpALADIKIHQCPLGo=; b=gHxqmrv04CzCwxt0vSUTpGTNIS13ZyX4Zcd7jdgMB2kBMJRWQkcFUD7Rh1zkl0qhC/ L/y8xywDCDhkiONVEXi0scN0dO1BBOtUGvkVLzg5u11FRTEK4NvHXipQLyAYY+F1uad3 N1jiRfU7yaVOf3PbNLdBf1LCW4cKVNbahbfUzFbvFMgJLxyxZot1wbHK0HV8xAB0UK7d /xH/VynkrtK22dpKaCpz2NgGymymoLU6WMJ91tUmy3TSew6+R6yXwXwbKe4PvlDhQcl7 O9vKm9YbFiQdglI7ZnPosvBi7n73Z77jKuhQ9mvchZ8B96N6omjMQWS7oKpRycze76aH F60g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=VQyjqIlA; 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 h24si8371551ejt.451.2020.08.24.19.29.13; Mon, 24 Aug 2020 19:29:37 -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=VQyjqIlA; 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 S1727939AbgHYC1r (ORCPT + 99 others); Mon, 24 Aug 2020 22:27:47 -0400 Received: from hqnvemgate25.nvidia.com ([216.228.121.64]:2593 "EHLO hqnvemgate25.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725947AbgHYC1r (ORCPT ); Mon, 24 Aug 2020 22:27:47 -0400 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate25.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Mon, 24 Aug 2020 19:26:44 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Mon, 24 Aug 2020 19:27:46 -0700 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Mon, 24 Aug 2020 19:27:46 -0700 Received: from [10.2.53.36] (10.124.1.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Tue, 25 Aug 2020 02:27:46 +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> <3072d5a0-43c7-3396-c57f-6af83621b71c@nvidia.com> <20200825022219.GW1236603@ZenIV.linux.org.uk> From: John Hubbard Message-ID: <69d09a5f-27f2-dd50-d25e-926302b10443@nvidia.com> Date: Mon, 24 Aug 2020 19:27:45 -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: <20200825022219.GW1236603@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: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1598322404; bh=pXMapS4KmKmBUkx1+DJBiB0+8TtxpALADIKIHQCPLGo=; 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=VQyjqIlA9sgJzaRLlsQtP5G3AjYtNzNUJXvj8TyYk3QW4xnkdhInsxCNj8+gWYE1F +RBCIm/1AD1/fv1clhKhZK8OIpQo1BRrFp4+EtIXh4DHTJznQAPWAXu48vtPoWEyhQ tT5LufttrAQqIiuGRpADDRDQF0ukmJF+HNOj/dCaHFTzWNSqGreGOSuJy9clE/7SFf AETqPKFmRRH8ZZz8sxDb3OwSsLb8POODZc9QipjnotHccNQpKJGWRNeSsbhGvfmoQ7 VtxGWvrTbNWWYDuJeOgnpxEbCOLnuidat3tmFOx03t4JjcLO3DCxeSL9JegWsDs4Qm HuUEoMSI4rRjg== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/24/20 7:22 PM, Al Viro wrote: > On Mon, Aug 24, 2020 at 07:07:02PM -0700, John Hubbard wrote: >> On 8/24/20 6:54 PM, 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? >>> >> >> Oh! I'll take a look. Is this the fs/splice.c stuff? I ruled this out e= arly >> mainly based on Christoph's comment in [1] ("ITER_PIPE is rejected =D1= =96n the >> direct I/O path"), but if it's supportable then I'll hook it up. >=20 > ; cat >a.c <<'EOF' > #define _GNU_SOURCE > #include > #include > #include >=20 > int main() > { > int fd =3D open("./a.out", O_DIRECT); > splice(fd, NULL, 1, NULL, 4096, 0); > return 0; > } > EOF > ; cc a.c > ; ./a.out | wc -c > 4096 >=20 > and you just had ->read_iter() called with ITER_PIPE destination. >=20 That example saves me a lot of time! Much appreciated. thanks, --=20 John Hubbard NVIDIA