superpages and kmem on amd64
zec at fer.hr
Sun May 20 22:48:58 UTC 2012
On Sunday 20 May 2012 19:34:26 Alan Cox wrote:
> > In any case, I wish to be certain that a particular kmem virtual address
> > range is mapped to superpages - how can I enforce that at malloc time,
> > and / or find out later if I really got my kmem mapped to superpages?
> > Perhaps vm_map_lookup() could provide more info, but I'm wondering if
> > someone already wrote a wrapper function for that, which takes only the
> > base virtual address as a single argument?
> Try using pmap_mincore() to verify that the mappings are superpages.
flags = pmap_mincore(vmspace_pmap(curthread->td_proc->p_vmspace),
OK, that works, and now I know my kmem chunk is on a superpage, horray!!!
> > BTW, apparently malloc(size, M_TEMP, M_NOWAIT) requests fail for size>
> > 1G, even at boot time. Any ideas how to circumvent that (8.3-STABLE,
> > amd64, 4G physical RAM)?
> I suspect that you need to increase the size of your kmem map.
Huh any hints how should I achieve that? In desperation I placed
in /boot/loader.conf and got this:
but malloc(2G) still fails...
More information about the freebsd-amd64