On 6/25/2012 10:58 PM, Stephen Fuld wrote:
> On 6/21/2012 9:30 PM, Andy (Super) Glew wrote:
>> On 6/21/2012 4:34 PM, MitchAlsup wrote:
>>> On Tuesday, June 19, 2012 4:17:06 PM UTC-5, Stephen Fuld wrote:
>
> snip
>
>
>> This is morphing from the IMHO excessively specific "hardware support
>> for Actors" to the more general "hardware support for message passing".
>
> I have no problem with that, as long as it doesn't get so far away that
> simple actor models are not easily accommodated.
Fair enough.
By the way: I have long been interested in Actors, but I have a terrible
memory for names. I sat next to Carl Hewitt for two meals at a
conference last year, and we talked about message passing - but he never
let drop the term "Actors". He did send me home with a paper of his, at
which point I realized.
>> a) to have message passing instruction set extensions - send/receive
>> (and possibly also PGAS-like, MIP 3.x like, put, get, which are just
>> shared memory in another form).
>> I.e., yes, I propose instructions
>> put(channel, regval ) / get( channel, regval )
>> put( channel, buf, nbytes ) / get( channel, buf, nbytes )
>> + possibly scatter/gather forms,
>> and/or RDMA forms
>> (and whatever is necessary to match MPI's matching semantics)
>
> I agree that message passing instructions are exactly the kind of thing
> I was looking for. But I think it must be more than the instructions.
> If you want the solution to be all in hardware, don't you need some
> hardware data structures to insure that someone doesn't flood an
> unprepared process with a huge number of messages, or that the message
> goes into the area the receiver prepared for it, etc.? These may not be
> necessary in the simplest case of messages within the multiple threads
> of a single program, but beyond that, I think you need something.
As you said: not necessary within a single privilege domain. But, yes,
we really do want message passing between privilege domains. Eventually.
The key is coming up with an evolutionary sequence of small incremental
changes, because requiring the whole thing be done at once scares people
off.
Being an architect, I do have a long term agenda that becomes as
complete as I can imagine. But sometimes even sharing that scares people
off.
Anyway
0) - now - we have message passing, e.g. through TCP/IP, and various
supercomputer-type interconnects. These go through software stacks on
the endpoints and in the routers. They have flood control to whatever
degree there is current flood control in TCP/IP, ertc.
1) Message passing instructions for same or compatible privilege
domains. Require software to set up, to check compatibility. Once
established, let the application manage its own flow and flood control.
1.1) Message passing when memory is shared... Can use, e.g. virtual
memory tricks.
1.2) Message passing when memory is not shared. Requires smart routers.
But, again, mostly exist.
2) Message passing instructions between privilege domains. E.g. between
machines using TCP/IP. Basically, interface to the NIC as directly as
possible. Flow/flood control can be done by existing mechanisms in the
NIC and routers. They may need to be augmented for direct access - but
Intel already has direct access to networking, just via shared memory
queues. So, largely, can leverage existing mechanisms.
Largely, my approach is to let software do the hard parts of protection
- managing flow control, preventing DOS. Let hardware do the easy parts
- preventing access out of bounds.
Eventually may want hardware to provide assists to software - e.g.
interrupts when too many packets hit a receiver in a time interval. But
I am guessing that we would be immensely lucky to have gotten to the
point where that is a problem. Or, perhaps, lack of that is what has
been holding architectural message passing back - but I doubt it.
Some asides:
* It is greatly convenient to require software to set up a handle, a
channel, for communication, and then have hardware/firmware operate on
the data in the channel. Unfortunately, MPI's pattern matching
requires better than that - it is impractical to establish N^2 channels
for communication between N nodes. Let alone multicast. What I don't
like is that MPI's pattern matching seems specific.
* Architectural message passing, in the ISA, is squeezed between shared
memory on the one hand, and all of the message passing implementations
that allow direct access to network queues without a syscall.