I am not able to exactly difference between kernel logical address and virtual address. In Linux device driver book it says that all logical address are kernel virtual address,
Kernel logical addresses are mappings accessible to kernel code through normal CPU memory access functions. On 32-bit systems, only 4GB of kernel logical address space exists, even if more physical memory than that is in use. Logical address space backed by physical memory can be allocated with kmalloc
.
Virtual addresses do not necessarily have corresponding logical addresses. You can allocate physical memory with vmalloc
and get back a virtual address that has no corresponding logical address (on 32-bit systems with PAE, for example). You can then use kmap
to assign a logical address to that virtual address.