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 5F654C433EF for ; Fri, 25 Feb 2022 12:05:29 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6F56B8D0002; Fri, 25 Feb 2022 07:05:28 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 6A4EF8D0001; Fri, 25 Feb 2022 07:05:28 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 56C488D0002; Fri, 25 Feb 2022 07:05:28 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.27]) by kanga.kvack.org (Postfix) with ESMTP id 449168D0001 for ; Fri, 25 Feb 2022 07:05:28 -0500 (EST) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay13.hostedemail.com (Postfix) with ESMTP id 07629618FB for ; Fri, 25 Feb 2022 12:05:28 +0000 (UTC) X-FDA: 79181172336.11.5AAF6BC Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by imf19.hostedemail.com (Postfix) with ESMTP id 799951A0010 for ; Fri, 25 Feb 2022 12:05:27 +0000 (UTC) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id EEFE81F383; Fri, 25 Feb 2022 12:05:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1645790725; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=eAnCOUNlpv0ysOvixU+XiM/OYFni8Zhhf05M8qRwWEU=; b=aaFFZkaYWOBT51HIQxzbdnm8VuoA/WoCDd8Qu/upqGIefFJk9jhikk4N9zV8xGTaJs8kHY +yjgEy/Dc0JWAceihZu1YNm+fmIjDGZHVoQY70rqxK1PfJLGC+UNKNObRBKJ/dHH7+pWB4 Z00YB9cQ7DbBbLg9/Jd+V8DNN3em3rQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1645790725; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=eAnCOUNlpv0ysOvixU+XiM/OYFni8Zhhf05M8qRwWEU=; b=fxvXNPiwyYmsV4yQ5iUWGJLOT+ZZNJBUXgh+gmwP7vMYMk++4m4Zvw5Y/FtcfTHXeQU9zG DNhuYgTV6kAhiHDQ== Received: from quack3.suse.cz (unknown [10.163.28.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 78DDAA3B84; Fri, 25 Feb 2022 12:05:25 +0000 (UTC) Received: by quack3.suse.cz (Postfix, from userid 1000) id 175A6A05D9; Fri, 25 Feb 2022 13:05:22 +0100 (CET) Date: Fri, 25 Feb 2022 13:05:22 +0100 From: Jan Kara To: John Hubbard Cc: Jens Axboe , Jan Kara , Christoph Hellwig , Dave Chinner , "Darrick J . Wong" , Theodore Ts'o , Alexander Viro , Miklos Szeredi , Andrew Morton , Chaitanya Kulkarni , linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-xfs@vger.kernel.org, linux-mm@kvack.org, LKML Subject: Re: [RFC PATCH 0/7] block, fs: convert Direct IO to FOLL_PIN Message-ID: <20220225120522.6qctxigvowpnehxl@quack3.lan> References: <20220225085025.3052894-1-jhubbard@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220225085025.3052894-1-jhubbard@nvidia.com> X-Stat-Signature: fz7z9bpkbtdf1tt15iby75yukcqwcpco X-Rspam-User: Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=aaFFZkaY; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=fxvXNPiw; spf=pass (imf19.hostedemail.com: domain of jack@suse.cz designates 195.135.220.29 as permitted sender) smtp.mailfrom=jack@suse.cz; dmarc=none X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 799951A0010 X-HE-Tag: 1645790727-347230 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 Fri 25-02-22 00:50:18, John Hubbard wrote: > Hi, > > Summary: > > This puts some prerequisites in place, including a CONFIG parameter, > making it possible to start converting and testing the Direct IO part of > each filesystem, from get_user_pages_fast(), to pin_user_pages_fast(). > > It will take "a few" kernel releases to get the whole thing done. > > Details: > > As part of fixing the "get_user_pages() + file-backed memory" problem > [1], and to support various COW-related fixes as well [2], we need to > convert the Direct IO code from get_user_pages_fast(), to > pin_user_pages_fast(). Because pin_user_pages*() calls require a > corresponding call to unpin_user_page(), the conversion is more > elaborate than just substitution. > > Further complicating the conversion, the block/bio layers get their > Direct IO pages via iov_iter_get_pages() and iov_iter_get_pages_alloc(), > each of which has a large number of callers. All of those callers need > to be audited and changed so that they call unpin_user_page(), rather > than put_page(). > > After quite some time exploring and consulting with people as well, it > is clear that this cannot be done in just one patchset. That's because, > not only is this large and time-consuming (for example, Chaitanya > Kulkarni's first reaction, after looking into the details, was, "convert > the remaining filesystems to use iomap, *then* convert to FOLL_PIN..."), > but it is also spread across many filesystems. With having modified fs/direct-io.c and fs/iomap/direct-io.c which filesystems do you know are missing conversion? Or is it that you just want to make sure with audit everything is fine? The only fs I could find unconverted by your changes is ceph. Am I missing something? Honza -- Jan Kara SUSE Labs, CR