Am I right that this may be a route to avoid the full munmap we have presently upon exec or I am missing something. If that is the case it will be well worth it.
Post by Thomas MeyerHi,
Post by Richard WeinbergerPost by Thomas MeyerHi,
after looking into using userfaultfd for the userspace UML process
page fault handling, I come to the conclusion that userfaultfd
*cannot* be used for above goal as it only operates on mmaped memory
areas.
Am I missing something? What do you think about it?
See: https://lkml.org/lkml/2015/5/20/541
Cool! Thanks for the hint. I don't follow LKML, so...
"Alternatively once we extend the handle_userfault to tmpfs you could
map the page in two virtual mappings and track the faults in one
mapping (where the tracked app runs) and read/write the page contents
in the other mapping that isn't tracked by the userfault."
I think this is now the case with 4.11, isn't it?
kernel process: Map a tmpfs region for each userspace process with
read/write.
userspace process: Map the same tmpfs for the current process and
userfaultfd the whole address space, and give the userfaultfd fd to the
kernel somehow and process the page fault there and fill/copy the
faulted page accordingly.
so each userspace process would be backed by a tmpfs mmap region? sound
complicated.
with kind regards
thomas
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
User-mode-linux-devel mailing list
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel