On Sat, 16 Dec 2023 at 02:06, Matthew Wilcox <willy@xxxxxxxxxxxxx> wrote: > > > I'm looking at fuse_writepage_locked() and it allocates a new page, then > copies from the page cache into that page before sending that page to > userspace. I imagine you want to prevent torn writes, so why not set > SB_I_STABLE_WRITES instead of having this memcpy? It's not as simple as that. Fuse wants to do its writes independently of the mm's reclaim mechanisms so that it doesn't get into the sort of deadlock that PF_MEMALLOC is supposed to prevent inside the kernel. I don't remember the details, but the last time I looked this issue (which wasn't recently) there was no feasible alternative to copying the page. Thanks, Miklos