Messages in this thread | | | Date | Mon, 2 Aug 1999 22:32:23 +0200 | From | Jamie Lokier <> | Subject | Re: clustering page-ins |
| |
Chuck Lever wrote: > i'm not clear on when vma's are shared.
vmas are per-mapping: in general each call to mmap() establishes a new mapping. So when different processes, map the same shared file, they each have their own vmas. When a file is mapped several times in different places or with different permissions, those use different vmas too. (E.g. an ELF executable usually involves several mappings of the same file into the same memory space, with different permissions).
If several cloned threads access the same memory-mapped area, they will all hit the same vma: only one mmap() call is used to set up the mapping, which is then visible to all the threads.
Exceptions: adjacent mappings in the same memory space may have their vmas merged together, if the permissions, file offset and file etc. match up at the ends. Mappings may also be split up by munmap() and mmap(), and so on.
-- Jamie
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |