Messages in this thread | | | Date | Thu, 11 Feb 1999 21:37:17 -0800 | From | (Kanoj Sarcar) | Subject | (ia32) vmalloc/ioremap |
| |
Hi,
Has anyone noticed that vmalloc()/ioremap() seem to be overly complicated procedures? Basically, vmalloc_area_pages()/ remap_area_pages() might be getting called on an until now unused kernel virtual address, for which a kernel page table needs to be allocated. set_pgdir() takes care of this by: 1. updating the page directory of each running task. 2. updating the cached free page directories on each cpu.
It seems to me that we could do away with the complexity of set_pgdir if we were to allocate a few kernel page tables at kernel startup time, have the kernel page directory entries for swapper_pg_dir mapping the vmalloc area point to these kernel page tables and have those be copied to every new page directory in the system. Of course, the whole vmalloc area (VMALLOC_START .. VMALLOC_END) would take too many kernel page tables probably, so we would need to resize the vmalloc area to something more easily handled, say 32M on a 64M system (or any other heuristic), which requires 8 kernel page table pages.
Has this been discussed before, or are there any problems with this approach I am not thinking about? This approach could be applied for other architectures too, since a lot of asm*/pgtable.h's seem to have the same implementation of set_pgdir. If this is an acceptable idea, I could code something up ...
Kanoj
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |