All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jaegeuk Kim via Linux-f2fs-devel <linux-f2fs-devel@lists.sourceforge.net>
To: Matthew Wilcox <willy@infradead.org>
Cc: linux-fsdevel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH 0/4] f2fs: Remove uses of writepage
Date: Thu, 27 Mar 2025 22:27:40 +0000	[thread overview]
Message-ID: <Z-XQ3NFrfi2-bd3U@google.com> (raw)
In-Reply-To: <Z-N2hsKd2NJeNiKN@casper.infradead.org>

On 03/26, Matthew Wilcox wrote:
> On Fri, Mar 14, 2025 at 09:38:15PM +0000, Jaegeuk Kim wrote:
> > On 03/14, Matthew Wilcox wrote:
> > > Unfortunately, I thnk I have to abandon this effort.  It's only going
> > > to make supporting large folios harder (ie there would then need to be
> > > an equivalently disruptive series adding support for large folios).
> > > 
> > > The fundamental problem is that f2fs has no concept of block size !=
> > > PAGE_SIZE.  So if you create a filesystem on a 4kB PAGE_SIZE kernel,
> > > you can't mount it on a 16kB PAGE_SIZE kernel.  An example:
> > > 
> > > int f2fs_recover_inline_xattr(struct inode *inode, struct page *page)
> > > {
> > >         struct f2fs_inode *ri;
> > >         ipage = f2fs_get_node_page(F2FS_I_SB(inode), inode->i_ino);
> > >         ri = F2FS_INODE(page);
> > > 
> > > so an inode number is an index into the filesystem in PAGE_SIZE units,
> > > not in filesystem block size units.  Fixing this is a major effort, and
> > > I lack the confidence in my abilities to do it without breaking anything.
> > > 
> > > As an outline of what needs to happen, I think that rather than passing
> > > around so many struct page pointers, we should be passing around either
> > > folio + offset, or we should be passing around struct f2fs_inode pointers.
> > > My preference is for the latter.  We can always convert back to the
> > > folio containing the inode if we need to (eg to mark it dirty) and it
> > > adds some typesafety by ensuring that we're passing around pointers that
> > > we believe belong to an inode and not, say, a struct page which happens
> > > to contain a directory entry.
> > > 
> > > This is a monster task, I think.  I'm going to have to disable f2fs
> > > from testing with split page/folio.  This is going to be a big problem
> > > for Android.
> > 
> > I see. fyi; in Android, I'm thinking to run 16KB page kernel with 16KB format
> > natively to keep block_size = PAGE_SIZE. Wasn't large folio to support a set
> > of pages while keeping block_size = PAGE_SIZE?
> 
> Oh, I think I do see a possible argument for continuing this work.
> 
> If we have an f2fs filesystem with a 16kB block size, we can use order-0
> folios with a 16kB PAGE_SIZE kernel, and if we want to mount it on a
> kernel with a 4kB PAGE_SIZE kernel, then we can use order-2 folios to
> do that.
> 
> Is that a useful improvement to f2fs?  It's not really the intent of
> large folios; it's supposed to be used to support arbitrary order folios.
> But we have all the pieces in place such that we could tell the page
> cache min-order = max-order = 2.

It may be helpful in case where someone wants to try 4KB page kernel back,
after Android ships 16KB page/block products. Does it require a big surgery?


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

WARNING: multiple messages have this Message-ID (diff)
From: Jaegeuk Kim <jaegeuk@kernel.org>
To: Matthew Wilcox <willy@infradead.org>
Cc: chao@kernel.org, linux-fsdevel@vger.kernel.org,
	linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH 0/4] f2fs: Remove uses of writepage
Date: Thu, 27 Mar 2025 22:27:40 +0000	[thread overview]
Message-ID: <Z-XQ3NFrfi2-bd3U@google.com> (raw)
In-Reply-To: <Z-N2hsKd2NJeNiKN@casper.infradead.org>

On 03/26, Matthew Wilcox wrote:
> On Fri, Mar 14, 2025 at 09:38:15PM +0000, Jaegeuk Kim wrote:
> > On 03/14, Matthew Wilcox wrote:
> > > Unfortunately, I thnk I have to abandon this effort.  It's only going
> > > to make supporting large folios harder (ie there would then need to be
> > > an equivalently disruptive series adding support for large folios).
> > > 
> > > The fundamental problem is that f2fs has no concept of block size !=
> > > PAGE_SIZE.  So if you create a filesystem on a 4kB PAGE_SIZE kernel,
> > > you can't mount it on a 16kB PAGE_SIZE kernel.  An example:
> > > 
> > > int f2fs_recover_inline_xattr(struct inode *inode, struct page *page)
> > > {
> > >         struct f2fs_inode *ri;
> > >         ipage = f2fs_get_node_page(F2FS_I_SB(inode), inode->i_ino);
> > >         ri = F2FS_INODE(page);
> > > 
> > > so an inode number is an index into the filesystem in PAGE_SIZE units,
> > > not in filesystem block size units.  Fixing this is a major effort, and
> > > I lack the confidence in my abilities to do it without breaking anything.
> > > 
> > > As an outline of what needs to happen, I think that rather than passing
> > > around so many struct page pointers, we should be passing around either
> > > folio + offset, or we should be passing around struct f2fs_inode pointers.
> > > My preference is for the latter.  We can always convert back to the
> > > folio containing the inode if we need to (eg to mark it dirty) and it
> > > adds some typesafety by ensuring that we're passing around pointers that
> > > we believe belong to an inode and not, say, a struct page which happens
> > > to contain a directory entry.
> > > 
> > > This is a monster task, I think.  I'm going to have to disable f2fs
> > > from testing with split page/folio.  This is going to be a big problem
> > > for Android.
> > 
> > I see. fyi; in Android, I'm thinking to run 16KB page kernel with 16KB format
> > natively to keep block_size = PAGE_SIZE. Wasn't large folio to support a set
> > of pages while keeping block_size = PAGE_SIZE?
> 
> Oh, I think I do see a possible argument for continuing this work.
> 
> If we have an f2fs filesystem with a 16kB block size, we can use order-0
> folios with a 16kB PAGE_SIZE kernel, and if we want to mount it on a
> kernel with a 4kB PAGE_SIZE kernel, then we can use order-2 folios to
> do that.
> 
> Is that a useful improvement to f2fs?  It's not really the intent of
> large folios; it's supposed to be used to support arbitrary order folios.
> But we have all the pieces in place such that we could tell the page
> cache min-order = max-order = 2.

It may be helpful in case where someone wants to try 4KB page kernel back,
after Android ships 16KB page/block products. Does it require a big surgery?

  reply	other threads:[~2025-03-27 22:27 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-07 18:21 [f2fs-dev] [PATCH 0/4] f2fs: Remove uses of writepage Matthew Wilcox (Oracle)
2025-03-07 18:21 ` Matthew Wilcox (Oracle)
2025-03-07 18:21 ` [f2fs-dev] [PATCH 1/4] f2fs: Remove check for ->writepage Matthew Wilcox (Oracle)
2025-03-07 18:21   ` Matthew Wilcox (Oracle)
2025-03-11 11:48   ` [f2fs-dev] " Chao Yu via Linux-f2fs-devel
2025-03-11 11:48     ` Chao Yu
2025-03-07 18:21 ` [f2fs-dev] [PATCH 2/4] f2fs: Remove f2fs_write_data_page() Matthew Wilcox (Oracle)
2025-03-07 18:21   ` Matthew Wilcox (Oracle)
2025-03-11 11:48   ` [f2fs-dev] " Chao Yu via Linux-f2fs-devel
2025-03-11 11:48     ` Chao Yu
2025-03-07 18:21 ` [f2fs-dev] [PATCH 3/4] f2fs: Remove f2fs_write_meta_page() Matthew Wilcox (Oracle)
2025-03-07 18:21   ` Matthew Wilcox (Oracle)
2025-03-11 11:49   ` [f2fs-dev] " Chao Yu via Linux-f2fs-devel
2025-03-11 11:49     ` Chao Yu
2025-03-07 18:21 ` [f2fs-dev] [PATCH 4/4] f2fs: Remove f2fs_write_node_page() Matthew Wilcox (Oracle)
2025-03-07 18:21   ` Matthew Wilcox (Oracle)
2025-03-11 11:49   ` [f2fs-dev] " Chao Yu via Linux-f2fs-devel
2025-03-11 11:49     ` Chao Yu
2025-03-07 20:39 ` [f2fs-dev] [PATCH 0/4] f2fs: Remove uses of writepage Jaegeuk Kim via Linux-f2fs-devel
2025-03-07 20:39   ` Jaegeuk Kim
2025-03-07 20:48   ` [f2fs-dev] " Matthew Wilcox
2025-03-07 20:48     ` Matthew Wilcox
2025-03-07 22:13     ` [f2fs-dev] " Jaegeuk Kim via Linux-f2fs-devel
2025-03-07 22:13       ` Jaegeuk Kim
2025-03-11 19:50 ` [f2fs-dev] " patchwork-bot+f2fs--- via Linux-f2fs-devel
2025-03-11 19:50   ` patchwork-bot+f2fs
2025-03-12  0:18   ` Matthew Wilcox
2025-03-12  0:18     ` Matthew Wilcox
2025-03-12  1:22     ` Jaegeuk Kim via Linux-f2fs-devel
2025-03-12  1:22       ` Jaegeuk Kim
2025-03-14 15:57       ` Matthew Wilcox
2025-03-14 15:57         ` Matthew Wilcox
2025-03-14 21:38         ` Jaegeuk Kim via Linux-f2fs-devel
2025-03-14 21:38           ` Jaegeuk Kim
2025-03-26  3:37           ` Matthew Wilcox
2025-03-26  3:37             ` Matthew Wilcox
2025-03-27 22:27             ` Jaegeuk Kim via Linux-f2fs-devel [this message]
2025-03-27 22:27               ` Jaegeuk Kim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Z-XQ3NFrfi2-bd3U@google.com \
    --to=linux-f2fs-devel@lists.sourceforge.net \
    --cc=jaegeuk@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.