RE: Page fault in kernel code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 

 

From: kernelnewbies-bounces+jharan=bytemobile.com@xxxxxxxxxxxxxxxxx [mailto:kernelnewbies-bounces+jharan=bytemobile.com@xxxxxxxxxxxxxxxxx] On Behalf Of Manavendra Nath Manav
Sent: Tuesday, September 09, 2014 6:24 AM
To: kernelnewbies@xxxxxxxxxxxxxxxxx; feedback@xxxxxxxxxxxx
Subject: Page fault in kernel code

 

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?

-- manav m-n

Think about handling the case where a page fault has occurred but the code that handles the page fault is itself not already in RAM, which leads to another page fault. Gets complicated. That complexity can be avoided by keeping all the kernel code in RAM all the time. Same applies to the kernel data that is needed to handle a page fault.

Jeff Haran

 

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux