Re: [PATCH] mm/huge_memory: transfer the pmd dirty bit to the folio on zap
From: Christoph Hellwig
Date: Tue Aug 25 2026 - 01:59:56 EST
On Thu, Aug 20, 2026 at 03:10:11PM +0100, Pedro Falcato wrote:
> > Why? Write batching from large folios is a win.
>
> For some context: we were discussing (off-list) the recent report that
> systemd-journald had horrible write amplification, worsed quite a bit
> by large folios. At the moment, there is quite a lot of write amplification,
> but _only_ on mmap writes (if you look at the write(2) paths, you'll see
> write_begin and write_end which tactically only dirty what you actually wrote
> to, block-wise in the BHs or iomap IFS). This doesn't need to be true.
So don't use mmap to write to storage. That is always a bad idea for
many, many reasons. We should not work around broken applications that
do this, but change them. It only took about 10 years of bad reputation
for MongoDB to finally fix their act, so it should be possible for
systemd as well.