On Sun, Jan 26, 2025 at 7:49 PM Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote: > > On Sun, 26 Jan 2025 at 09:02, Mateusz Guzik <mjguzik@xxxxxxxxx> wrote: > > > > Hello there, a blast from the past. > > > > I see this has landed in b90197b655185a11640cce3a0a0bc5d8291b8ad2 > > Whee. What archeology are you doing to notice this decade-old issue? > Me? Archeology? Not even once! I was curious what's up with this very much *fresh* sucker: https://lore.kernel.org/oe-lkp/202501261527.c3bf4764-lkp@xxxxxxxxx/ > > I came here from looking at a pwrite vs will-it-scale and noticing that > > pre-faulting eats CPU (over 5% on my Sapphire Rapids) due to SMAP trips. > > Ugh. Yeah, turning SMAP on/off is expensive on most cores (apparently > fixed in AMD Zen 5). > Interesting, I thought it sucks everywhere. Anyhow it definitely still sucks on Sapphire Rapids which is pretty high up there as far as Intel goes, so... > > It used to be that pre-faulting was avoided specifically for that > > reason, but it got temporarily reverted due to bugs in ext4, to quote > > Linus (see 00a3d660cbac05af34cca149cb80fb611e916935): > > Yeah, I think we should revert the revert (except we've done other > changes in the last decade - surprise surprise - so it would be a > completely manual revert). > > If you send me a tested revert of the revert (aka re-do) of the "don't > pre-fault" patch, I'll apply it. > :( ok This being your revert I was lowkey hoping you would do the honors. I'll sort it out if Ted confirms that as far as he knows this is fixed in ext4. > Note that the ext4 problem could exist in other filesystems, so we > might have to revert (again). It's not necessarily that ext4 was > _particularly_ buggy, it's quite possible that the problem was > originally found on ext4 just because it was more widely used than > others. Indeed. Or they might have regressed since, which is why I mentioned -next for testing. -- Mateusz Guzik <mjguzik gmail.com>