Re: [PATCH v3 0/4] allow partial folio write with iomap_folio_state

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 25 Aug 2025 02:34:30 -0700, Christoph Hellwig wrote:
> On Tue, Aug 13, 2025 at 05:15:34PM +0800, alexjlzheng@xxxxxxxxx wrote:
> > From: Jinliang Zheng <alexjlzheng@xxxxxxxxxxx>
> > 
> > With iomap_folio_state, we can identify uptodate states at the block
> > level, and a read_folio reading can correctly handle partially
> > uptodate folios.
> > 
> > Therefore, when a partial write occurs, accept the block-aligned
> > partial write instead of rejecting the entire write.
> > 
> > For example, suppose a folio is 2MB, blocksize is 4kB, and the copied
> > bytes are 2MB-3kB.
> 
> I'd still love to see some explanation of why you are doing this.
> Do you have a workload that actually hits this regularly, and where
> it makes a difference.  Can you provide numbers to quantify them?

Thank you for your reply. :)

Actually, I discovered this while reading (and studying) the code for large
folios.

Given that short-writes are inherently unusual, I don't think this patchset
will significantly improve performance in hot paths. It might help in scenarios
with frequent memory hardware errors, but unfortunately, I haven't built a
test scenario like that.

I'm posting this patchset just because I think we can do better in exception
handling: if we can reduce unnecessary copying, why not?

Hahaha, just my personal opinion. :)

thanks,
Jinliang Zheng




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux