Find solution

How to artificially cause a page fault in linux kernel?

Here are 18 best answers to ‘How to artificially cause a page fault in linux kernel?’ - the most relevant comments and solutions are submitted by users of Stack Overflow, Quora and Yahoo! Answers.

Best solution

  • How to artificially cause a page fault in Linux kernel?

    I am pretty new to the Linux kernel. I would like to make the kernel fault every time a specified page 'P' is being fetched. One simple conceptual idea is to clear the bit indicating the presence of page 'P' in Page Table Entry (PTE). Can anyone provide more details on how to go about achieving this in x86? Also please point me to where in the source code one needs to make this modification, if possible. Background I have to invoke my custom page handler which is applicable only for handling...

    Answer:

    I have not played with the swapping code since I moved from Minix to Linux, but a swapping algorithm...

    Mark as irrelevant Undo

Other solutions