The page fault code needs stack too... IIRC the Linux developers made the explicit decision that Kernel code and dara will always be in RAM; a page fault from kernel code is a reason to panic. If you want to make kernel code and data "demand pagable" you must take care that all code (and data) needed for paging in the swapped out kernel pages is locked in RAM. "The data I need to load this page is only available in the swap." Linux systems can swap to a local file system or over the network, a lot of code (and data) would have to be locked to keep the system running. The kernel gurus decided that 100% was far easier to manage.
Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds