I would like my multithreaded application to run as efficiently as
possible on NUMA systems such as AMD Opteron. Solaris 10 and later
provide MADV_ACCESS_LWP, MADV_ACCESS_MANY, and MADV_ACCESS_DEFAULT
options to madvise(). It is clear how these can work for a memory
mapped file since file data is mapped to physical memory and so when a
page fault occurs (or the system does speculative read-ahead), the
physical memory can be allocated based on being closest to the
accessing LWP, or the prescribed policy. What is not clear is how to
deal with so called "heap" memory allocated via malloc().
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?
My application uses a very large memory buffer shared between threads
(but initialized by just one thread) which could benefit from
MADV_ACCESS_MANY behavior. It also uses smaller thread-specific
buffers which would benefit from MADV_ACCESS_LWP behavior.
Thanks,
Bob
--
Bob Friesenhahn
bfrie...@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/
_______________________________________________
perf-discuss mailing list
perf-discuss@opensolaris.org