On Thu, Jul 09, 2009 at 12:18:17PM -0500, Bob Friesenhahn wrote: > Do madvise() options like MADV_ACCESS_LWP and MADV_ACCESS_MANY work on > memory allocated via malloc()? If MADV_ACCESS_LWP is specified and > malloc() hands out heap memory which has been used before (e.g. by some > other LWP), is the memory data in the range moved (physically copied and > remapped to the same address via VM subsystem) closest to the CPU core > which next touches it?
Currently, segvn is the only segment driver with support for madvise opertaions; however, this should cover most operations on a userland address space. A proccess's heap is allocated from segvn, so these operations should work. When you use MADV_ACCESS_LWP, the call to madvise, assuming it succeeds, will unmap the pages and mark them for migration. On the next page fault, i.e. the next time the page is accessed, the system will attempt to migrate the page to the home lgroup of the thread that caused the page fault. Page migration does involve copying the page's contents to a new physical location, and creating a new page mapping. -j _______________________________________________ perf-discuss mailing list perf-discuss@opensolaris.org