linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
* [f2fs-dev] [DISCUSSION]:f2fs:Approachs to address write amplification in current aops->dirty_folio
@ 2025-03-30  2:38 Nanzhe Zhao
  2025-03-31  3:43 ` Matthew Wilcox
  0 siblings, 1 reply; 6+ messages in thread
From: Nanzhe Zhao @ 2025-03-30  2:38 UTC (permalink / raw)
  To: jaegeuk; +Cc: Matthew Wilcox, linux-f2fs-devel@lists.sourceforge.net

Dear f2fs developers,
I am writing to discuss a potential issue regarding the dirty_folio
implementation in f2fs and its potential impact on write
amplification.

Currently, the f2fs implementation of dirty_folio within
address_space_operations relies on filemap_dirty_folio. As
filemap_dirty_folio marks the entire folio as dirty, this means that
during dirty page writeback, if only a single page within a folio has
been modified, the entire folio will still be written back to storage.
This behavior can lead to write amplification.

For f2fs, a log-structured file system, this write amplification issue
is particularly concerning. It not only degrades writeback I/O
performance but also results in more data blocks being appended to the
end of the disk, accelerating the frequency of garbage collection and
potentially shortening the lifespan of flash memory.

Unlike ext4, f2fs lacks a buffer_head-like per-block data structure.
Therefore, the block_dirty_folio approach used by ext4 to mitigate
this issue is not directly applicable to f2fs.

I have been considering potential solutions to address this. Two
approaches I've explored are:
 Either modifying the f2fs dirty page writeback function to manually
mark individual sub-pages within a folio as dirty, rather than relying
on the folio-level dirty flag.

Or utilizing the per-block dirty state tracking feature introduced in
kernel 6.6 within the iomap framework. This would involve using the
iomap_folio_state structure to track the dirty status of each block
within a folio.

I would greatly appreciate it if you could share your insights and
perspectives on this issue and the proposed solutions. Any feedback or
alternative suggestions would be highly valuable.

Best regards.


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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-04-08 10:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-30  2:38 [f2fs-dev] [DISCUSSION]:f2fs:Approachs to address write amplification in current aops->dirty_folio Nanzhe Zhao
2025-03-31  3:43 ` Matthew Wilcox
2025-04-01 14:17   ` Nanzhe Zhao
2025-04-02  3:10     ` Matthew Wilcox
2025-04-05  3:10       ` Nanzhe Zhao
2025-04-08 10:14         ` Nanzhe Zhao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).