Re: [PATCH v6 4/5] mm/migrate: skip migrating folios under writeback with AS_WRITEBACK_INDETERMINATE mappings

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

 



On Fri, 24 Jan 2025 at 13:29, David Hildenbrand <david@xxxxxxxxxx> wrote:

> Yeah, that was one of my initial questions as well: could one
> "transparently" (to user space) handle canceling writeback and simply
> re-dirty the page.

1) WRITE request is not yet dequeued by userspace: the writeback can
be cancelled

2/a) WRITE request is dequeued (copied) to userspace: the page can be
reused, but the writeback isn't yet complete.  Calling
folio_end_writeback() is lying in the same sense that it's lying with
temp pages.

2/b) WRITE request is dequeued (spliced) to userspace:  the page is
referenced indefinitely (could even be after the writeback completes).
Temp page could be allocated at splice time, which means performance
will be no better than with current temp page writeback, but at least
it will be less complex.

3) WRITE request is currently being copied to userspace: this should
normally be short, but userspace can be nasty and have the buffer be
an mmap of another fuse file, and make the copy hang in the middle by
triggering a page fault.  The request cannot be cancelled at this
point.  In such a case the "echo 1 >
/sys/fs/fuse/connections/##/abort" mechanism or the upcoming server
timeout can be used to shutdown the filesystem.

So this is definitely more complicated than I'd like.

Thanks,
Miklos




[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