RE: memory used by kernel?

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

 




-----Original Message-----
From: Naidu, Venkata [mailto:Venkata.Naidu@xxxxxxxxxxx]
Sent: Tuesday, October 12, 2004 3:26 AM
To: jonathan@xxxxxxxxxxxxxx
Cc: kernelnewbies
Subject: RE: memory used by kernel?



>  1. why do we need page tables for kernel memory from PAGE_OFFSET 
>     to HIGHMEM, if the conversion is direct. Isn't it just sufficient 
>     to maintain kernel page tables for HIGHMEM, instead of NORMAL.

	The CPU uses the MMU to translate virtual address to physical
address irrespective of whether it is running in kernel mode or user mode
and hence u need page tables for kernel too. More over, normally, kernel
virtual address 0xc000 0000 (PAGE_OFFSET) corresponds to physical address
0x0 (or some other physical address, depends on the board) and so on. It is
through the page table entries that this is made possible.

>  2. Let us consider there is some advantage of maintaining kernel
>     page table (along with every process page table), then, kernel
>     page table also mush reside in memory always (even if the linux 
>     kernel is not pageable). If the kernel page table is in memory
>     always, isn't it trivial to implement kernel memory as pageable.
>     What is the rational behind the kernel being not pageable?

	AFAIK, by making kernel non pageable the kernel development is made
much eazy. 

>  3. Does each and every kernel address mapped in every process
>     virtual memory (some where in between 3GB to 4GB). Even
>     when kernel does a kmalloc from interrupt context?

	For any process, the PTEs that corresponds to kernel mode addresses
will be the same. The ISR runs at the context of the currently scheduled
process.	

 

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[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