Linux - KernelThis forum is for all discussion relating to the Linux kernel.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How could I monitor the cause of the major page faults in my app?
At least the virtual address in process space where they happen.
I know they are happening, but I'm using a couple of memory mapped files and I don't know which one of them are producing the corresponding disk activity.
sounds to me like you have bad libraries (your version of libc that supports "memory mapped files", broken)
it's not memory mapped if the red led disk light is on is it? nope.
HOWEVER: remember that if you "sync" or if the file changes that the kernel may "do maintenance". memory mapped file does not mean loaded into memory. it's still subject to kernel maintenance which could mean writing cached data because ... "there's nothing else to do right now".
I would be a bit surprised if this sort of info was exposed to userland.
I see there is a kernel trace event for "page_fault_user" that has a field for address - probably the guy you're looking for, but needs kernel tracing set up for it and filtering for PID. Not to mention a kernel with the appropriate option enabled.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.