lkml.org 
[lkml]   [2021]   [Nov]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectQuestions about page fault of memfd/shmem
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

\
 
 \ /
  Last update: 2021-11-27 10:22    [W:0.133 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site