Re: page faults/pageins

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi ....
Is there a way to determine the number of page faults
which occur because a certain page has been paged out
to disk and then back into memory (i.e. page faults
that would have been avoided if the VM subsystem
didn't swap the page to disk)? I know that major page
faults are the ones that require reading the page from
disk, but I think major page faults would count the
pages being brought into memory for the first time
also. I'm not sure pgpgin gives me what I want either,
though I'm not sure. Maybe I will need to instrument
the kernel to get this information?
All I remember is, the major/minor page fault counters are stored inside task_struct as unsigned long min_flt, and maj_flt, but no further information. So, I think you need to do it by yourself. Get the fault numbers when the page is out, and get another one when the page is brought in. Calculate the diff and you're done.

Instrumenting the kernel sounds really necessary in this case. Kprobe could be your friend...

regards,

Mulyadi


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux