I am supposed to answer for homework which algorithm is implemented in Linux for the virtual memory page substitution and also give some extracts of the code to prove that.
After some research I have found that the following functions are called when a page fault occurs:
do_page_fault |handle_mm_fault |pte_alloc |pte_alloc_one |__get_free_page = __get_free_pages |alloc_pages |alloc_pages_pgdat |__alloc_pages |wakeup_kswapd
But I tried to follow this sequence and at some point I got totally lost. Is there any reasonable extract of code that could prove my point?