From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8A784ECAAD1 for ; Sun, 28 Aug 2022 00:39:20 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C11C3940007; Sat, 27 Aug 2022 20:39:19 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BC0CF6B0074; Sat, 27 Aug 2022 20:39:19 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A8897940007; Sat, 27 Aug 2022 20:39:19 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 987166B0073 for ; Sat, 27 Aug 2022 20:39:19 -0400 (EDT) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 79E611409B2 for ; Sun, 28 Aug 2022 00:39:19 +0000 (UTC) X-FDA: 79847142438.17.24CEDB4 Received: from zeniv.linux.org.uk (zeniv.linux.org.uk [62.89.141.173]) by imf07.hostedemail.com (Postfix) with ESMTP id 0A6524002C for ; Sun, 28 Aug 2022 00:39:17 +0000 (UTC) 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> ARC-Authentication-Results: i=1; imf07.hostedemail.com; dkim=pass header.d=linux.org.uk header.s=zeniv-20220401 header.b=ru9svlqk; spf=none (imf07.hostedemail.com: domain of viro@ftp.linux.org.uk has no SPF policy when checking 62.89.141.173) smtp.mailfrom=viro@ftp.linux.org.uk; dmarc=pass (policy=none) header.from=zeniv.linux.org.uk ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1661647158; a=rsa-sha256; cv=none; b=B8KGr+OjZvqodG21k1w8dZyt0G1tS3mFJVfS3wqjyXX5j1nA8yBOvZ2glamMgNGn01xFNc W4hyDEkQ09iwJ4MyKELEFHUqfqpI2zT4HutSac4VP4NnP/rflClW5EbCdMcT+1BiZlf7uL Wb5lM+TLFhv1sgZjRkAf5nDk7JjJqM0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1661647158; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=fWJjSzITkBG3hjEOwPDs6x02IB74YxIK99jfuPfRgtE=; b=G7sYPP4zGNYUsaQ6YMsL9AjPEjSUTt2gdOVRKoS3Ts/bRB3d8ieWCegGEs15CN8bKe2F/5 HZCbOSvzcYgHmKMo+cJOPxA5zw5MMvqY+XbJHgLmAhn8Y5GS+QQvKGMy/+2mdMyDlRBKeD AyA3SjxRSNfI3y+s6yF+vJdetDvv508= X-Rspam-User: Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=linux.org.uk header.s=zeniv-20220401 header.b=ru9svlqk; spf=none (imf07.hostedemail.com: domain of viro@ftp.linux.org.uk has no SPF policy when checking 62.89.141.173) smtp.mailfrom=viro@ftp.linux.org.uk; dmarc=pass (policy=none) header.from=zeniv.linux.org.uk X-Rspamd-Server: rspam07 X-Stat-Signature: 8853fcqq3ftrcsk14pygpds8z4eydxfg X-Rspamd-Queue-Id: 0A6524002C X-HE-Tag: 1661647157-11196 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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...