Read contents of (userland) physical pages not yet mapped?
Frank Ch. Eigler
fche@redhat.com
Fri Jan 23 03:15:00 GMT 2015
agentzh wrote:
> [...] I have run into an interesting problem while writing the
> systemtap tool [1] to inspect the shared memory regions of nginx.
> [...] But sometimes, due to "demand paging", some pages initialized
> by some workers are not loaded yet to the current worker's page
> tables, leading to systemtap runtime errors while reading the
> corresponding userspace addresses even though a (minor) page fault
> should [do the job]
Yeah, this is similar to the way stap tries to preclude causing page
faults in other contexts, like not-yet-paged-in strings out of user
syscall parameters.
> [...] But anyway I've decide to ask here for any potential
> workarounds to this problem because there are so many systemtap and
> kernel experts here :)
Any chance that mlockall() (or an explicit page-touching loop right
after mmap) could work for you?
- FChE
More information about the Systemtap
mailing list