superpages and kmem on amd64
zec at fer.hr
Sun May 20 07:01:51 UTC 2012
I'm playing with an algorithm which makes use of large contiguous blocks of
kernel memory (ranging from 1M to 1G in size), so it would be nice if those
could be somehow forcibly mapped to superpages. I was hoping that the VM
system would automagically map (merge) contiguous 4k pages to superpages, but
apparently it doesn't:
I.e. I have 1G of kmem allocated using via
malloc(1024 * 1024 * 1024, M_TEMP, M_NOWAIT);
but vm.pmap.pde.mappings: 0 suggests that no superpages are in use.
Is there an alternative kernel memory allocation method which might force
superpages to be used for contiguous memory blocks? And how do I find more
details about page mappings for a given kmem virtual address? I'm running
8.3-STABLE on amd64.
More information about the freebsd-amd64