[LSF/MM TOPIC] (again) THP for file systems

From: Song Liu
Date: Wed Feb 13 2019 - 17:00:28 EST


Hi,

I would like to attend the LSF/MM Summit 2019. I'm interested in topics about
BPF, mdraid, and MM. I am a designated reviewer of BPF. I am also helping Jens
organize mdraid patches.

I would like to discuss remaining work to bring THP to (non-tmpfs) file systems.
This topic has been discussed multiple times in previous LSF/MM summits [1][2].
However, there hasn't been much progress since late 2017 (the latest work I can
find is by Kirill A. Shutemov [3]).

We (Facebook) uses THP in many services. We see significant savings by putting
hot-text on THP. To achieve this with state-of-the-art Linux Kernel, we have to
either: trick the Kernel to believe certain region is anonymous pages; or put
the executable in tmpfs. In our case, the tmpfs solution is too expensive.
Therefore, we use a hack to trick the Kernel. This hack breaks other useful
features, e.g. perf symbols and uprobes. Instead of introducing more hacks to
use these broken features, it is better to enable THP for file systems.
Therefore, we would like discuss (for one more time) what is needed to bring
THP to file systems like ext4, xfs, btrfs, etc. Once we are aligned on the
direction, we are more than happy to commit time and resource to make it happen.

Since this topic is my main focus of this year's summit, I would like an invite
to the MM track.

Thanks,
Song

[1] https://lwn.net/Articles/686690/
[2] https://lwn.net/Articles/718102/
[3] https://kernel.googlesource.com/pub/scm/linux/kernel/git/kas/linux/+/hugeext4/wip