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 X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6C9E3C432C3 for ; Wed, 20 Jan 2021 17:36:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 39225221FE for ; Wed, 20 Jan 2021 17:36:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731651AbhATRer (ORCPT ); Wed, 20 Jan 2021 12:34:47 -0500 Received: from mx2.suse.de ([195.135.220.15]:36582 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727758AbhATR2B (ORCPT ); Wed, 20 Jan 2021 12:28:01 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 031EDAC9B; Wed, 20 Jan 2021 17:27:06 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id AE9351E0802; Wed, 20 Jan 2021 18:27:05 +0100 (CET) Date: Wed, 20 Jan 2021 18:27:05 +0100 From: Jan Kara To: Christoph Hellwig Cc: Jan Kara , linux-fsdevel@vger.kernel.org, Matthew Wilcox , linux-ext4@vger.kernel.org Subject: Re: [PATCH 2/3] mm: Provide address_space operation for filling pages for read Message-ID: <20210120172705.GC24063@quack2.suse.cz> References: <20210120160611.26853-1-jack@suse.cz> <20210120160611.26853-3-jack@suse.cz> <20210120162001.GB3790454@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210120162001.GB3790454@infradead.org> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Wed 20-01-21 16:20:01, Christoph Hellwig wrote: > On Wed, Jan 20, 2021 at 05:06:10PM +0100, Jan Kara wrote: > > Provide an address_space operation for filling pages needed for read > > into page cache. Filesystems can use this operation to seriealize > > page cache filling with e.g. hole punching properly. > > Besides the impending rewrite of the area - having another indirection > here is just horrible for performance. If we want locking in this area > it should be in core code and common for multiple file systems. This would mean pulling i_mmap_sem out from ext4/XFS/F2FS private inode into the VFS inode. Which is fine by me but it would grow struct inode for proc / tmpfs / btrfs (although for btrfs I'm not convinced it isn't actually prone to the race and doesn't need similar protection as xfs / ext4) so some people may object. Honza -- Jan Kara SUSE Labs, CR