Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp1793771rwe; Sat, 27 Aug 2022 17:43:13 -0700 (PDT) X-Google-Smtp-Source: AA6agR4Khmj/IxAted29DNDGjL8gZVFP9Je+UvhXMyODp4vUQpCxHo34ucCcrjfThzxsKdDHEw27 X-Received: by 2002:a05:6402:3711:b0:445:e264:beed with SMTP id ek17-20020a056402371100b00445e264beedmr11725475edb.136.1661647393359; Sat, 27 Aug 2022 17:43:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661647393; cv=none; d=google.com; s=arc-20160816; b=gO3taFHLsRgz6ZRgfTemM2laZs2zruWzC4XMQodcEghK6kEk5P9hHUqejZuv9MPGNm oDaWOz0LfQEQuyyO7XWcYj9+sAW9yNSaZPyItR8K4ykG0A+633jf0OJ1Z9LDszigwZbJ d/JAsT0YNtkE3GmFF8rG6jfDj9XnNkdSb6YY/5IurtTm76EI74Pdb5u0uTmLAomne32y cR3e4Jexuae8GBvAFsOz2uugkw3KkssWhWrLBwfht64UcCnXgYoJmD8S1iLiplJkNRU8 sLsqICqPPr2Gsespsj2gEnHgpQgkaYqMAs7OvvU7DkFjMh/Apuhaf26QUM9Ob9acWQof 9vxA== 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=fWJjSzITkBG3hjEOwPDs6x02IB74YxIK99jfuPfRgtE=; b=s0HBIplOUA2NG1XrLqg0F/ggDqHoQQPmrzHCSbEfEH3F94A5Lik8SYrvEdNAJRQPP6 XZAS1EVfOC5kd2TouAEoB4nWJmRmcUAWL+4I2rIaM2ZCg5POW1cEd7uhcTJMsE8BpdU/ wjU20Aku4l+8h2lEA5M4CHaPGzWKW2qMA/kPg0aHHy4ohqIOWvnpr82xMvuuESB8u9eA 2NfHWpbq6OCPJj+hqG6jDYNawDs9Zo36hHQjpEvgv2hyxivMZBn5LN6Y8ueE+McgLeuC KPOhsKtv9o9a/830cGWWt3yI/uDXBCFJn3qPVOgKCb1T5GqD/3YyB2jmMqx1mj1Tab+w DKRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.org.uk header.s=zeniv-20220401 header.b=ru9svlqk; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zeniv.linux.org.uk Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jr22-20020a170906a99600b00710487d3a4fsi3516584ejb.67.2022.08.27.17.42.46; Sat, 27 Aug 2022 17:43:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.org.uk header.s=zeniv-20220401 header.b=ru9svlqk; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zeniv.linux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230462AbiH1AjR (ORCPT + 99 others); Sat, 27 Aug 2022 20:39:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46224 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230421AbiH1AjQ (ORCPT ); Sat, 27 Aug 2022 20:39:16 -0400 Received: from zeniv.linux.org.uk (zeniv.linux.org.uk [IPv6:2a03:a000:7:0:5054:ff:fe1c:15ff]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 083F53DF35; Sat, 27 Aug 2022 17:39:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=linux.org.uk; s=zeniv-20220401; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=fWJjSzITkBG3hjEOwPDs6x02IB74YxIK99jfuPfRgtE=; b=ru9svlqk7oodiK4rpSP9SpxxO5 +mWWuOTBieeTjM+ZqkmhYVaiEfMZjbKOtmbD1AY6Uv1d+Xzt4wncGjqEECuJigrzUE5p0VS0YnUwf /SyRLlOsEMG+vcd9jDUjktE9ILyGqQDY5mjK+KlKMv8zmi60TtedCdQernDRe4dJFUOzScyacEkEp 7hCk8/3RaHut5zlN7ZGk7MuByZ/UbzflwUeX2VW/EL+z/aMg+ZHwnvpLx6bh3qpYkOVdmuJS5T4/j wGiVqG+cnyHVsazHx0Vvy6x8tgo7afDfbKDBjZ6G/mj5AoFr62XM4JuQue10O2DTMvcGEeI/PIibf 4yZi1hJg==; Received: from viro by zeniv.linux.org.uk with local (Exim 4.95 #2 (Red Hat Linux)) id 1oS6KH-0099dP-0G; Sun, 28 Aug 2022 00:38:57 +0000 Date: Sun, 28 Aug 2022 01:38:56 +0100 From: Al Viro To: John Hubbard Cc: Andrew Morton , Jens Axboe , Miklos Szeredi , Christoph Hellwig , "Darrick J . Wong" , Trond Myklebust , Anna Schumaker , Jan Kara , Logan Gunthorpe , linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-xfs@vger.kernel.org, linux-nfs@vger.kernel.org, linux-mm@kvack.org, LKML Subject: Re: [PATCH 5/6] NFS: direct-io: convert to FOLL_PIN pages Message-ID: References: <20220827083607.2345453-1-jhubbard@nvidia.com> <20220827083607.2345453-6-jhubbard@nvidia.com> <353f18ac-0792-2cb7-6675-868d0bd41d3d@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <353f18ac-0792-2cb7-6675-868d0bd41d3d@nvidia.com> Sender: Al Viro X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Sat, Aug 27, 2022 at 04:55:18PM -0700, John Hubbard wrote: > On 8/27/22 15:48, Al Viro wrote: > > On Sat, Aug 27, 2022 at 01:36:06AM -0700, John Hubbard wrote: > >> Convert the NFS Direct IO layer to use pin_user_pages_fast() and > >> unpin_user_page(), instead of get_user_pages_fast() and put_page(). > > > > Again, this stuff can be hit with ITER_BVEC iterators > > > >> - result = iov_iter_get_pages_alloc2(iter, &pagevec, > >> + result = dio_w_iov_iter_pin_pages_alloc(iter, &pagevec, > >> rsize, &pgbase); > > > > and this will break on those. > > If anyone has an example handy, of a user space program that leads > to this situation (O_DIRECT with ITER_BVEC), it would really help > me reach enlightenment a lot quicker in this area. :) Er... splice(2) to O_DIRECT-opened file on e.g. ext4? Or sendfile(2) to the same, for that matter...