* Questions about page fault of memfd/shmem
@ 2021-11-27 9:19 Peng Liang
0 siblings, 0 replies; only message in thread
From: Peng Liang @ 2021-11-27 9:19 UTC (permalink / raw)
To: linux-kernel
Cc: linux-mm, hughd, akpm, xiexiangyou 00584000, zhengchuan,
wanghao232, chenwandun 00417970
Hi all,
I'm a user-space developer and I want to use memfd to share some memory
between parent and child processes.
For the demo, it works well. However, I fount that the RSS of the
process using memfd will grow up faster than that using anonymous
mappings. Dig some memfd/shmem code and I find that memfd/shmem will
allocate a page for a read page fault.
For my use case, the process may allocate tens or even hundreds of GiB
memory using memfd. So allocating all memory just because of reading it
will has a great impact.
Could memfd/shmem map to the global zero page instead of allocating a
page for a read page fault?
Thanks,
Peng
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-11-27 9:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-27 9:19 Questions about page fault of memfd/shmem Peng Liang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox