Re: KERNEL: Swapping Kernel Pages

Keith Owens (
Sun, 22 Jun 1997 12:06:53 +1000

On Sat, 21 Jun 1997 19:40:38 -0400 (EDT),
Randal Koene <> wrote:
>I've been going over the _old_ documentation to the Kernel's memory
>management and the related sources, as well as the exception handlers.
>And still it isn't clear to me what the actual reason is why Kernel pages
>are taboo w.r.t. paging?

If kernel code accesses any page that is swapped out, the affected code
has to sleep while the page is swapped in. Some sections of the kernel
assume that the executing code cannot sleep. Break that assumption and
you get all sorts of nasty race conditions.

Many of the "cannot sleep" assumptions are done to avoid data specific
serialization. Along the lines of "I'm running, I own this data, no
other code can change it right now so I can do what I like to it".
With a fine grained kernel locking system, it may be possible to look
at swapping kernel pages but don't hold your breath, it is a
non-trivial exercise.