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 6B952C3DA4A for ; Mon, 19 Aug 2024 07:37:57 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B2BDC6B007B; Mon, 19 Aug 2024 03:37:56 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id ADA5B6B0082; Mon, 19 Aug 2024 03:37:56 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9AB836B0083; Mon, 19 Aug 2024 03:37:56 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 7B12A6B007B for ; Mon, 19 Aug 2024 03:37:56 -0400 (EDT) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id D78B58101E for ; Mon, 19 Aug 2024 07:37:55 +0000 (UTC) X-FDA: 82468190910.08.4251E3F Received: from mout-p-202.mailbox.org (mout-p-202.mailbox.org [80.241.56.172]) by imf17.hostedemail.com (Postfix) with ESMTP id C39EF40003 for ; Mon, 19 Aug 2024 07:37:53 +0000 (UTC) Authentication-Results: imf17.hostedemail.com; dkim=pass header.d=pankajraghav.com header.s=MBO0001 header.b=Kiv6Zvc3; spf=pass (imf17.hostedemail.com: domain of kernel@pankajraghav.com designates 80.241.56.172 as permitted sender) smtp.mailfrom=kernel@pankajraghav.com; dmarc=pass (policy=quarantine) header.from=pankajraghav.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1724053013; h=from:from: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:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=jJkwHXhW1pyUg2A3OtTuCVYWWX/pQvICQgZce5b09dI=; b=NKM7uJPXVabgyXFcGoUfgwxB9NlBeGhSaVmr1eDe/VSx1YgYsM35Rz2yjw4Y0ibMIqRpkw GZwjgr/OKun06h+wce2WfDyYdHVrNNLCDg/9dldTG7aIjYb7/rckes25F8TFEx7EhJ0tgR rckPF6Q/6zdjk3KAmLUerzWobZZCOnw= ARC-Authentication-Results: i=1; imf17.hostedemail.com; dkim=pass header.d=pankajraghav.com header.s=MBO0001 header.b=Kiv6Zvc3; spf=pass (imf17.hostedemail.com: domain of kernel@pankajraghav.com designates 80.241.56.172 as permitted sender) smtp.mailfrom=kernel@pankajraghav.com; dmarc=pass (policy=quarantine) header.from=pankajraghav.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1724053013; a=rsa-sha256; cv=none; b=hHvev2f9n8iVzgsGmZRlCOmvqaS3rC6Ir6AkbmUWl0qKNyzy7Asra5osQEaygh74CmN+Yt WttlHOtFL/j7Sv9jcNd5rURfmGdlxLa1JVQO3kisu18cNCXerRJ+7eq7PYVpvw/SS73RA5 rUj1YgvhLnOi0UAeM8gJ7uRH6CEEiUc= Received: from smtp202.mailbox.org (smtp202.mailbox.org [IPv6:2001:67c:2050:b231:465::202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4WnPZh6dx0z9sS4; Mon, 19 Aug 2024 09:37:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pankajraghav.com; s=MBO0001; t=1724053069; h=from:from: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:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jJkwHXhW1pyUg2A3OtTuCVYWWX/pQvICQgZce5b09dI=; b=Kiv6Zvc3GH4pHILeeyyIsuen6YNQt8fsJ6DlA2KW8qCldQSZ/Oml6KOpFQbYYIbxWxFksm duoxHAULNvQYGSb2SCwhpjvnXUdjuNdrfjqkWX9KGnAv3xPe0soOlgGTzTtywObrk5YMBV en1XXx1fAiod/oTLbBUGbBxBYQf+ZAxWszA25fY7YWlIkStgdhI/TjlY1hjPLGfT5NYde8 JcYjjA/127+QoklIaTOnlZc5YkwtYDmH+hcx+dDmJzjtdB1kTcNpBu3d5Ek/LwOSSCipgp +N6jPZ1cc5030AVDWsZW9jrElTzk3FzsYTHYC19Rv8+8of/tpNoVQj7p8/JqjQ== Date: Mon, 19 Aug 2024 07:37:42 +0000 From: "Pankaj Raghav (Samsung)" To: Hannes Reinecke Cc: David Howells , brauner@kernel.org, akpm@linux-foundation.org, chandan.babu@oracle.com, linux-fsdevel@vger.kernel.org, djwong@kernel.org, gost.dev@samsung.com, linux-xfs@vger.kernel.org, hch@lst.de, david@fromorbit.com, Zi Yan , yang@os.amperecomputing.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, willy@infradead.org, john.g.garry@oracle.com, cl@os.amperecomputing.com, p.raghav@samsung.com, mcgrof@kernel.org, ryan.roberts@arm.com Subject: Re: [PATCH v12 00/10] enable bs > ps in XFS Message-ID: <20240819073742.uwrx6ldk6j3wde5j@quentin> References: <20240818165124.7jrop5sgtv5pjd3g@quentin> <20240815090849.972355-1-kernel@pankajraghav.com> <2924797.1723836663@warthog.procyon.org.uk> <3141777.1724012176@warthog.procyon.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Stat-Signature: souug83xhmwu3u3zcogdmgat5geci4dj X-Rspam-User: X-Rspamd-Queue-Id: C39EF40003 X-Rspamd-Server: rspam02 X-HE-Tag: 1724053073-273331 X-HE-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3gp6Rql/xrTf5JTxucgMg2bwW7m8a+eAfGan/isvZfKeVewrMLhZWwSENNR7+CQ2UdM/u1RVqSOA8N5xf945bFR+ATvonwnwQ1WBiuXePVH9zN4uSTXlcYcf8tz1KJ10uqJgvrKl4FUZ+nxacSA8sLKIrgDi43S5K1LQIb2VXyiyASzlqXVqlWEDXbbhQzLf/BbWutf+nuqZsZX7XzKRoxSR1ToNGTlUJ779hEHSNaoCYXc2WxWF3Qsob9lZSqM+R3MxlQafsZQ= 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: List-Subscribe: List-Unsubscribe: On Mon, Aug 19, 2024 at 09:24:11AM +0200, Hannes Reinecke wrote: > On 8/18/24 22:16, David Howells wrote: > > Pankaj Raghav (Samsung) wrote: > > > > > I am no expert in network filesystems but are you sure there are no > > > PAGE_SIZE assumption when manipulating folios from the page cache in > > > AFS? > > > > Note that I've removed the knowledge of the pagecache from 9p, afs and cifs to > > netfslib and intend to do the same to ceph. The client filesystems just > > provide read and write ops to netfslib and netfslib uses those to do ordinary > > buffered I/O, unbuffered I/O (selectable by mount option on some filesystems) > > and DIO. > > > > That said, I'm not sure that I haven't made some PAGE_SIZE assumptions. I > > don't *think* I have since netfslib is fully multipage folio capable, but I > > can't guarantee it. > > > I guess you did: > > static int afs_fill_super(struct super_block *sb, struct afs_fs_context > *ctx) > { > struct afs_super_info *as = AFS_FS_S(sb); > struct inode *inode = NULL; > int ret; > > _enter(""); > > /* fill in the superblock */ > sb->s_blocksize = PAGE_SIZE; > sb->s_blocksize_bits = PAGE_SHIFT; > sb->s_maxbytes = MAX_LFS_FILESIZE; > sb->s_magic = AFS_FS_MAGIC; > sb->s_op = &afs_super_ops; > > IE you essentially nail AFS to use PAGE_SIZE. > Not sure how you would tell AFS to use a different block size; > maybe a mount option? I saw this as well, but I didn't see this variable being used anywhere. Probably this has no meaning in a network-based FSs? > And there are several other places which will need to be modified; > eg afs_mntpt_set_params() is trying to read from a page which > won't fly with large blocks (converted to read_full_folio()?), > and, of course, the infamous AFS_DIR_BLOCKS_PER_PAGE which will > overflow for large blocks. But the min folio order is set only for AFS_FTYPE_FILE and not for AFS_FTYPE_DIR. > > So some work is required, but everything looks doable. > Maybe I can find some time until LPC. > > > Mostly this was just a note to you that there might be an issue with your code > > - but I haven't investigated it yet and it could well be in my code. > > > Hmm. I'd rather fix the obvious places in afs first; just do a quick > grep for 'PAGE_', that'll give you a good impression of places to look at. > Agree. > Cheers, > > Hannes > -- > Dr. Hannes Reinecke Kernel Storage Architect > hare@suse.de +49 911 74053 688 > SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg > HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich >