On Tue, Jan 28, 2025 at 04:25:22PM -0800, Anthony Yznaga wrote: > > On 1/28/25 4:11 PM, Andrew Morton wrote: > > On Fri, 24 Jan 2025 15:54:34 -0800 Anthony Yznaga <anthony.yznaga@xxxxxxxxxx> wrote: > > > > > Some of the field deployments commonly see memory pages shared > > > across 1000s of processes. On x86_64, each page requires a PTE that > > > is 8 bytes long which is very small compared to the 4K page > > > size. > > Dumb question: why aren't these applications using huge pages? > > > They often are using hugetlbfs but would also benefit from having page > tables shared for other kinds of memory such as shmem, tmpfs or dax. ... and the implementation of PMD sharing in hugetlbfs is horrible. In addition to inverting the locking order (see gigantic comment in rmap.c), the semantics aren't what the Oracle DB wants, and it's inefficient. So when we were looking at implementing page table sharing for DAX, we examined _and rejected_ porting the hugetlbfs approach. We've discussed this extensively at the last three LSFMM sessions where mshare has been a topic, and in previous submissions of mshare. So seeing the question being asked yet again is disheartening.