David McDaniel (damcdani) wrote:
Thanks for the clarification. Pending the successful outcome of the project you mention, your use of the phrase "private anonymous memory" intrigues me and thus I'll ask about an idea I had to finess this issue. Lets say I have a process whose sole task is to export a memory region. It would set the heap page size to 4m, allocate a suitably sized and aligned block of autonymous memory, possibly by mapping /dev/zero or whatever. Then it could read the contents of these files that our process mmap today. Then,it could change the permissions and attributes of the region to shared and then publish this address by some means. If I understand things, some other process could open /proc/<pid>/as and mmap that offset, yielding shared large pages. Any obvious hole in that thinking?
Nope. Actually I think it would probably be better to do it that way than mmap()ing regular files with large page - I believe mmap()ing regular files with large page, even if it's provided, could have other consequences like I/O happening at (large) page granularity which may or may not be desirable (usually it is undesirable). Seongbae _______________________________________________ perf-discuss mailing list perf-discuss@opensolaris.org