Kernel Memory

kishore sheik ahamed linuxinme at gmail.com
Thu Jun 21 09:40:13 EDT 2012


Hey Vijay

I am a newbie too. Just sharing what I could go through.

It is said that Kernel or atleast a part of kernel needs to be non paged
for fast interrupt access etc as pinned memory
Wiki says
Pinned/Locked/Fixed pages

Operating systems have memory areas that are pinned (never swapped to
secondary storage). For example,
interrupt<http://en.wikipedia.org/wiki/Interrupt>mechanisms rely on an
array of pointers to their handlers, such as
I/O <http://en.wikipedia.org/wiki/I/O> completion and page
fault<http://en.wikipedia.org/wiki/Page_fault>.
If the pages containing these pointers or the code that they invoke were
pageable, interrupt-handling would become far more complex and
time-consuming, particularly in the case of page fault interrupts. Hence,
some part of the page table structures is not pageable.

Some pages may be pinned for short periods of time, others may be pinned
for long periods of time, and still others may need to be permanently
pinned. For example:

   - The paging supervisor code and drivers for secondary storage devices
   on which pages reside must be permanently pinned, as otherwise paging
   wouldn't even work because the necessary code wouldn't be available.
   - Timing-dependent components may be pinned to avoid variable paging
   delays.
   - Data buffers <http://en.wikipedia.org/wiki/Data_buffer> that are
   accessed directly by peripheral devices that use direct memory
access<http://en.wikipedia.org/wiki/Direct_memory_access>or I/O
   channels <http://en.wikipedia.org/wiki/I/O_channel> must reside in
   pinned pages while the I/O operation is in progress because such devices
   and the buses <http://en.wikipedia.org/wiki/Bus_%28computing%29> to
   which they are attached expect to find data buffers located at physical
   memory addresses; regardless of whether the bus has a memory management
   unit for I/O <http://en.wikipedia.org/wiki/IOMMU>, transfers cannot be
   stopped if a page fault occurs and then restarted when the page fault has
   been processed.

There are other two discussion thread which say kernel is non-pageable and
now due to growing kernel Data structures it is allowed

http://kerneltrap.org/node/6404

http://kerneltrap.org/node/8206


Regards

Kishore


On Thu, Jun 21, 2012 at 5:57 PM, Vijay Chauhan <kernel.vijay at gmail.com>wrote:

> Hello,
>
> I am newbie.
> It has been said "kernel memory is not pageable"
> What does it mean? There is no concept of kernel virtual address?
>
> Any simple explanation will help me to udnerstand.
>
> Thanks,
> Vijay
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20120621/9cd13cf5/attachment.html 


More information about the Kernelnewbies mailing list