Skip to content

[Survey] Page Fault across platforms #1770

Open
@shirou

Description

In #1769, @zmyzheng suggested introducing Total Page Fault to process.PageFaultStat. Before merging it, I would like to study Page Fault values across platforms and summarize the findings in this issue. Therefore, this issue will be updated as the investigation progresses.

About page fault

https://en.wikipedia.org/wiki/Page_fault

Linux

https://www.kernel.org/doc/Documentation/filesystems/proc.rst

  • MinorFaults (min_flt)
    • number of minor faults
  • MajorFaults (maj_flt)
    • number of major faults
  • ChildMinorFaults (cmin_flt)
    • number of minor faults with child's
  • ChildMajorFaults (cmaj_flt)
    • number of major faults with child's

Windows

In this circumstance, however, the missing data is identified as being located within an area of memory that cannot be paged out to disk.

related

https://techcommunity.microsoft.com/blog/askperf/the-basics-of-page-faults/373120

hard page fault requires disk access to occur, which could be the first access to contents in a file or accesses to memory blocks that were paged

  • (shirou): This means PageFaultCount is same as Major Fault in linux?
    • according to the comment, this is wrong. Windows just does not have a differences between major and minor.

Darwin

FreeBSD

OpenBSD

Solaris

Table 65 List of vminfo Probes

  • as_fault
    • Fires whenever a fault is taken on a page and the fault is neither a protection fault nor a copy-on-write fault.
  • cow_fault
    • Fires whenever a copy-on-write fault is taken on a page. arg0 contains the number of pages that are created as a result of the copy-on-write.
  • kernel_asflt
    • Fires whenever a page fault is taken by the kernel on a page in its own address space. Whenever kernel_asflt fires, it will be immediately preceded by a firing of the as_fault probe.
  • maj_fault
    • Fires whenever a page fault is taken that results in I/O from a backing store or swap device. Whenever maj_fault fires, it will be immediately preceded by a firing of the pgin probe.
  • prot_fault
    • Fires whenever a page fault is taken due to a protection violation.

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions