Page fault in kernel code
Greg KH
greg at kroah.com
Tue Sep 9 10:25:05 EDT 2014
On Tue, Sep 09, 2014 at 06:53:55PM +0530, Manavendra Nath Manav wrote:
> While reading the book Essential Linux device drivers it says "user mode code
> is allowed to page fault, however, whereas kernel mode code isn't".
>
> Why is it so? Why can't kernel mode code handle the page fault and reload the
> page from swap? Also, can page fault occur when kernel is executing in process
> context and/or interrupt context?
That is just the way the Linux kernel is designed, no page faults within
it, unlike other operating systems. In the end, it makes kernel code
much simpler.
thanks,
greg k-h
More information about the Kernelnewbies
mailing list