Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp90591pxm; Fri, 25 Feb 2022 04:37:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJzBDL4UZtG82+hURSXV+fwX2ZuK4y0F/CJjYJMdvVQGNaciu2OTWkb2llk1yTvYcArND/59 X-Received: by 2002:a17:902:a60d:b0:14f:b781:ccd7 with SMTP id u13-20020a170902a60d00b0014fb781ccd7mr7585368plq.2.1645792679431; Fri, 25 Feb 2022 04:37:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645792679; cv=none; d=google.com; s=arc-20160816; b=I+Zu8sitAqQYDZk6Qfx6WroYlZFtMYTmv5UAILKJr2KNiRCSsS7jQN3etJCUPCECS/ 1TulK9B9AKKjmf06ktrhBcDWMNTLn6ikHcC2Loer9phd+PtyckNUKAS+l3o+DFxmlPeO V41FMGs5NzI9PK/usiigG4rYU0UO3BBZiCufKXG5iDLpTcznVwSSGy3WRCmiknQlPh4L ZFDKr324jJB72kDTfpMA7fQAFO+MclmGtsuVeLiokPEnCAG+au1xZLtumB93WOUQZ4v+ bV+9wwWzuU46IL4S2twqgHQW5cTRj+eaAjkP2cf8VEGE/a5ns3VXRyPXBTVXWrow3PVG A9fA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=eAnCOUNlpv0ysOvixU+XiM/OYFni8Zhhf05M8qRwWEU=; b=TfVIeHVgljDTgDWFJoufG8f51hGljLrnv5qUc3iwtOaH9I7sHJSMUlvzE/Yzg/aZLA JPnSsUDdMn11tl6HaE3/QLZwzlq2aNjpKbMv0QWvk7KyTiDfvlqDTM7F1jxBaBG/GQXw 76q82fxviv9ibYFgRSn9JHl5zLNnPkmCRln60hBCMj6/WNl8H+OynXpteE2baaKhlae4 b6cvPODSg5SM2JbZ8kqgXN5o6TtYFBx4+p6ycLhG80okrTSGsj1yLFlkdaFwu6Vib3Ec z5xPuBXKaKWxL/cYTw9vfRcqyNLdX1k9lf2pkjUMft2rt4cIsQ+aJSxxKwUD8Y6PouLo nKKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=aaFFZkaY; dkim=neutral (no key) header.i=@suse.cz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s20-20020a627714000000b004cc37872bb0si1563016pfc.248.2022.02.25.04.37.44; Fri, 25 Feb 2022 04:37:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-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=@suse.cz header.s=susede2_rsa header.b=aaFFZkaY; dkim=neutral (no key) header.i=@suse.cz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239369AbiBYMGA (ORCPT + 99 others); Fri, 25 Feb 2022 07:06:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54682 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229531AbiBYMF6 (ORCPT ); Fri, 25 Feb 2022 07:05:58 -0500 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5280575219; Fri, 25 Feb 2022 04:05:27 -0800 (PST) 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-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,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-kernel@vger.kernel.org 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