Skip to contentSkip to conversation

Why is there limited number of permanent memory mappings in kernel on x86?

DISCUSSION gniuxiao 2 participants 2 messages Nov 9, 2006

lore
Share & tools
lore

gniuxiao

author
#0 lore raw

So we have to use kmap() to map high memory to kernel address???

#1 lore raw
Quoted 1 line · gniuxiao

So we have to use kmap() to map high memory to kernel address???

Several reasons:

o on i386 kernel address space is limited to just 1GB of which most that is on the order of 970MB is used for mapping lowmem. The remainder is used for ioremap'ed memory, vmalloc'ed memory, highmem mappings and fixmap mappings, so there really on is very little address space.
o highmem mappings are assumed to be very shortlived so at any time there will only be a small number of mappings active.
o The algorithm to allocate a virtual address for a non-atomic kmap is somewhat simpleminded with O(n) worst case where n is the max. number of mappable pages and will be the slower the more pages are actually mapped.

Ralf