In Linux, when a process try to access a page that doesn't have a current physical mapping (missing page table entry), a page fault is generated (by CPU). This causes Linux's page fault handler to be invoked. If this fault is "major", meaning Linux has to read the page from the swap device, the handler has to read from the actual disk in this case. Since reading from a disk is asynchronous (submit_bio), does this cause the process to reschedule? (And wake up when I/O is complete?)

If reschedule does happen, where is the call to "schedule()"? Reading the code in mm/swap_state.c doesn't give me a clue as to when (or if) this happens.

Edit
Report