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 CBBCEECAAD1 for ; Sun, 28 Aug 2022 00:40:02 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 66C506B0073; Sat, 27 Aug 2022 20:40:02 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 61C36940008; Sat, 27 Aug 2022 20:40:02 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4E48F940007; Sat, 27 Aug 2022 20:40:02 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 3FB3B6B0073 for ; Sat, 27 Aug 2022 20:40:02 -0400 (EDT) Received: from smtpin18.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 0E2ABC0B92 for ; Sun, 28 Aug 2022 00:40:02 +0000 (UTC) X-FDA: 79847144244.18.07899FE Received: from zeniv.linux.org.uk (zeniv.linux.org.uk [62.89.141.173]) by imf11.hostedemail.com (Postfix) with ESMTP id C6DA540025 for ; Sun, 28 Aug 2022 00:40:01 +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=rIZZNVcFN0ZRY9l2Dgc0yVt30h1Tlu/m5EPOba3vQG8=; b=dvaYvOCkWl882qx36QSassIMyy nMq1qz/v1H7/8vj2IhOCsQb5abzXy15QDRVnsRwG2OqqzcVYCFFJXWyT/SRo/kTkzl6F7c8w2I310 /8LE5kQ8uAVy974flLhFmALRL8LSqoszn9JuUGG2fNlYsKvNy71zbMjXcyFT6f6dNh5b8TdLdZP5Q znEDbd0QcFWNAesSvjwKI/8a/m22zGetswvzHLE8cZYNzZznR1Voq64rgbEtJOXr8rPgjO1qCp8O0 6Tuvx99bXySd81P5zrF72cWjHeMRerqYl0nMFLZ9BCA/aD1EWCyUyxFTqDvrL1bGIP/mFbREuvHoR AEY24Wwg==; Received: from viro by zeniv.linux.org.uk with local (Exim 4.95 #2 (Red Hat Linux)) id 1oS6L8-0099el-M9; Sun, 28 Aug 2022 00:39:50 +0000 Date: Sun, 28 Aug 2022 01:39:50 +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: ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1661647201; a=rsa-sha256; cv=none; b=NCX1ZMol5QlX6EX5WmSL4jgv+AArgfWbGNIqg3F5QgYAru4fkG18hNDfauy0S0WvaEijWn CWDV5uK/B/lZYIFFwHuDDf1a2VjanC5wuoVJNp3RDprEqkSvMNhtQyFWUt2lUSDNO3K54I qETNAHFrckFZCtgyRzCAQtXAGqGmdls= ARC-Authentication-Results: i=1; imf11.hostedemail.com; dkim=pass header.d=linux.org.uk header.s=zeniv-20220401 header.b=dvaYvOCk; spf=none (imf11.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-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1661647201; 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=rIZZNVcFN0ZRY9l2Dgc0yVt30h1Tlu/m5EPOba3vQG8=; b=B1izWdlfWhnjQRM6RDCyHBZVM1oYY2iL8ng0R7cJyI2UABLHqVMfT6i3HBowcft0rCXa7a skFizwwtIm9PYqbz544qR8hs1q7x03ZJmNZr2t5DzGxlgBNuRlPnCTG6Ef28T577U3LqjK l4q/eAMgMlRYWprLPvuERMu2dq21dR4= X-Stat-Signature: iwdxkuzuc8cabk6ju4fteubzic9ptqey X-Rspamd-Queue-Id: C6DA540025 X-Rspam-User: X-Rspamd-Server: rspam06 Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=linux.org.uk header.s=zeniv-20220401 header.b=dvaYvOCk; spf=none (imf11.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-HE-Tag: 1661647201-533731 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 Sun, Aug 28, 2022 at 01:38:57AM +0100, Al Viro wrote: > 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... s/ext4/nfs/ to hit this particular codepath, obviously.