By: joncmu (jonathan.delete@this.alumni.cmu.edu), February 1, 2017 1:36 pm
Room: Moderated Discussions
rwessel (robertwessel.delete@this.yahoo.com) on January 31, 2017 5:54 pm wrote:
> > > Although I personally find that to be more of a SW design issue: people
> > > > who design their calling conventions to be about cross-process boundaries are crazy.
> > >
> > > It has its moment, though. As an example, if you've done a DB2 SELECT, each of the subsequent
> > > FETCH's is just a wrapper around a PC (call-gate to DB2's address space). DB2, can then deposit
> > > the row right into your address space (there being pretty good cross address space support in
> > > zArch). Other solutions can reduce the number of cross address space calls (for example, buffering
> > > multiple rows), but at the expense of complexity and copies of the data.
> >
> > As an OS person, I've often wanted the ability to just have the hardware write to different address
> > spaces. Screw segments, I'd like to just have access to multiple address spaces. Sparc kind of had it
> > (user vs kernel vs IO address space or whatever), but that doesn't handle the multi-process case.
> >
> > But since almost nobody has that hardware support, it's useless to a portable OS, and we end
> > up doing the "copy from one address space to another" by walking the page tables by hand.
> >
> > Even on s390.
>
>
> I'm surprised that you can't make use of some of that under the hood for zArch. I assume that somewhere
> there's a "copy space-A/address-B to space-C/address-D for length E" function. If the (real) page
> tables are available, it would be the work of a few instructions to let the hardware do the cross-address-space
> move. OTOH, I'm sure I'm not the first person to think of that...
>
z/Architecture does have the MOVE WITH OPTIONAL SPECIFICATION (MVCOS) instruction which the s390x port of linux does use to copy memory back and forth between the user address space and the kernel address space (primary and home).
Program Call is one of those instructions where I never understood how it worked from reading the ISA definition, but only really understood once I saw how it was used by MVS/zOS.
> > > Although I personally find that to be more of a SW design issue: people
> > > > who design their calling conventions to be about cross-process boundaries are crazy.
> > >
> > > It has its moment, though. As an example, if you've done a DB2 SELECT, each of the subsequent
> > > FETCH's is just a wrapper around a PC (call-gate to DB2's address space). DB2, can then deposit
> > > the row right into your address space (there being pretty good cross address space support in
> > > zArch). Other solutions can reduce the number of cross address space calls (for example, buffering
> > > multiple rows), but at the expense of complexity and copies of the data.
> >
> > As an OS person, I've often wanted the ability to just have the hardware write to different address
> > spaces. Screw segments, I'd like to just have access to multiple address spaces. Sparc kind of had it
> > (user vs kernel vs IO address space or whatever), but that doesn't handle the multi-process case.
> >
> > But since almost nobody has that hardware support, it's useless to a portable OS, and we end
> > up doing the "copy from one address space to another" by walking the page tables by hand.
> >
> > Even on s390.
>
>
> I'm surprised that you can't make use of some of that under the hood for zArch. I assume that somewhere
> there's a "copy space-A/address-B to space-C/address-D for length E" function. If the (real) page
> tables are available, it would be the work of a few instructions to let the hardware do the cross-address-space
> move. OTOH, I'm sure I'm not the first person to think of that...
>
z/Architecture does have the MOVE WITH OPTIONAL SPECIFICATION (MVCOS) instruction which the s390x port of linux does use to copy memory back and forth between the user address space and the kernel address space (primary and home).
Program Call is one of those instructions where I never understood how it worked from reading the ISA definition, but only really understood once I saw how it was used by MVS/zOS.