Address Types in Linux

Arun KS getarunks at gmail.com
Tue Nov 5 02:58:51 EST 2013


Hi Anup,

I ll give a try.


On Sat, Nov 2, 2013 at 5:14 AM, Anup Buchke <anup.estuff at gmail.com> wrote:
>
> Hi all,
>
> I am studying LDD3. It mentions the following types of address which is creating some confusion.
>
> User Virtual Address : The address space of a process. This ranges from 0-3Gb for 32-bit machines.

User virtual address range(0-3GB) depends not only 32-bit machines,
but also the Virtual Memory split as well. You can say for 1:3 VM
split, range is 0-3GB

>
> Kernel Logical Address : This is the range of address for which there exist no virtual mapping. They add some offset into the logical address and get the corresponding physical address. This is also referred as "Low memory." Kmalloc gives this type of address.
>
Partially wrong. Kernel logical addresses have virtual mappings. Each
and every address referenced by the cpu has to go thorough MMU. MMU
consults TLB or page tables to find out the physical address
associated with it. The main  difference w.r.t kernel virtual
address(KVA) is that, the kernel logical address(KLA) has a linear
mapping. The associated physical address differ only by some offset.

> Kernel virtual address : This is the range of address for which virtual mapping exist. Kernel has to go through the paging mechanism to get the physical address and then access the location. This is referred as "High Memory". Vmalloc gives this type of address. If this goes through paging mechanism...Can there be Page Fault for this type of access?...What kinds of kernel code/data are placed in "High Memory".

Pages in low memory are always mapped. But high memory pages are
dynamically mapped(exception is pkmapping for high memory which is
around 2MB).

Paging mechanism is required for all the kernel address(KVA & KLA).
High memory area is mostly used for user space area. So the virtual
address will fall in 0-3G.
Kernel can also map from high memory using kmap() in this case virtual
address will fall in vmalloc area.

HTH,
Arun

>
> Both Kernel (virtual and logical) address ranges in 3-4GB for 32bit machines.
>
> Please let me know if this understanding is proper. Also any good comments to enhance my understanding will be helpful and appreciated.
>
> Thanks
>
> Anup
>
>
>
>
>
>
>
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>



More information about the Kernelnewbies mailing list