By: rwessel (robertwessel.delete@this.yahoo.com), February 2, 2017 4:40 pm
Room: Moderated Discussions
Linus Torvalds (torvalds.delete@this.linux-foundation.org) on February 1, 2017 9:17 am wrote:
> rwessel (robertwessel.delete@this.yahoo.com) on January 31, 2017 5:54 pm wrote:
>
> > MVS does the same at the physical page level, for similar reasons. For the reference bit as well.
>
> So I suspect MVS does a lot less physical page sharing.
>
> Unix, with mmap() and fork() ends up often sharing the page with multiple different
> virtual mappings, and the mappings can also have entirely different protections
> (ie the same page might be mapped by both root and a normal user).
MVS actually does a bunch of page sharing, but it's essentially always at the same virtual address, and COW is simply not a thing (other than in the Unix subsystem). So the cases you're talking about don't occur. Things like mmap don't make quite as much sense since most files are not byte-stream oriented. There is a mechanism which handles some similar tasks called "data spaces", but those are entire address spaces dedicated to caching or mapping a file (just data, no code, no program execution), but those are accessed via the cross-address space functions - so two users actually get access to the one mapping in that one dedicated address space.
Actually the ability to efficient support COW is actually a semi-recent addition to S/360 (write protection has always been available on the physical page tag forever, and than a bit in the page table, but it generated a non-recoverable fault, somewhere in the ESA era, the "suppression on protection" was added to change the type of fault that occur for protection exceptions).
> rwessel (robertwessel.delete@this.yahoo.com) on January 31, 2017 5:54 pm wrote:
>
> > MVS does the same at the physical page level, for similar reasons. For the reference bit as well.
>
> So I suspect MVS does a lot less physical page sharing.
>
> Unix, with mmap() and fork() ends up often sharing the page with multiple different
> virtual mappings, and the mappings can also have entirely different protections
> (ie the same page might be mapped by both root and a normal user).
MVS actually does a bunch of page sharing, but it's essentially always at the same virtual address, and COW is simply not a thing (other than in the Unix subsystem). So the cases you're talking about don't occur. Things like mmap don't make quite as much sense since most files are not byte-stream oriented. There is a mechanism which handles some similar tasks called "data spaces", but those are entire address spaces dedicated to caching or mapping a file (just data, no code, no program execution), but those are accessed via the cross-address space functions - so two users actually get access to the one mapping in that one dedicated address space.
Actually the ability to efficient support COW is actually a semi-recent addition to S/360 (write protection has always been available on the physical page tag forever, and than a bit in the page table, but it generated a non-recoverable fault, somewhere in the ESA era, the "suppression on protection" was added to change the type of fault that occur for protection exceptions).