3 ms·
Huh. I did a little digging through kernel source. There's been a CONFIG_READ_ONLY_THP_FOR_FS since 2019. It's still marked as experimental and isn't enabled on
by scottlamb 4y ago
Huh. I did a little digging through kernel source. There's been a CONFIG_READ_ONLY_THP_FOR_FS since 2019. It's still marked as experimental and isn't enabled on the precompiled kernel I'm using (with Ubuntu 22.10). Is that option set on your kernel, or is this something else?
I also see something about MADV_COLLAPSE that supposedly supports file-backed pages. [1]
[1] https://lwn.net/Articles/913363/ https://lwn.net/Articles/913363/
- the8472 4y agoYeah, it's enabled here $ zgrep 'CONFIG_READ_ONLY_THP_FOR_FS' /proc/config.gz CONFIG_READ_ONLY_THP_FOR_FS=y > What kernel version did that output come from? kernel 6.2.8-arch1-1 > What filesystem type is this? btrfs > I don't fully understand the distinction between that and FileHugePages: "Memory used for filesystem data (page cache) allocated with huge pages". Probably pages in the page cache that aren't mapped into a user process. Which is what happens when you read()