Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7883621
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T04:34:52+00:00 2026-06-03T04:34:52+00:00

I am wondering where is the major page fault handler. I wrote an algorithm

  • 0

I am wondering where is the major page fault handler.

I wrote an algorithm to minimize page faults in the kernel. So I need to record something whenever a page fault happens. I currently record a page fault happen at do_page_fault(…) in arch/x86/mm/fault_32.c

However, it seems both minor and major page fault will go to do_page_fault(…) …
And minor page faults happen all the time and messed up the algorithm.

I guess I only want to record stuff when a major page_fault happens. So, kernel hackers, would you please tell me where should I put my code? Which file and which function.

By the way, I am hacking kernel 2.6.24

Thank you very much!
Alfred

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T04:34:54+00:00Added an answer on June 3, 2026 at 4:34 am

    The handle_mm_fault function handles the page fault. Its return value is a set of flags. if VM_FAULT_MAJOR is set, then it’s a major page fault. The kernel calls perf_sw_event(PERF_COUNT_SW_PAGE_FAULT_MAJ, 1, 0, ... on every major page fault.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Wondering if following will work for google in robots.txt Disallow: /*.action I need to
Wondering if I could get some advice and direction on this following requirement: Need
Wondering if I can speed up the search. I need to build a functionality
Not a major problem but I was wondering if there is a cleaner way
just wondering what is behind the major functionalities used in Google Drawing. Does it
I'm wondering how many different formats for each video would I need in order
wondering what is the major difference between these two: onClick and mouseClick..
So I was wondering if there are any major differences between the various implementations
I am wondering what the major difference between running mvn compile and mvn clean
I'm wondering whether major SQL engines out there (MS SQL, Oracle, MySQL) have the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.