Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

The more they over-think the plumbing the easier it is to stop up the drain.


devel / comp.arch / Re: Hardware assisted short message passing

SubjectAuthor
* Hardware assisted message passingStephen Fuld
+* Re: Hardware assisted message passingTimothy McCaffrey
|+* Re: Hardware assisted message passingrobf...@gmail.com
||+* Re: Hardware assisted message passingStephen Fuld
|||`* Re: Hardware assisted message passingMitchAlsup
||| `- Re: Hardware assisted message passingStephen Fuld
||`- Re: Hardware assisted message passingMitchAlsup
|`- Re: Hardware assisted message passingStephen Fuld
+* Re: Hardware assisted message passingTheo Markettos
|+- Re: Hardware assisted message passingStephen Fuld
|+* Re: Hardware assisted message passingMitchAlsup
||`* Re: Hardware assisted message passingEricP
|| `* Re: Hardware assisted message passingMitchAlsup
||  `- Re: Hardware assisted message passingBGB
|`* Re: Hardware assisted message passingEricP
| `* Re: Hardware assisted message passingGeorge Neuner
|  `* Re: Hardware assisted message passingEricP
|   +- Re: Hardware assisted message passingEricP
|   `* Re: Hardware assisted message passingGeorge Neuner
|    `- Re: Hardware assisted message passingEricP
`* Re: Hardware assisted message passingMitchAlsup
 +* Re: Hardware assisted message passingThomas Koenig
 |`- Re: Hardware assisted message passingMitchAlsup
 +* Re: Hardware assisted message passingStephen Fuld
 |+- Re: Hardware assisted message passingMitchAlsup
 |`* Re: Hardware assisted message passingMitchAlsup
 | `- Re: Hardware assisted message passingStephen Fuld
 +* Re: Hardware assisted message passingEricP
 |+* Re: Hardware assisted message passingMitchAlsup
 ||+* Re: Hardware assisted message passingIvan Godard
 |||`- Re: Hardware assisted message passingMitchAlsup
 ||+* Re: Hardware assisted message passingStephen Fuld
 |||+* Re: Hardware assisted message passingMitchAlsup
 ||||`- Re: Hardware assisted message passingMitchAlsup
 |||`- Re: Hardware assisted message passingEricP
 ||`- Re: Hardware assisted message passingEricP
 |`* Re: Hardware assisted message passingNiklas Holsti
 | +- Re: Hardware assisted message passingMitchAlsup
 | `* Re: Hardware assisted message passingEricP
 |  `* Re: Hardware assisted message passingNiklas Holsti
 |   `* Re: Hardware assisted message passingEricP
 |    +* Re: Hardware assisted message passingNiklas Holsti
 |    |`* Re: Hardware assisted message passingEricP
 |    | +* Re: Hardware assisted message passingStefan Monnier
 |    | |`- Re: Hardware assisted message passingEricP
 |    | `* Re: Hardware assisted message passingNiklas Holsti
 |    |  +* Re: Hardware assisted message passingMitchAlsup
 |    |  |`* Re: Hardware assisted message passingNiklas Holsti
 |    |  | `* Re: Hardware assisted message passingMitchAlsup
 |    |  |  `* Re: Hardware assisted message passingNiklas Holsti
 |    |  |   +* Re: Hardware assisted message passingMitchAlsup
 |    |  |   |`- Re: Hardware assisted message passingNiklas Holsti
 |    |  |   `* Re: Hardware assisted message passingStephen Fuld
 |    |  |    `* Re: Hardware assisted message passingNiklas Holsti
 |    |  |     `* Re: Hardware assisted message passingStephen Fuld
 |    |  |      +* Re: Hardware assisted message passingMitchAlsup
 |    |  |      |`- Re: Hardware assisted message passingStephen Fuld
 |    |  |      `* Re: Hardware assisted message passingNiklas Holsti
 |    |  |       +* Re: Hardware assisted message passingMitchAlsup
 |    |  |       |`* Re: Hardware assisted message passingNiklas Holsti
 |    |  |       | `* Re: Hardware assisted message passingMitchAlsup
 |    |  |       |  `* Re: Hardware assisted message passingNiklas Holsti
 |    |  |       |   +* Re: Hardware assisted message passingIvan Godard
 |    |  |       |   |`* Re: Hardware assisted message passingNiklas Holsti
 |    |  |       |   | +- Re: Hardware assisted message passingIvan Godard
 |    |  |       |   | `* Re: Hardware assisted message passingStephen Fuld
 |    |  |       |   |  `* Re: Hardware assisted message passingMitchAlsup
 |    |  |       |   |   `* Re: Hardware assisted short message passingMitchAlsup
 |    |  |       |   |    `* Re: Hardware assisted short message passingStephen Fuld
 |    |  |       |   |     `* Re: Hardware assisted short message passingMitchAlsup
 |    |  |       |   |      `* Re: Hardware assisted short message passingStephen Fuld
 |    |  |       |   |       +- Re: Hardware assisted short message passingMitchAlsup
 |    |  |       |   |       +- Re: Hardware assisted short message passingrobf...@gmail.com
 |    |  |       |   |       `- Re: Hardware assisted short message passingMitchAlsup
 |    |  |       |   `- Re: Hardware assisted message passingMitchAlsup
 |    |  |       `- Re: Hardware assisted message passingIvan Godard
 |    |  `* Re: Hardware assisted message passingEricP
 |    |   `* Re: Hardware assisted message passingNiklas Holsti
 |    |    `* Re: Hardware assisted message passingEricP
 |    |     `- Re: Hardware assisted message passingNiklas Holsti
 |    `* Re: Hardware assisted message passingMitchAlsup
 |     `* Re: Hardware assisted message passingEricP
 |      +* Re: Hardware assisted message passingNiklas Holsti
 |      |`- Re: Hardware assisted message passingEricP
 |      `- Re: Hardware assisted message passingNiklas Holsti
 `* Re: Hardware assisted message passingBakul Shah
  `* Re: Hardware assisted message passingMitchAlsup
   +* Re: Hardware assisted message passingBakul Shah
   |+- Re: Hardware assisted message passingMitchAlsup
   |`* Re: Hardware assisted message passingIvan Godard
   | +- Re: Hardware assisted message passingMitchAlsup
   | `* Re: Hardware assisted message passingBakul Shah
   |  `* Re: Hardware assisted message passingIvan Godard
   |   `* Re: Hardware assisted message passingBakul Shah
   |    `- Re: Hardware assisted message passingMitchAlsup
   `* Re: Hardware assisted message passingBakul Shah
    `- Re: Hardware assisted message passingMitchAlsup

Pages:1234
Re: Hardware assisted message passing

<sp2ru2$mah$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=22276&group=comp.arch#22276

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: sfu...@alumni.cmu.edu.invalid (Stephen Fuld)
Newsgroups: comp.arch
Subject: Re: Hardware assisted message passing
Date: Sat, 11 Dec 2021 10:50:42 -0800
Organization: A noiseless patient Spider
Lines: 90
Message-ID: <sp2ru2$mah$1@dont-email.me>
References: <so2u87$tbg$1@dont-email.me>
<e6d5d393-a57e-4e5d-9632-fa2fda932dc0n@googlegroups.com>
<u1xrJ.95050$np6.11511@fx46.iad> <j18kaiFibh7U1@mid.individual.net>
<nBasJ.78885$JZ3.18060@fx05.iad> <j1dtflFiurcU1@mid.individual.net>
<66rsJ.178509$IW4.13731@fx48.iad> <j1f5b5Fqi1oU1@mid.individual.net>
<X%LsJ.69620$IB7.16827@fx02.iad> <j1hnjtFb3giU1@mid.individual.net>
<6b46e828-eb3a-425f-8d99-df538fcfbb58n@googlegroups.com>
<j1hru9FbsqqU1@mid.individual.net>
<885b2425-a5ac-4ab2-9c43-732cb3814704n@googlegroups.com>
<j1i1ssFcuvcU1@mid.individual.net> <sp1eht$ffl$1@dont-email.me>
<j1jghuFl8nkU1@mid.individual.net> <sp2k57$1je$1@dont-email.me>
<96209fc3-696a-4f83-a0c9-b8dcbf20325en@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 11 Dec 2021 18:50:42 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="2a35ff53d20ecc7d0ccf08ca07e388e7";
logging-data="22865"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19qwJUPRpYK89kw2GX+PGj8H4uNLriyTV0="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.4.0
Cancel-Lock: sha1:5bNcFyTqgA2eGp7YVYoyZBqelaQ=
In-Reply-To: <96209fc3-696a-4f83-a0c9-b8dcbf20325en@googlegroups.com>
Content-Language: en-US
 by: Stephen Fuld - Sat, 11 Dec 2021 18:50 UTC

On 12/11/2021 10:24 AM, MitchAlsup wrote:
> On Saturday, December 11, 2021 at 10:38:03 AM UTC-6, Stephen Fuld wrote:
>> On 12/11/2021 3:32 AM, Niklas Holsti wrote:
>>> On 2021-12-11 7:56, Stephen Fuld wrote:
>>>> On 12/10/2021 2:15 PM, Niklas Holsti wrote:
>>>>> On 2021-12-10 23:27, MitchAlsup wrote:
>>>>>> On Friday, December 10, 2021 at 2:34:20 PM UTC-6, Niklas Holsti wrote:
>>>>>>> On 2021-12-10 21:45, MitchAlsup wrote:
>>>>
>>>> snip
>>>>
>>>>
>>>>>> What I was looking for is accept distribution. Thread[k] can call
>>>>>> the "read" accept point and this can be accepted by any of as
>>>>>> many accept "read" threads as are potentially running.
>>>>>
>>>>>
>>>>> That is not provided as primitive in Ada, but can be programmed, of
>>>>> course. For example, the primary rendez-vous code can "requeue" the
>>>>> call to another entry, of some task or some protected object, and
>>>>> that task or protected object can be selected from a pool of
>>>>> secondary "servers" in any way you want. The requeue statement
>>>>> completes the primary rendez-vous. The caller is still suspended on
>>>>> the requeued call, but the primary server is released to continue its
>>>>> work, usually by accepting the next call.
>>>>
>>>> But do you have to program all of this "requeueing" yourself?
>>>
>>>
>>> You do have to program the "requeue" statements, yes, and the logic to
>>> select the target of the requeue (the "secondary server").
>>>
>>>
>>>> And in particular, do you have to set up locks for the queues,
>>>> request exclusive access to them, etc.?
>>>
>>> Mainly no; the Ada run-time system handles the queueing of entry calls
>>> to entries, as well as the exlusive access or other protections
>>> intrinsic to Ada tasks and Ada protected objects. Of course that can
>>> need a significant amount of code in the run-time system.
>>>
>>>
>>>> This is just the kind of thing that the hardware assisted message
>>>> passing was designed to eliminate. :-(
>>>
>>> So perhaps this sub-thread is not much off-topic after all.
>> I was too quick in my reply. I shouldn't have said "hardware assisted"
>> above. It is really message passing that is designed to eliminate the
>> need to program the queues, etc. The hardware assist just makes it more
>> efficient.
>>
>> From my interpretation of your description, in the current Ada system,
>> it seems to require shared memory between the "sender", and all of the
>> "receivers", as they must access the common queues, etc. Is that true?
> <
> I can envision a system where one-guy owns and controls the queues
> and has the ability to send messages to <basically> wake up various
> threads.
> <
> I can envision that these woken up threads take a look at their CPU-affinity-set
> and decide whether and who to context switch.

I can too. But it was just my (perhaps mistaken) interpretation of
Nick's description that it wasn't the way Ada worked.

> <
> I further envision that this one-guy is NOT a CPU and is not running "instructions"
> but just queueing commands.

Could be. But somewhere there has to be some asynch (by my previous
definition) stuff going on, so that the originating thread can cause
multiple messages to be sent without waiting for a response from the
first one. I can envision several mechanisms for this.

>> If so, then a message passing based system could help, as it could
>> eliminate that requirement, allowing much more flexibility in allocating
>> processes to different processors not sharing memory with the "sending"
>> process.

Agreed, provided the asynch capability exists. And furthermore, if it
did exist, it would eliminate a lot of code, and be faster than a
software based system.

--
- Stephen Fuld
(e-mail address disguised to prevent spam)

Re: Hardware assisted message passing

<j1keafFqq8aU1@mid.individual.net>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=22277&group=comp.arch#22277

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: niklas.h...@tidorum.invalid (Niklas Holsti)
Newsgroups: comp.arch
Subject: Re: Hardware assisted message passing
Date: Sat, 11 Dec 2021 22:00:13 +0200
Organization: Tidorum Ltd
Lines: 66
Message-ID: <j1keafFqq8aU1@mid.individual.net>
References: <so2u87$tbg$1@dont-email.me>
<e6d5d393-a57e-4e5d-9632-fa2fda932dc0n@googlegroups.com>
<u1xrJ.95050$np6.11511@fx46.iad> <j18kaiFibh7U1@mid.individual.net>
<nBasJ.78885$JZ3.18060@fx05.iad> <j1dtflFiurcU1@mid.individual.net>
<66rsJ.178509$IW4.13731@fx48.iad> <j1f5b5Fqi1oU1@mid.individual.net>
<X%LsJ.69620$IB7.16827@fx02.iad> <j1hnjtFb3giU1@mid.individual.net>
<MKTsJ.54336$cW6.15149@fx08.iad> <j1jf2cFkv2lU1@mid.individual.net>
<EG5tJ.116847$VS2.50443@fx44.iad>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: individual.net +NSTIt+Jf0oYavBnZZPzGw/i3VFacZDZAvamFdomdTYCjsAihl
Cancel-Lock: sha1:zqAs50sQblLNeCDRVVuxc1/66xM=
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0)
Gecko/20100101 Thunderbird/78.14.0
In-Reply-To: <EG5tJ.116847$VS2.50443@fx44.iad>
Content-Language: en-US
 by: Niklas Holsti - Sat, 11 Dec 2021 20:00 UTC

On 2021-12-11 19:59, EricP wrote:
> Niklas Holsti wrote:
>> On 2021-12-11 4:08, EricP wrote:

[snip]

>>> Select statements with multiple OR options, possibly with guards,
>>> allow entrys and accepts to atomically wait in multiple queues at once,
>>> with multiple possible timers.
>>> When a client entry matches a server accept they bind and dequeue
>>> all other options and timers atomically at once.
>>
>>
>> Only the timers are dequeued (cancelled). The other (non-selected)
>> calls remain pending while the selected client call is executed in a
>> rendez-vous, and then also until the next execution of the select
>> statement.
>
> Yes. sorry, that was me misremembering how an entry select statement works.

And I did not notice that you were speaking of both the select-accept
statement and the select-(entry call) statement. The latter, while using
the "select" and "end select" syntax, is formally called a "conditional
entry call" if it has an "else", and a "timed entry call" if it has a
"delay".

> I remembered that Ada accept statement could have a select statement
> to allow multiple accept alternatives at once.
>
>   select
>    accept A (...);
>   or
>    accept B (...);
>   end select;
>
> I had, mistakenly, thought that an entry select statement also allowed
> multiple entry options to select different servers based on which accept
> is available first. Something like:
>
>    entry A (...);
>    entry B (...);
>    entry C (...);
>
>   select
>    A (...);
>   or
>    B (...);
>   or
>    C (...);
>   or
>    delay 123.4;
>   end select;
>
> But looking at the Ada LRM I see that it does _not_ allow multiple
> entry choices, just a delay or an ELSE option.

Right.

While I've never seen a full explanation of why multiple entry call
choices are not allowed, probably implementors felt it would be too
complicated and no Ada users came up with strong examples showing a need
for such constructs. The Ada language definition team tends not to
accept proposals for "nice to have" features.

Re: Hardware assisted message passing

<j1kf6eFqv51U1@mid.individual.net>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=22278&group=comp.arch#22278

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: niklas.h...@tidorum.invalid (Niklas Holsti)
Newsgroups: comp.arch
Subject: Re: Hardware assisted message passing
Date: Sat, 11 Dec 2021 22:15:07 +0200
Organization: Tidorum Ltd
Lines: 81
Message-ID: <j1kf6eFqv51U1@mid.individual.net>
References: <so2u87$tbg$1@dont-email.me>
<e6d5d393-a57e-4e5d-9632-fa2fda932dc0n@googlegroups.com>
<u1xrJ.95050$np6.11511@fx46.iad> <j18kaiFibh7U1@mid.individual.net>
<nBasJ.78885$JZ3.18060@fx05.iad> <j1dtflFiurcU1@mid.individual.net>
<66rsJ.178509$IW4.13731@fx48.iad> <j1f5b5Fqi1oU1@mid.individual.net>
<X%LsJ.69620$IB7.16827@fx02.iad> <j1hnjtFb3giU1@mid.individual.net>
<6b46e828-eb3a-425f-8d99-df538fcfbb58n@googlegroups.com>
<j1hru9FbsqqU1@mid.individual.net>
<885b2425-a5ac-4ab2-9c43-732cb3814704n@googlegroups.com>
<j1i1ssFcuvcU1@mid.individual.net> <sp1eht$ffl$1@dont-email.me>
<j1jghuFl8nkU1@mid.individual.net> <sp2k57$1je$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: individual.net a2+P4aH26F5QhnvoX2WgOgAix4XIwa0tBe+7Ekekhp6sJCCzxi
Cancel-Lock: sha1:ucqMGZz67wJHIba3rY6FaNWUhkU=
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0)
Gecko/20100101 Thunderbird/78.14.0
In-Reply-To: <sp2k57$1je$1@dont-email.me>
Content-Language: en-US
 by: Niklas Holsti - Sat, 11 Dec 2021 20:15 UTC

On 2021-12-11 18:37, Stephen Fuld wrote:
> On 12/11/2021 3:32 AM, Niklas Holsti wrote:
>> On 2021-12-11 7:56, Stephen Fuld wrote:
>>> On 12/10/2021 2:15 PM, Niklas Holsti wrote:
>>>> On 2021-12-10 23:27, MitchAlsup wrote:
>>>>> On Friday, December 10, 2021 at 2:34:20 PM UTC-6, Niklas Holsti wrote:
>>>>>> On 2021-12-10 21:45, MitchAlsup wrote:
>>>
>>> snip
>>>
>>>
>>>>> What I was looking for is accept distribution. Thread[k] can call
>>>>> the "read" accept point and this can be accepted by any of as
>>>>> many accept "read" threads as are potentially running.
>>>>
>>>>
>>>> That is not provided as primitive in Ada, but can be programmed, of
>>>> course. For example, the primary rendez-vous code can "requeue" the
>>>> call to another entry, of some task or some protected object, and
>>>> that task or protected object can be selected from a pool of
>>>> secondary "servers" in any way you want. The requeue statement
>>>> completes the primary rendez-vous. The caller is still suspended on
>>>> the requeued call, but the primary server is released to continue
>>>> its work, usually by accepting the next call.
>>>
>>> But do you have to program all of this "requeueing" yourself?
>>
>>
>> You do have to program the "requeue" statements, yes, and the logic to
>> select the target of the requeue (the "secondary server").
>>
>>
>>> And in particular, do you have to set up locks for the queues,
>>> request exclusive access to them, etc.?
>>
>> Mainly no; the Ada run-time system handles the queueing of entry calls
>> to entries, as well as the exlusive access or other protections
>> intrinsic to Ada tasks and Ada protected objects. Of course that can
>> need a significant amount of code in the run-time system.
>>
>>
>>> This is just the kind of thing that the hardware assisted message
>>> passing was designed to eliminate.  :-(
>>
>> So perhaps this sub-thread is not much off-topic after all.
>
> I was too quick in my reply.  I shouldn't have said "hardware assisted"
> above.  It is really message passing that is designed to eliminate the
> need to program the queues, etc.  The hardware assist just makes it more
> efficient.
>
> From my interpretation of your description, in the current Ada system,
> it seems to require shared memory between the "sender", and all of the
> "receivers", as they must access the common queues, etc.  Is that true?

Not only must the queues be shared, but the parameters in an entry call
can be passed by reference, which requires shared memory.

Ada tasking and inter-task communication does basically assume a
shared-memory system. For example, different tasks can access the same
global variables if the module structure makes them visible to those tasks.

>  If so, then a message passing based system could help, as it could
> eliminate that requirement, allowing much more flexibility in allocating
> processes to different processors not sharing memory with the "sending"
> process.

I suppose an Ada-like inter-task communication system could be built on
message passing, with the restriction that messages ("entry calls")
could use only pass-by-value parameters or pass by copy-in copy-out
parameters.

For communicating between program parts in separate memory spaces the
"distributed systems" feature was added to Ada
(http://www.ada-auth.org/standards/rm12_w_tc1/html/RM-E.html) but as
said earlier in this thread that feature is more or less obsolete. It
was based on RPC, so HW-assisted messages could certainly be used in its
implementation, at least if longish messages are possible.

Re: Hardware assisted message passing

<e4a303c4-a25c-4ffe-b67e-9c3610dd36dbn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=22279&group=comp.arch#22279

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a05:620a:e0c:: with SMTP id y12mr26660507qkm.109.1639254832082;
Sat, 11 Dec 2021 12:33:52 -0800 (PST)
X-Received: by 2002:aca:eb0b:: with SMTP id j11mr19388737oih.51.1639254831820;
Sat, 11 Dec 2021 12:33:51 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Sat, 11 Dec 2021 12:33:51 -0800 (PST)
In-Reply-To: <j1kf6eFqv51U1@mid.individual.net>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:fd9b:837b:5305:7003;
posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:fd9b:837b:5305:7003
References: <so2u87$tbg$1@dont-email.me> <e6d5d393-a57e-4e5d-9632-fa2fda932dc0n@googlegroups.com>
<u1xrJ.95050$np6.11511@fx46.iad> <j18kaiFibh7U1@mid.individual.net>
<nBasJ.78885$JZ3.18060@fx05.iad> <j1dtflFiurcU1@mid.individual.net>
<66rsJ.178509$IW4.13731@fx48.iad> <j1f5b5Fqi1oU1@mid.individual.net>
<X%LsJ.69620$IB7.16827@fx02.iad> <j1hnjtFb3giU1@mid.individual.net>
<6b46e828-eb3a-425f-8d99-df538fcfbb58n@googlegroups.com> <j1hru9FbsqqU1@mid.individual.net>
<885b2425-a5ac-4ab2-9c43-732cb3814704n@googlegroups.com> <j1i1ssFcuvcU1@mid.individual.net>
<sp1eht$ffl$1@dont-email.me> <j1jghuFl8nkU1@mid.individual.net>
<sp2k57$1je$1@dont-email.me> <j1kf6eFqv51U1@mid.individual.net>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <e4a303c4-a25c-4ffe-b67e-9c3610dd36dbn@googlegroups.com>
Subject: Re: Hardware assisted message passing
From: MitchAl...@aol.com (MitchAlsup)
Injection-Date: Sat, 11 Dec 2021 20:33:52 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 108
 by: MitchAlsup - Sat, 11 Dec 2021 20:33 UTC

On Saturday, December 11, 2021 at 2:15:13 PM UTC-6, Niklas Holsti wrote:
> On 2021-12-11 18:37, Stephen Fuld wrote:
> > On 12/11/2021 3:32 AM, Niklas Holsti wrote:
> >> On 2021-12-11 7:56, Stephen Fuld wrote:
> >>> On 12/10/2021 2:15 PM, Niklas Holsti wrote:
> >>>> On 2021-12-10 23:27, MitchAlsup wrote:
> >>>>> On Friday, December 10, 2021 at 2:34:20 PM UTC-6, Niklas Holsti wrote:
> >>>>>> On 2021-12-10 21:45, MitchAlsup wrote:
> >>>
> >>> snip
> >>>
> >>>
> >>>>> What I was looking for is accept distribution. Thread[k] can call
> >>>>> the "read" accept point and this can be accepted by any of as
> >>>>> many accept "read" threads as are potentially running.
> >>>>
> >>>>
> >>>> That is not provided as primitive in Ada, but can be programmed, of
> >>>> course. For example, the primary rendez-vous code can "requeue" the
> >>>> call to another entry, of some task or some protected object, and
> >>>> that task or protected object can be selected from a pool of
> >>>> secondary "servers" in any way you want. The requeue statement
> >>>> completes the primary rendez-vous. The caller is still suspended on
> >>>> the requeued call, but the primary server is released to continue
> >>>> its work, usually by accepting the next call.
> >>>
> >>> But do you have to program all of this "requeueing" yourself?
> >>
> >>
> >> You do have to program the "requeue" statements, yes, and the logic to
> >> select the target of the requeue (the "secondary server").
> >>
> >>
> >>> And in particular, do you have to set up locks for the queues,
> >>> request exclusive access to them, etc.?
> >>
> >> Mainly no; the Ada run-time system handles the queueing of entry calls
> >> to entries, as well as the exlusive access or other protections
> >> intrinsic to Ada tasks and Ada protected objects. Of course that can
> >> need a significant amount of code in the run-time system.
> >>
> >>
> >>> This is just the kind of thing that the hardware assisted message
> >>> passing was designed to eliminate. :-(
> >>
> >> So perhaps this sub-thread is not much off-topic after all.
> >
> > I was too quick in my reply. I shouldn't have said "hardware assisted"
> > above. It is really message passing that is designed to eliminate the
> > need to program the queues, etc. The hardware assist just makes it more
> > efficient.
> >
> > From my interpretation of your description, in the current Ada system,
> > it seems to require shared memory between the "sender", and all of the
> > "receivers", as they must access the common queues, etc. Is that true?
<
> Not only must the queues be shared, but the parameters in an entry call
> can be passed by reference, which requires shared memory.
<
Err, not quite.
<
If one passes a pointer, and there is a means to access through that pointer
in the callers address space (rather than the callees address space) one
does not actually need shared memory.
<
Consider traps in a PDP-11/70 where an application traps to the OS to perform
a <disk> read.
a) sure; the OS needs to be able to access (and verify permissions) to the
buffer supplied by application
b) but the OS uses the entire 16-bit virtual address space itself
c) so, there can be no actual sharing
d) but OS can still access pointer memory using the LD-from and ST-to
memory reference instructions.
<
Consider a similar trap as above where the OS resides on a computer
at the front of the airplane and the request came from a computer at
the back of the airplane, and the front of airplane computer performs the
read and uses the network to ship the <now full> buffer back to requestor.
<
Neither example needs shared memory, both pass pointers.
>
> Ada tasking and inter-task communication does basically assume a
> shared-memory system. For example, different tasks can access the same
> global variables if the module structure makes them visible to those tasks.
<
It seems to me that as long as the compiler binds the pointer with the address
space the memory model can be significantly freed up (PDP-11/70 style.)
After binding {to:from} with pointer, one can access his space far after any
rendezvous has transpired. Inside the rendezvous, no locking is required;
outside of the rendezvous locking may (MAY) be required.
<
> > If so, then a message passing based system could help, as it could
> > eliminate that requirement, allowing much more flexibility in allocating
> > processes to different processors not sharing memory with the "sending"
> > process.
<
> I suppose an Ada-like inter-task communication system could be built on
> message passing, with the restriction that messages ("entry calls")
> could use only pass-by-value parameters or pass by copy-in copy-out
> parameters.
<
Using PDP-11/70 mechanics, there is no need for this restriction.
>
> For communicating between program parts in separate memory spaces the
> "distributed systems" feature was added to Ada
> (http://www.ada-auth.org/standards/rm12_w_tc1/html/RM-E.html) but as
> said earlier in this thread that feature is more or less obsolete. It
> was based on RPC, so HW-assisted messages could certainly be used in its
> implementation, at least if longish messages are possible.

Re: Hardware assisted message passing

<j1kig0FrhmkU1@mid.individual.net>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=22280&group=comp.arch#22280

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: niklas.h...@tidorum.invalid (Niklas Holsti)
Newsgroups: comp.arch
Subject: Re: Hardware assisted message passing
Date: Sat, 11 Dec 2021 23:11:28 +0200
Organization: Tidorum Ltd
Lines: 99
Message-ID: <j1kig0FrhmkU1@mid.individual.net>
References: <so2u87$tbg$1@dont-email.me>
<e6d5d393-a57e-4e5d-9632-fa2fda932dc0n@googlegroups.com>
<u1xrJ.95050$np6.11511@fx46.iad> <j18kaiFibh7U1@mid.individual.net>
<nBasJ.78885$JZ3.18060@fx05.iad> <j1dtflFiurcU1@mid.individual.net>
<66rsJ.178509$IW4.13731@fx48.iad> <j1f5b5Fqi1oU1@mid.individual.net>
<X%LsJ.69620$IB7.16827@fx02.iad> <j1hnjtFb3giU1@mid.individual.net>
<6b46e828-eb3a-425f-8d99-df538fcfbb58n@googlegroups.com>
<j1hru9FbsqqU1@mid.individual.net>
<885b2425-a5ac-4ab2-9c43-732cb3814704n@googlegroups.com>
<j1i1ssFcuvcU1@mid.individual.net> <sp1eht$ffl$1@dont-email.me>
<j1jghuFl8nkU1@mid.individual.net> <sp2k57$1je$1@dont-email.me>
<j1kf6eFqv51U1@mid.individual.net>
<e4a303c4-a25c-4ffe-b67e-9c3610dd36dbn@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: individual.net PjkooN5EJv9K0eRd7CZCpQIPi9ItVpUMcbO4YcRP6wAEsH/evW
Cancel-Lock: sha1:adhTFVTi6pTAzV6ZOwzVt8NfEKY=
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0)
Gecko/20100101 Thunderbird/78.14.0
In-Reply-To: <e4a303c4-a25c-4ffe-b67e-9c3610dd36dbn@googlegroups.com>
Content-Language: en-US
 by: Niklas Holsti - Sat, 11 Dec 2021 21:11 UTC

On 2021-12-11 22:33, MitchAlsup wrote:
> On Saturday, December 11, 2021 at 2:15:13 PM UTC-6, Niklas Holsti wrote:
>> On 2021-12-11 18:37, Stephen Fuld wrote:
>>> On 12/11/2021 3:32 AM, Niklas Holsti wrote:
>>>> On 2021-12-11 7:56, Stephen Fuld wrote:
>>>>> On 12/10/2021 2:15 PM, Niklas Holsti wrote:
>>>>>> On 2021-12-10 23:27, MitchAlsup wrote:
>>>>>>> On Friday, December 10, 2021 at 2:34:20 PM UTC-6, Niklas Holsti wrote:
>>>>>>>> On 2021-12-10 21:45, MitchAlsup wrote:
>>>>>
>>>>> snip
>>>>>
>>>>>
>>>>>>> What I was looking for is accept distribution. Thread[k] can call
>>>>>>> the "read" accept point and this can be accepted by any of as
>>>>>>> many accept "read" threads as are potentially running.
>>>>>>
>>>>>>
>>>>>> That is not provided as primitive in Ada, but can be programmed, of
>>>>>> course. For example, the primary rendez-vous code can "requeue" the
>>>>>> call to another entry, of some task or some protected object, and
>>>>>> that task or protected object can be selected from a pool of
>>>>>> secondary "servers" in any way you want. The requeue statement
>>>>>> completes the primary rendez-vous. The caller is still suspended on
>>>>>> the requeued call, but the primary server is released to continue
>>>>>> its work, usually by accepting the next call.
>>>>>
>>>>> But do you have to program all of this "requeueing" yourself?
>>>>
>>>>
>>>> You do have to program the "requeue" statements, yes, and the logic to
>>>> select the target of the requeue (the "secondary server").
>>>>
>>>>
>>>>> And in particular, do you have to set up locks for the queues,
>>>>> request exclusive access to them, etc.?
>>>>
>>>> Mainly no; the Ada run-time system handles the queueing of entry calls
>>>> to entries, as well as the exlusive access or other protections
>>>> intrinsic to Ada tasks and Ada protected objects. Of course that can
>>>> need a significant amount of code in the run-time system.
>>>>
>>>>
>>>>> This is just the kind of thing that the hardware assisted message
>>>>> passing was designed to eliminate. :-(
>>>>
>>>> So perhaps this sub-thread is not much off-topic after all.
>>>
>>> I was too quick in my reply. I shouldn't have said "hardware assisted"
>>> above. It is really message passing that is designed to eliminate the
>>> need to program the queues, etc. The hardware assist just makes it more
>>> efficient.
>>>
>>> From my interpretation of your description, in the current Ada system,
>>> it seems to require shared memory between the "sender", and all of the
>>> "receivers", as they must access the common queues, etc. Is that true?
> <
>> Not only must the queues be shared, but the parameters in an entry call
>> can be passed by reference, which requires shared memory.
> <
> Err, not quite.
> <
> If one passes a pointer, and there is a means to access through that pointer
> in the callers address space (rather than the callees address space) one
> does not actually need shared memory.
> <
> Consider traps in a PDP-11/70 where an application traps to the OS to perform
> a <disk> read.
> a) sure; the OS needs to be able to access (and verify permissions) to the
> buffer supplied by application
> b) but the OS uses the entire 16-bit virtual address space itself
> c) so, there can be no actual sharing
> d) but OS can still access pointer memory using the LD-from and ST-to
> memory reference instructions.

Ok, but then it becomes a question of defining what "shared memory"
actually means... if the callee can access the caller's memory almost as
immediately and rapidly as its own memory, that sounds like "shared"
even if the address spaces are not the same.

In the general case (not just application-to-OS calls) you would have to
allow for local calls (same address space) as well as remote calls
(different address spaces) so the call-by-reference parameter would have
to include also an address-space identifier, in effect making it an
extended address into a shared (but partitioned) memory.

> Consider a similar trap as above where the OS resides on a computer
> at the front of the airplane and the request came from a computer at
> the back of the airplane, and the front of airplane computer performs the
> read and uses the network to ship the <now full> buffer back to requestor.
> <
> Neither example needs shared memory, both pass pointers.

Huh? If you "ship the full buffer" over the network, that sounds to me
like a pass-by-value ("out") parameter.

Re: Hardware assisted message passing

<eca569b2-1bd3-472a-b264-7edc1ac5a71fn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=22281&group=comp.arch#22281

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a37:a956:: with SMTP id s83mr5009559qke.500.1639258604362;
Sat, 11 Dec 2021 13:36:44 -0800 (PST)
X-Received: by 2002:a4a:af02:: with SMTP id w2mr13792960oon.7.1639258604042;
Sat, 11 Dec 2021 13:36:44 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Sat, 11 Dec 2021 13:36:43 -0800 (PST)
In-Reply-To: <j1kig0FrhmkU1@mid.individual.net>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:fd9b:837b:5305:7003;
posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:fd9b:837b:5305:7003
References: <so2u87$tbg$1@dont-email.me> <e6d5d393-a57e-4e5d-9632-fa2fda932dc0n@googlegroups.com>
<u1xrJ.95050$np6.11511@fx46.iad> <j18kaiFibh7U1@mid.individual.net>
<nBasJ.78885$JZ3.18060@fx05.iad> <j1dtflFiurcU1@mid.individual.net>
<66rsJ.178509$IW4.13731@fx48.iad> <j1f5b5Fqi1oU1@mid.individual.net>
<X%LsJ.69620$IB7.16827@fx02.iad> <j1hnjtFb3giU1@mid.individual.net>
<6b46e828-eb3a-425f-8d99-df538fcfbb58n@googlegroups.com> <j1hru9FbsqqU1@mid.individual.net>
<885b2425-a5ac-4ab2-9c43-732cb3814704n@googlegroups.com> <j1i1ssFcuvcU1@mid.individual.net>
<sp1eht$ffl$1@dont-email.me> <j1jghuFl8nkU1@mid.individual.net>
<sp2k57$1je$1@dont-email.me> <j1kf6eFqv51U1@mid.individual.net>
<e4a303c4-a25c-4ffe-b67e-9c3610dd36dbn@googlegroups.com> <j1kig0FrhmkU1@mid.individual.net>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <eca569b2-1bd3-472a-b264-7edc1ac5a71fn@googlegroups.com>
Subject: Re: Hardware assisted message passing
From: MitchAl...@aol.com (MitchAlsup)
Injection-Date: Sat, 11 Dec 2021 21:36:44 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 164
 by: MitchAlsup - Sat, 11 Dec 2021 21:36 UTC

On Saturday, December 11, 2021 at 3:11:30 PM UTC-6, Niklas Holsti wrote:
> On 2021-12-11 22:33, MitchAlsup wrote:
> > On Saturday, December 11, 2021 at 2:15:13 PM UTC-6, Niklas Holsti wrote:
> >> On 2021-12-11 18:37, Stephen Fuld wrote:
> >>> On 12/11/2021 3:32 AM, Niklas Holsti wrote:
> >>>> On 2021-12-11 7:56, Stephen Fuld wrote:
> >>>>> On 12/10/2021 2:15 PM, Niklas Holsti wrote:
> >>>>>> On 2021-12-10 23:27, MitchAlsup wrote:
> >>>>>>> On Friday, December 10, 2021 at 2:34:20 PM UTC-6, Niklas Holsti wrote:
> >>>>>>>> On 2021-12-10 21:45, MitchAlsup wrote:
> >>>>>
> >>>>> snip
> >>>>>
> >>>>>
> >>>>>>> What I was looking for is accept distribution. Thread[k] can call
> >>>>>>> the "read" accept point and this can be accepted by any of as
> >>>>>>> many accept "read" threads as are potentially running.
> >>>>>>
> >>>>>>
> >>>>>> That is not provided as primitive in Ada, but can be programmed, of
> >>>>>> course. For example, the primary rendez-vous code can "requeue" the
> >>>>>> call to another entry, of some task or some protected object, and
> >>>>>> that task or protected object can be selected from a pool of
> >>>>>> secondary "servers" in any way you want. The requeue statement
> >>>>>> completes the primary rendez-vous. The caller is still suspended on
> >>>>>> the requeued call, but the primary server is released to continue
> >>>>>> its work, usually by accepting the next call.
> >>>>>
> >>>>> But do you have to program all of this "requeueing" yourself?
> >>>>
> >>>>
> >>>> You do have to program the "requeue" statements, yes, and the logic to
> >>>> select the target of the requeue (the "secondary server").
> >>>>
> >>>>
> >>>>> And in particular, do you have to set up locks for the queues,
> >>>>> request exclusive access to them, etc.?
> >>>>
> >>>> Mainly no; the Ada run-time system handles the queueing of entry calls
> >>>> to entries, as well as the exlusive access or other protections
> >>>> intrinsic to Ada tasks and Ada protected objects. Of course that can
> >>>> need a significant amount of code in the run-time system.
> >>>>
> >>>>
> >>>>> This is just the kind of thing that the hardware assisted message
> >>>>> passing was designed to eliminate. :-(
> >>>>
> >>>> So perhaps this sub-thread is not much off-topic after all.
> >>>
> >>> I was too quick in my reply. I shouldn't have said "hardware assisted"
> >>> above. It is really message passing that is designed to eliminate the
> >>> need to program the queues, etc. The hardware assist just makes it more
> >>> efficient.
> >>>
> >>> From my interpretation of your description, in the current Ada system,
> >>> it seems to require shared memory between the "sender", and all of the
> >>> "receivers", as they must access the common queues, etc. Is that true?
> > <
> >> Not only must the queues be shared, but the parameters in an entry call
> >> can be passed by reference, which requires shared memory.
> > <
> > Err, not quite.
> > <
> > If one passes a pointer, and there is a means to access through that pointer
> > in the callers address space (rather than the callees address space) one
> > does not actually need shared memory.
> > <
> > Consider traps in a PDP-11/70 where an application traps to the OS to perform
> > a <disk> read.
> > a) sure; the OS needs to be able to access (and verify permissions) to the
> > buffer supplied by application
> > b) but the OS uses the entire 16-bit virtual address space itself
> > c) so, there can be no actual sharing
> > d) but OS can still access pointer memory using the LD-from and ST-to
> > memory reference instructions.
<
> Ok, but then it becomes a question of defining what "shared memory"
> actually means... if the callee can access the caller's memory almost as
> immediately and rapidly as its own memory, that sounds like "shared"
> even if the address spaces are not the same.
<
Even since the definition of mmap we have had this "what does shared memory
actually mean" problem. Is multiple applications reading the same disk file using
shared memory ? What if the system performs the mmap "under the cover of the
disk cache" ? Network OSs can move disk sectors from node to node making
applications think they use shared memory when in reality they do not they are
using coherent disk sectors.
<
I think, in general, if several threads use LD and ST instructions to access
memory that all can see and modify rather efficiently, then the applications
see the area as shared--whether it is physically shared or not. The key words
here are "rather efficiently" and it is only memory when one uses LD and ST
instructions to access.
<
{{We have similar problems in the arena of multi-access ATOMIC events}}
>
> In the general case (not just application-to-OS calls) you would have to
> allow for local calls (same address space) as well as remote calls
> (different address spaces) so the call-by-reference parameter would have
> to include also an address-space identifier, in effect making it an
> extended address into a shared (but partitioned) memory.
<
Yes, I use PDP-11/70 to illustrate the mechanism (LD-from and ST-to)
However, I have the notion that there may be multiple spaces where
one can use the -from and -to semantics simultaneously. The binding
of the address and the ROOT pointer is a means to support the -from
and -to mechanisms far into the future.......
<
> > Consider a similar trap as above where the OS resides on a computer
> > at the front of the airplane and the request came from a computer at
> > the back of the airplane, and the front of airplane computer performs the
> > read and uses the network to ship the <now full> buffer back to requestor.
> > <
> > Neither example needs shared memory, both pass pointers.
<
> Huh? If you "ship the full buffer" over the network, that sounds to me
> like a pass-by-value ("out") parameter.
<
Caller did not ship the buffer to requestor !! This is the KEY point here.
The OS of the caller shipped the buffer after callee touched the page !
{Not a whole lot different from the case where the caller sends a page
that is currently residing on disk and no where in memory--except that
callee (¿acceptee?) may be processing on a DIFFERENT core than caller.}
<
Thus, it is delayed pass by value--the sending side passed its pointer
(this pointer is associated with a translation table (ROOT pointer) and
can be utilized any time after the original call has been performed--
including after it has returned.)

Re: Hardware assisted message passing

<sp38qe$fon$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=22282&group=comp.arch#22282

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: iva...@millcomputing.com (Ivan Godard)
Newsgroups: comp.arch
Subject: Re: Hardware assisted message passing
Date: Sat, 11 Dec 2021 14:30:38 -0800
Organization: A noiseless patient Spider
Lines: 95
Message-ID: <sp38qe$fon$1@dont-email.me>
References: <so2u87$tbg$1@dont-email.me>
<e6d5d393-a57e-4e5d-9632-fa2fda932dc0n@googlegroups.com>
<u1xrJ.95050$np6.11511@fx46.iad> <j18kaiFibh7U1@mid.individual.net>
<nBasJ.78885$JZ3.18060@fx05.iad> <j1dtflFiurcU1@mid.individual.net>
<66rsJ.178509$IW4.13731@fx48.iad> <j1f5b5Fqi1oU1@mid.individual.net>
<X%LsJ.69620$IB7.16827@fx02.iad> <j1hnjtFb3giU1@mid.individual.net>
<6b46e828-eb3a-425f-8d99-df538fcfbb58n@googlegroups.com>
<j1hru9FbsqqU1@mid.individual.net>
<885b2425-a5ac-4ab2-9c43-732cb3814704n@googlegroups.com>
<j1i1ssFcuvcU1@mid.individual.net> <sp1eht$ffl$1@dont-email.me>
<j1jghuFl8nkU1@mid.individual.net> <sp2k57$1je$1@dont-email.me>
<j1kf6eFqv51U1@mid.individual.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 11 Dec 2021 22:30:38 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="9003612aa56f38742b7adf14b38ab32a";
logging-data="16151"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/xbriUssu8MreLFIeLoAs8"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.3.2
Cancel-Lock: sha1:7QoYxJHQtwDsFRGPA4xblPrvu8o=
In-Reply-To: <j1kf6eFqv51U1@mid.individual.net>
Content-Language: en-US
 by: Ivan Godard - Sat, 11 Dec 2021 22:30 UTC

On 12/11/2021 12:15 PM, Niklas Holsti wrote:
> On 2021-12-11 18:37, Stephen Fuld wrote:
>> On 12/11/2021 3:32 AM, Niklas Holsti wrote:
>>> On 2021-12-11 7:56, Stephen Fuld wrote:
>>>> On 12/10/2021 2:15 PM, Niklas Holsti wrote:
>>>>> On 2021-12-10 23:27, MitchAlsup wrote:
>>>>>> On Friday, December 10, 2021 at 2:34:20 PM UTC-6, Niklas Holsti
>>>>>> wrote:
>>>>>>> On 2021-12-10 21:45, MitchAlsup wrote:
>>>>
>>>> snip
>>>>
>>>>
>>>>>> What I was looking for is accept distribution. Thread[k] can call
>>>>>> the "read" accept point and this can be accepted by any of as
>>>>>> many accept "read" threads as are potentially running.
>>>>>
>>>>>
>>>>> That is not provided as primitive in Ada, but can be programmed, of
>>>>> course. For example, the primary rendez-vous code can "requeue" the
>>>>> call to another entry, of some task or some protected object, and
>>>>> that task or protected object can be selected from a pool of
>>>>> secondary "servers" in any way you want. The requeue statement
>>>>> completes the primary rendez-vous. The caller is still suspended on
>>>>> the requeued call, but the primary server is released to continue
>>>>> its work, usually by accepting the next call.
>>>>
>>>> But do you have to program all of this "requeueing" yourself?
>>>
>>>
>>> You do have to program the "requeue" statements, yes, and the logic
>>> to select the target of the requeue (the "secondary server").
>>>
>>>
>>>> And in particular, do you have to set up locks for the queues,
>>>> request exclusive access to them, etc.?
>>>
>>> Mainly no; the Ada run-time system handles the queueing of entry
>>> calls to entries, as well as the exlusive access or other protections
>>> intrinsic to Ada tasks and Ada protected objects. Of course that can
>>> need a significant amount of code in the run-time system.
>>>
>>>
>>>> This is just the kind of thing that the hardware assisted message
>>>> passing was designed to eliminate.  :-(
>>>
>>> So perhaps this sub-thread is not much off-topic after all.
>>
>> I was too quick in my reply.  I shouldn't have said "hardware
>> assisted" above.  It is really message passing that is designed to
>> eliminate the need to program the queues, etc.  The hardware assist
>> just makes it more efficient.
>>
>>  From my interpretation of your description, in the current Ada
>> system, it seems to require shared memory between the "sender", and
>> all of the "receivers", as they must access the common queues, etc.
>> Is that true?
>
>
> Not only must the queues be shared, but the parameters in an entry call
> can be passed by reference, which requires shared memory.
>
> Ada tasking and inter-task communication does basically assume a
> shared-memory system. For example, different tasks can access the same
> global variables if the module structure makes them visible to those tasks.
>
>
>>   If so, then a message passing based system could help, as it could
>> eliminate that requirement, allowing much more flexibility in
>> allocating processes to different processors not sharing memory with
>> the "sending" process.
>
>
> I suppose an Ada-like inter-task communication system could be built on
> message passing, with the restriction that messages ("entry calls")
> could use only pass-by-value parameters or pass by copy-in copy-out
> parameters.

You could do pass-by-reference without shared memory, too, by using
thunks to turn it into pass-by-name like Algol60. A reference would look
to the program like a memory fetch, but under the hood is actually a
function call that sends a value-request message.

Slow of course, but if the messaging were hardware it should be fairly
close to a remote fetch in shared memory. Remote fetch is going to be
long latency due to SOL no matter how you do it.

> For communicating between program parts in separate memory spaces the
> "distributed systems" feature was added to Ada
> (http://www.ada-auth.org/standards/rm12_w_tc1/html/RM-E.html) but as
> said earlier in this thread that feature is more or less obsolete. It
> was based on RPC, so HW-assisted messages could certainly be used in its
> implementation, at least if longish messages are possible.

Re: Hardware assisted message passing

<sp43ds$q23$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=22283&group=comp.arch#22283

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: sfu...@alumni.cmu.edu.invalid (Stephen Fuld)
Newsgroups: comp.arch
Subject: Re: Hardware assisted message passing
Date: Sat, 11 Dec 2021 22:04:42 -0800
Organization: A noiseless patient Spider
Lines: 39
Message-ID: <sp43ds$q23$1@dont-email.me>
References: <so2u87$tbg$1@dont-email.me>
<e6d5d393-a57e-4e5d-9632-fa2fda932dc0n@googlegroups.com>
<soldi4$d49$1@dont-email.me>
<7c83ecbc-ad31-4455-87b7-4dcb1ca3c228n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 12 Dec 2021 06:04:44 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="b2eb1cf1c5bb9ff1107294b15e047cdf";
logging-data="26691"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/5CCGeUvbNNOWkrb5XjSv2NN7LqFWbOz4="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.4.0
Cancel-Lock: sha1:Elq3MJu188stWW+fbwFibv/IB24=
In-Reply-To: <7c83ecbc-ad31-4455-87b7-4dcb1ca3c228n@googlegroups.com>
Content-Language: en-US
 by: Stephen Fuld - Sun, 12 Dec 2021 06:04 UTC

On 12/6/2021 12:30 PM, MitchAlsup wrote:
> On Monday, December 6, 2021 at 10:25:43 AM UTC-6, Stephen Fuld wrote:

snip

>>>> 2. Elxsi also used the message passing mechanism to process faults such
>>>> as divide by zero. The hardware sends a message to the offending
>>>> process, which can choose to process it or not. Thus another mechanism
>>>> can be subsumed into message passing.
>>> <
>>> Exceptions are not interrupts. Exception handlers are bound to the thread
>>> creating the exception and are synchronous, Interrupts are bound to a
>>> particular handler asynchronously and for a long duration (the SATA disk
>>> handler is associated with multiple SATA drive interrupts and for the entire
>>> time the system has power turned on.
> <
>> Yes, but I think not relevant to the way Elxsi defined its message
>> system. I don't remember all the details, but I was struck by the fact
>> that it treated exceptions the way they did. BTW, at least one of the
>> Elxsi manuals are available on bitsavers, and it gives some details. It
>> seems to have a lot of options. I don't remember, and haven't taken the
>> time to understand all the details, but I was struck by its subsuming
>> exceptions like divide by zero into the message passing system, so I
>> mentioned it in my description as a further "unification".
> <
> It is currently unclear if such unification retains value. Certainly, they all
> fall under the general concept of an unintentional subroutine call, but
> unifying the mechanics of traps with that of exceptions or context-switch
> seems dubious at best.

I tend to agree. I included it because Elixi did it, and it is an
example of unification. But it did seem odd to me.

--
- Stephen Fuld
(e-mail address disguised to prevent spam)

Re: Hardware assisted message passing

<j1ltocF4n02U1@mid.individual.net>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=22284&group=comp.arch#22284

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: niklas.h...@tidorum.invalid (Niklas Holsti)
Newsgroups: comp.arch
Subject: Re: Hardware assisted message passing
Date: Sun, 12 Dec 2021 11:29:48 +0200
Organization: Tidorum Ltd
Lines: 99
Message-ID: <j1ltocF4n02U1@mid.individual.net>
References: <so2u87$tbg$1@dont-email.me>
<e6d5d393-a57e-4e5d-9632-fa2fda932dc0n@googlegroups.com>
<u1xrJ.95050$np6.11511@fx46.iad> <j18kaiFibh7U1@mid.individual.net>
<nBasJ.78885$JZ3.18060@fx05.iad> <j1dtflFiurcU1@mid.individual.net>
<66rsJ.178509$IW4.13731@fx48.iad> <j1f5b5Fqi1oU1@mid.individual.net>
<X%LsJ.69620$IB7.16827@fx02.iad> <j1hnjtFb3giU1@mid.individual.net>
<6b46e828-eb3a-425f-8d99-df538fcfbb58n@googlegroups.com>
<j1hru9FbsqqU1@mid.individual.net>
<885b2425-a5ac-4ab2-9c43-732cb3814704n@googlegroups.com>
<j1i1ssFcuvcU1@mid.individual.net> <sp1eht$ffl$1@dont-email.me>
<j1jghuFl8nkU1@mid.individual.net> <sp2k57$1je$1@dont-email.me>
<j1kf6eFqv51U1@mid.individual.net>
<e4a303c4-a25c-4ffe-b67e-9c3610dd36dbn@googlegroups.com>
<j1kig0FrhmkU1@mid.individual.net>
<eca569b2-1bd3-472a-b264-7edc1ac5a71fn@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: individual.net Qck0v2mY48Ty8tqhDHz1Xw5x+MAlEIGrlTF9EIelAF77ePOkhx
Cancel-Lock: sha1:C7g+rsSXybsUgnxz6em+XdTDdBA=
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0)
Gecko/20100101 Thunderbird/78.14.0
In-Reply-To: <eca569b2-1bd3-472a-b264-7edc1ac5a71fn@googlegroups.com>
Content-Language: en-US
 by: Niklas Holsti - Sun, 12 Dec 2021 09:29 UTC

On 2021-12-11 23:36, MitchAlsup wrote:
> On Saturday, December 11, 2021 at 3:11:30 PM UTC-6, Niklas Holsti wrote:
>> On 2021-12-11 22:33, MitchAlsup wrote:
>>> On Saturday, December 11, 2021 at 2:15:13 PM UTC-6, Niklas Holsti wrote:
>>>> On 2021-12-11 18:37, Stephen Fuld wrote:

[snip]

>>>>> From my interpretation of your description, in the current Ada system,
>>>>> it seems to require shared memory between the "sender", and all of the
>>>>> "receivers", as they must access the common queues, etc. Is that true?
>>> <
>>>> Not only must the queues be shared, but the parameters in an entry call
>>>> can be passed by reference, which requires shared memory.
>>> <
>>> Err, not quite.
>>> <
>>> If one passes a pointer, and there is a means to access through that pointer
>>> in the callers address space (rather than the callees address space) one
>>> does not actually need shared memory.

[snip]

>> Ok, but then it becomes a question of defining what "shared memory"
>> actually means... if the callee can access the caller's memory almost as
>> immediately and rapidly as its own memory, that sounds like "shared"
>> even if the address spaces are not the same.
> <
> Even since the definition of mmap we have had this "what does shared memory
> actually mean" problem. Is multiple applications reading the same disk file using
> shared memory ? What if the system performs the mmap "under the cover of the
> disk cache" ? Network OSs can move disk sectors from node to node making
> applications think they use shared memory when in reality they do not they are
> using coherent disk sectors.
> <
> I think, in general, if several threads use LD and ST instructions to access
> memory that all can see and modify rather efficiently, then the applications
> see the area as shared--whether it is physically shared or not. The key words
> here are "rather efficiently" and it is only memory when one uses LD and ST
> instructions to access.

The criterion of accessing the data with LD/ST instructions sounds like
a possible definition of "shared", yes. But if the time taken by those
instructions varies by one or more orders of magnitude, depending on the
address being accessed, the definition may not be very useful to
programmers who are concerned with execution times and responsiveness.

Granted that the variation may be large, due to caching, even in
single-processor, single-physical-memory systems.

[snip]

>>> Consider a similar trap as above where the OS resides on a computer
>>> at the front of the airplane and the request came from a computer at
>>> the back of the airplane, and the front of airplane computer performs the
>>> read and uses the network to ship the <now full> buffer back to requestor.
>>> <
>>> Neither example needs shared memory, both pass pointers.
> <
>> Huh? If you "ship the full buffer" over the network, that sounds to me
>> like a pass-by-value ("out") parameter.
> <
> Caller did not ship the buffer to requestor !! This is the KEY point here.
> The OS of the caller shipped the buffer after callee touched the page !
> {Not a whole lot different from the case where the caller sends a page
> that is currently residing on disk and no where in memory--except that
> callee (¿acceptee?) may be processing on a DIFFERENT core than caller.}
> <
> Thus, it is delayed pass by value--the sending side passed its pointer
> (this pointer is associated with a translation table (ROOT pointer) and
> can be utilized any time after the original call has been performed--
> including after it has returned.)

And on 2021-12-12 0:30, Ivan Godard wrote:

> You could do pass-by-reference without shared memory, too, by using
> thunks to turn it into pass-by-name like Algol60. A reference would
> look to the program like a memory fetch, but under the hood is
> actually a function call that sends a value-request message.
>
> Slow of course, but if the messaging were hardware it should be
> fairly close to a remote fetch in shared memory. Remote fetch is
> going to be long latency due to SOL no matter how you do it.

Yes, but that means twice the network latency for each access, compared
to once if the parameter's "in" value is shipped along with the call
message ("pushed" rather than "pulled"). And if the "out" value is
shipped along with the call-completed message, the caller can access it
faster than if the caller has to separately request it from the callee's
memory (as in Mitch's example).

So it becomes fifty shades of "shared", depending on how radically the
access time is lengthened by whatever remote access method is used. I
suppose the critical point is that the application programmers must
understand the implications of accessing such temporally distant but
logically shared memory and take it into account in their designs.

Re: Hardware assisted message passing

<sp4k0k$u6m$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=22285&group=comp.arch#22285

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: iva...@millcomputing.com (Ivan Godard)
Newsgroups: comp.arch
Subject: Re: Hardware assisted message passing
Date: Sun, 12 Dec 2021 02:47:47 -0800
Organization: A noiseless patient Spider
Lines: 132
Message-ID: <sp4k0k$u6m$1@dont-email.me>
References: <so2u87$tbg$1@dont-email.me>
<e6d5d393-a57e-4e5d-9632-fa2fda932dc0n@googlegroups.com>
<u1xrJ.95050$np6.11511@fx46.iad> <j18kaiFibh7U1@mid.individual.net>
<nBasJ.78885$JZ3.18060@fx05.iad> <j1dtflFiurcU1@mid.individual.net>
<66rsJ.178509$IW4.13731@fx48.iad> <j1f5b5Fqi1oU1@mid.individual.net>
<X%LsJ.69620$IB7.16827@fx02.iad> <j1hnjtFb3giU1@mid.individual.net>
<6b46e828-eb3a-425f-8d99-df538fcfbb58n@googlegroups.com>
<j1hru9FbsqqU1@mid.individual.net>
<885b2425-a5ac-4ab2-9c43-732cb3814704n@googlegroups.com>
<j1i1ssFcuvcU1@mid.individual.net> <sp1eht$ffl$1@dont-email.me>
<j1jghuFl8nkU1@mid.individual.net> <sp2k57$1je$1@dont-email.me>
<j1kf6eFqv51U1@mid.individual.net>
<e4a303c4-a25c-4ffe-b67e-9c3610dd36dbn@googlegroups.com>
<j1kig0FrhmkU1@mid.individual.net>
<eca569b2-1bd3-472a-b264-7edc1ac5a71fn@googlegroups.com>
<j1ltocF4n02U1@mid.individual.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 12 Dec 2021 10:47:49 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="38ef67a7b314fba2d47955716d153662";
logging-data="30934"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18cJNlm1K2RzdEdhJ6Oon7u"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.3.2
Cancel-Lock: sha1:Hu7ySISA5Dm/J/rpxsCBF17B95Q=
In-Reply-To: <j1ltocF4n02U1@mid.individual.net>
Content-Language: en-US
 by: Ivan Godard - Sun, 12 Dec 2021 10:47 UTC

On 12/12/2021 1:29 AM, Niklas Holsti wrote:
> On 2021-12-11 23:36, MitchAlsup wrote:
>> On Saturday, December 11, 2021 at 3:11:30 PM UTC-6, Niklas Holsti wrote:
>>> On 2021-12-11 22:33, MitchAlsup wrote:
>>>> On Saturday, December 11, 2021 at 2:15:13 PM UTC-6, Niklas Holsti
>>>> wrote:
>>>>> On 2021-12-11 18:37, Stephen Fuld wrote:
>
>    [snip]
>
>>>>>>  From my interpretation of your description, in the current Ada
>>>>>> system,
>>>>>> it seems to require shared memory between the "sender", and all of
>>>>>> the
>>>>>> "receivers", as they must access the common queues, etc. Is that
>>>>>> true?
>>>> <
>>>>> Not only must the queues be shared, but the parameters in an entry
>>>>> call
>>>>> can be passed by reference, which requires shared memory.
>>>> <
>>>> Err, not quite.
>>>> <
>>>> If one passes a pointer, and there is a means to access through that
>>>> pointer
>>>> in the callers address space (rather than the callees address space)
>>>> one
>>>> does not actually need shared memory.
>
>    [snip]
>
>>> Ok, but then it becomes a question of defining what "shared memory"
>>> actually means... if the callee can access the caller's memory almost as
>>> immediately and rapidly as its own memory, that sounds like "shared"
>>> even if the address spaces are not the same.
>> <
>> Even since the definition of mmap we have had this "what does shared
>> memory
>> actually mean" problem. Is multiple applications reading the same disk
>> file using
>> shared memory ? What if the system performs the mmap "under the cover
>> of the
>> disk cache" ?  Network OSs can move disk sectors from node to node making
>> applications think they use shared memory when in reality they do not
>> they are
>> using coherent disk sectors.
>> <
>> I think, in general, if several threads use LD and ST instructions to
>> access
>> memory that all can see and modify rather efficiently, then the
>> applications
>> see the area as shared--whether it is physically shared or not. The
>> key words
>> here are "rather efficiently" and it is only memory when one uses LD
>> and ST
>> instructions to access.
>
>
> The criterion of accessing the data with LD/ST instructions sounds like
> a possible definition of "shared", yes. But if the time taken by those
> instructions varies by one or more orders of magnitude, depending on the
> address being accessed, the definition may not be very useful to
> programmers who are concerned with execution times and responsiveness.
>
> Granted that the variation may be large, due to caching, even in
> single-processor, single-physical-memory systems.
>
>   [snip]
>
>>>> Consider a similar trap as above where the OS resides on a computer
>>>> at the front of the airplane and the request came from a computer at
>>>> the back of the airplane, and the front of airplane computer
>>>> performs the
>>>> read and uses the network to ship the <now full> buffer back to
>>>> requestor.
>>>> <
>>>> Neither example needs shared memory, both pass pointers.
>> <
>>> Huh? If you "ship the full buffer" over the network, that sounds to me
>>> like a pass-by-value ("out") parameter.
>> <
>> Caller did not ship the buffer to requestor !! This is the KEY point
>> here.
>> The OS of the caller shipped the buffer after callee touched the page !
>> {Not a whole lot different from the case where the caller sends a page
>> that is currently residing on disk and no where in memory--except that
>> callee (¿acceptee?) may be processing on a DIFFERENT core than caller.}
>> <
>> Thus, it is delayed pass by value--the sending side passed its pointer
>> (this pointer is associated with a translation table (ROOT pointer) and
>> can be utilized any time after the original call has been performed--
>> including after it has returned.)
>
>
> And on 2021-12-12 0:30, Ivan Godard wrote:
>
>
>> You could do pass-by-reference without shared memory, too, by using
>> thunks to turn it into pass-by-name like Algol60. A reference would
>> look to the program like a memory fetch, but under the hood is
>> actually a function call that sends a value-request message.
>>
>> Slow of course, but if the messaging were hardware it should be
>> fairly close to a remote fetch in shared memory. Remote fetch is
>> going to be long latency due to SOL no matter how you do it.
>
> Yes, but that means twice the network latency for each access, compared
> to once if the parameter's "in" value is shipped along with the call
> message ("pushed" rather than "pulled"). And if the "out" value is
> shipped along with the call-completed message, the caller can access it
> faster than if the caller has to separately request it from the callee's
> memory (as in Mitch's example).

But that is pass-by-copy, not pass-by-reference. If in-out semantics is
all you want then you have a big win over true pass-by-reference, but
it's not shared memory. To me, shared memory must give the same
semantics as local memory; only wall-clock differs. You can fake shared
memory with copy if you know that the value doesn't mutate during the
RPC - but if it does, or might, then you've got to go re-read it at
every program reference.

> So it becomes fifty shades of "shared", depending on how radically the
> access time is lengthened by whatever remote access method is used. I
> suppose the critical point is that the application programmers must
> understand the implications of accessing such temporally distant but
> logically shared memory and take it into account in their designs.

Yes. And indeed, pass-by-copy is only distinguishable from
pass-by-reference if the referend is mutating, which is by definition a
race condition. If the local memory model is defined only in race-free
then you can freely use copy to extend it to remote access. But if the
local model is sequential consistency then you can't get away with that.

Re: Hardware assisted message passing

<j1mh6dF8ao6U1@mid.individual.net>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=22286&group=comp.arch#22286

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: niklas.h...@tidorum.invalid (Niklas Holsti)
Newsgroups: comp.arch
Subject: Re: Hardware assisted message passing
Date: Sun, 12 Dec 2021 17:01:33 +0200
Organization: Tidorum Ltd
Lines: 73
Message-ID: <j1mh6dF8ao6U1@mid.individual.net>
References: <so2u87$tbg$1@dont-email.me>
<e6d5d393-a57e-4e5d-9632-fa2fda932dc0n@googlegroups.com>
<u1xrJ.95050$np6.11511@fx46.iad> <j18kaiFibh7U1@mid.individual.net>
<nBasJ.78885$JZ3.18060@fx05.iad> <j1dtflFiurcU1@mid.individual.net>
<66rsJ.178509$IW4.13731@fx48.iad> <j1f5b5Fqi1oU1@mid.individual.net>
<X%LsJ.69620$IB7.16827@fx02.iad> <j1hnjtFb3giU1@mid.individual.net>
<6b46e828-eb3a-425f-8d99-df538fcfbb58n@googlegroups.com>
<j1hru9FbsqqU1@mid.individual.net>
<885b2425-a5ac-4ab2-9c43-732cb3814704n@googlegroups.com>
<j1i1ssFcuvcU1@mid.individual.net> <sp1eht$ffl$1@dont-email.me>
<j1jghuFl8nkU1@mid.individual.net> <sp2k57$1je$1@dont-email.me>
<j1kf6eFqv51U1@mid.individual.net>
<e4a303c4-a25c-4ffe-b67e-9c3610dd36dbn@googlegroups.com>
<j1kig0FrhmkU1@mid.individual.net>
<eca569b2-1bd3-472a-b264-7edc1ac5a71fn@googlegroups.com>
<j1ltocF4n02U1@mid.individual.net> <sp4k0k$u6m$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: individual.net MihPPwEWFSJQ8jVk+PXGDgj6zYf7ttoMHylgsODJf4mfRsTgbs
Cancel-Lock: sha1:9e2u79GJ6dzyhwdywvYr6U4rW8A=
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0)
Gecko/20100101 Thunderbird/78.14.0
In-Reply-To: <sp4k0k$u6m$1@dont-email.me>
Content-Language: en-US
 by: Niklas Holsti - Sun, 12 Dec 2021 15:01 UTC

On 2021-12-12 12:47, Ivan Godard wrote:
> On 12/12/2021 1:29 AM, Niklas Holsti wrote:

[snipped discussion of Ada rendez-vous and shared memory]

>> And on 2021-12-12 0:30, Ivan Godard wrote:
>>
>>
>>> You could do pass-by-reference without shared memory, too, by using
>>> thunks to turn it into pass-by-name like Algol60. A reference would
>>> look to the program like a memory fetch, but under the hood is
>>> actually a function call that sends a value-request message.
>>>
>>> Slow of course, but if the messaging were hardware it should be
>>> fairly close to a remote fetch in shared memory. Remote fetch is
>>> going to be long latency due to SOL no matter how you do it.
>>
>> Yes, but that means twice the network latency for each access,
>> compared to once if the parameter's "in" value is shipped along with
>> the call message ("pushed" rather than "pulled"). And if the "out"
>> value is shipped along with the call-completed message, the caller can
>> access it faster than if the caller has to separately request it from
>> the callee's memory (as in Mitch's example).
>
> But that is pass-by-copy, not pass-by-reference.

Yes. Pass-by-copy works better in the message-passing system.

> To me, shared memory must give the same semantics as local memory;
> only wall-clock differs.

I agree.

> You can fake shared memory with copy if you know that the value
> doesn't mutate during the RPC - but if it does, or might, then you've
> got to go re-read it at every program reference.

I agree.

> And indeed, pass-by-copy is only distinguishable from
> pass-by-reference if the referend is mutating,

Yes.

> which is by definition a race condition.

No. The referend may be mutated by actions taken serially by the callee,
for example if there are several access paths from parameters to the
referend. Some languages try to prevent such aliasing to some extent,
but if the parameters are sure to be passed by reference (for example,
tagged objects in Ada), or explicitly passed by reference (for example,
as pointers), they do allow it, I believe.

>>>>>> [Some time ago,] On 2021-12-11 18:37, Stephen Fuld wrote:
>>>>>>>
>>>>>>> From my interpretation of your description, in the
>>>>>>> current Ada system, it seems to require shared memory
>>>>>>> between the "sender", and all of the "receivers", as
>>>>>>> they must access the common queues, etc. Is that true?

Perhaps Stephen should be the final judge of whether the current Ada
system requires "shared memory" -- of whatever shade.

Re: Hardware assisted message passing

<sp5fqm$292$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=22287&group=comp.arch#22287

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: iva...@millcomputing.com (Ivan Godard)
Newsgroups: comp.arch
Subject: Re: Hardware assisted message passing
Date: Sun, 12 Dec 2021 10:42:30 -0800
Organization: A noiseless patient Spider
Lines: 24
Message-ID: <sp5fqm$292$1@dont-email.me>
References: <so2u87$tbg$1@dont-email.me>
<e6d5d393-a57e-4e5d-9632-fa2fda932dc0n@googlegroups.com>
<u1xrJ.95050$np6.11511@fx46.iad> <j18kaiFibh7U1@mid.individual.net>
<nBasJ.78885$JZ3.18060@fx05.iad> <j1dtflFiurcU1@mid.individual.net>
<66rsJ.178509$IW4.13731@fx48.iad> <j1f5b5Fqi1oU1@mid.individual.net>
<X%LsJ.69620$IB7.16827@fx02.iad> <j1hnjtFb3giU1@mid.individual.net>
<6b46e828-eb3a-425f-8d99-df538fcfbb58n@googlegroups.com>
<j1hru9FbsqqU1@mid.individual.net>
<885b2425-a5ac-4ab2-9c43-732cb3814704n@googlegroups.com>
<j1i1ssFcuvcU1@mid.individual.net> <sp1eht$ffl$1@dont-email.me>
<j1jghuFl8nkU1@mid.individual.net> <sp2k57$1je$1@dont-email.me>
<j1kf6eFqv51U1@mid.individual.net>
<e4a303c4-a25c-4ffe-b67e-9c3610dd36dbn@googlegroups.com>
<j1kig0FrhmkU1@mid.individual.net>
<eca569b2-1bd3-472a-b264-7edc1ac5a71fn@googlegroups.com>
<j1ltocF4n02U1@mid.individual.net> <sp4k0k$u6m$1@dont-email.me>
<j1mh6dF8ao6U1@mid.individual.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 12 Dec 2021 18:42:30 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="38ef67a7b314fba2d47955716d153662";
logging-data="2338"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18uH++M9pNTmiPrL9aaubLr"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.3.2
Cancel-Lock: sha1:4W43K/1RcllnPMfIhNona+4Lr9M=
In-Reply-To: <j1mh6dF8ao6U1@mid.individual.net>
Content-Language: en-US
 by: Ivan Godard - Sun, 12 Dec 2021 18:42 UTC

On 12/12/2021 7:01 AM, Niklas Holsti wrote:
>
> On 2021-12-12 12:47, Ivan Godard wrote:

<snip>

>> And indeed, pass-by-copy is only distinguishable from
>> pass-by-reference if the referend is mutating,
>
>
> Yes.
>
>
>> which is by definition a race condition.
>
> No. The referend may be mutated by actions taken serially by the callee,
> for example if there are several access paths from parameters to the
> referend. Some languages try to prevent such aliasing to some extent,
> but if the parameters are sure to be passed by reference (for example,
> tagged objects in Ada), or explicitly passed by reference (for example,
> as pointers), they do allow it, I believe.

True - I was thinking of remote mutation. Thank you.

Re: Hardware assisted message passing

<2a96dded-b200-4cec-8703-1257c29ec8a2n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=22288&group=comp.arch#22288

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a05:622a:120e:: with SMTP id y14mr40390287qtx.671.1639341108162;
Sun, 12 Dec 2021 12:31:48 -0800 (PST)
X-Received: by 2002:a9d:6348:: with SMTP id y8mr21686345otk.243.1639341107913;
Sun, 12 Dec 2021 12:31:47 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Sun, 12 Dec 2021 12:31:47 -0800 (PST)
In-Reply-To: <j1ltocF4n02U1@mid.individual.net>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:e812:639d:ad60:71f;
posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:e812:639d:ad60:71f
References: <so2u87$tbg$1@dont-email.me> <e6d5d393-a57e-4e5d-9632-fa2fda932dc0n@googlegroups.com>
<u1xrJ.95050$np6.11511@fx46.iad> <j18kaiFibh7U1@mid.individual.net>
<nBasJ.78885$JZ3.18060@fx05.iad> <j1dtflFiurcU1@mid.individual.net>
<66rsJ.178509$IW4.13731@fx48.iad> <j1f5b5Fqi1oU1@mid.individual.net>
<X%LsJ.69620$IB7.16827@fx02.iad> <j1hnjtFb3giU1@mid.individual.net>
<6b46e828-eb3a-425f-8d99-df538fcfbb58n@googlegroups.com> <j1hru9FbsqqU1@mid.individual.net>
<885b2425-a5ac-4ab2-9c43-732cb3814704n@googlegroups.com> <j1i1ssFcuvcU1@mid.individual.net>
<sp1eht$ffl$1@dont-email.me> <j1jghuFl8nkU1@mid.individual.net>
<sp2k57$1je$1@dont-email.me> <j1kf6eFqv51U1@mid.individual.net>
<e4a303c4-a25c-4ffe-b67e-9c3610dd36dbn@googlegroups.com> <j1kig0FrhmkU1@mid.individual.net>
<eca569b2-1bd3-472a-b264-7edc1ac5a71fn@googlegroups.com> <j1ltocF4n02U1@mid.individual.net>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <2a96dded-b200-4cec-8703-1257c29ec8a2n@googlegroups.com>
Subject: Re: Hardware assisted message passing
From: MitchAl...@aol.com (MitchAlsup)
Injection-Date: Sun, 12 Dec 2021 20:31:48 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 135
 by: MitchAlsup - Sun, 12 Dec 2021 20:31 UTC

On Sunday, December 12, 2021 at 3:29:52 AM UTC-6, Niklas Holsti wrote:
> On 2021-12-11 23:36, MitchAlsup wrote:
> > On Saturday, December 11, 2021 at 3:11:30 PM UTC-6, Niklas Holsti wrote:
> >> On 2021-12-11 22:33, MitchAlsup wrote:
> >>> On Saturday, December 11, 2021 at 2:15:13 PM UTC-6, Niklas Holsti wrote:
> >>>> On 2021-12-11 18:37, Stephen Fuld wrote:
> [snip]
> >>>>> From my interpretation of your description, in the current Ada system,
> >>>>> it seems to require shared memory between the "sender", and all of the
> >>>>> "receivers", as they must access the common queues, etc. Is that true?
> >>> <
> >>>> Not only must the queues be shared, but the parameters in an entry call
> >>>> can be passed by reference, which requires shared memory.
> >>> <
> >>> Err, not quite.
> >>> <
> >>> If one passes a pointer, and there is a means to access through that pointer
> >>> in the callers address space (rather than the callees address space) one
> >>> does not actually need shared memory.
> [snip]
> >> Ok, but then it becomes a question of defining what "shared memory"
> >> actually means... if the callee can access the caller's memory almost as
> >> immediately and rapidly as its own memory, that sounds like "shared"
> >> even if the address spaces are not the same.
> > <
> > Even since the definition of mmap we have had this "what does shared memory
> > actually mean" problem. Is multiple applications reading the same disk file using
> > shared memory ? What if the system performs the mmap "under the cover of the
> > disk cache" ? Network OSs can move disk sectors from node to node making
> > applications think they use shared memory when in reality they do not they are
> > using coherent disk sectors.
> > <
> > I think, in general, if several threads use LD and ST instructions to access
> > memory that all can see and modify rather efficiently, then the applications
> > see the area as shared--whether it is physically shared or not. The key words
> > here are "rather efficiently" and it is only memory when one uses LD and ST
> > instructions to access.
> The criterion of accessing the data with LD/ST instructions sounds like
> a possible definition of "shared", yes. But if the time taken by those
> instructions varies by one or more orders of magnitude, depending on the
> address being accessed, the definition may not be very useful to
> programmers who are concerned with execution times and responsiveness.
>
> Granted that the variation may be large, due to caching, even in
> single-processor, single-physical-memory systems.
>
> [snip]
> >>> Consider a similar trap as above where the OS resides on a computer
> >>> at the front of the airplane and the request came from a computer at
> >>> the back of the airplane, and the front of airplane computer performs the
> >>> read and uses the network to ship the <now full> buffer back to requestor.
> >>> <
> >>> Neither example needs shared memory, both pass pointers.
> > <
> >> Huh? If you "ship the full buffer" over the network, that sounds to me
> >> like a pass-by-value ("out") parameter.
> > <
> > Caller did not ship the buffer to requestor !! This is the KEY point here.
> > The OS of the caller shipped the buffer after callee touched the page !
> > {Not a whole lot different from the case where the caller sends a page
> > that is currently residing on disk and no where in memory--except that
> > callee (¿acceptee?) may be processing on a DIFFERENT core than caller.}
> > <
> > Thus, it is delayed pass by value--the sending side passed its pointer
> > (this pointer is associated with a translation table (ROOT pointer) and
> > can be utilized any time after the original call has been performed--
> > including after it has returned.)
> And on 2021-12-12 0:30, Ivan Godard wrote:
>
>
> > You could do pass-by-reference without shared memory, too, by using
> > thunks to turn it into pass-by-name like Algol60. A reference would
> > look to the program like a memory fetch, but under the hood is
> > actually a function call that sends a value-request message.
> >
> > Slow of course, but if the messaging were hardware it should be
> > fairly close to a remote fetch in shared memory. Remote fetch is
> > going to be long latency due to SOL no matter how you do it.
<
> Yes, but that means twice the network latency for each access, compared
> to once if the parameter's "in" value is shipped along with the call
> message ("pushed" rather than "pulled").
<
Two trips through the network is probably commensurate with reading
a missing page from the disk. As long as you get to access all the data
on the page for this single occurrence of overhead--it probably meets the
criterion of "rather efficient".
<
> And if the "out" value is
> shipped along with the call-completed message, the caller can access it
> faster than if the caller has to separately request it from the callee's
> memory (as in Mitch's example).
>
> So it becomes fifty shades of "shared", depending on how radically the
> access time is lengthened by whatever remote access method is used. I
> suppose the critical point is that the application programmers must
> understand the implications of accessing such temporally distant but
> logically shared memory and take it into account in their designs.

Re: Hardware assisted message passing

<sp8hkr$vih$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=22291&group=comp.arch#22291

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: sfu...@alumni.cmu.edu.invalid (Stephen Fuld)
Newsgroups: comp.arch
Subject: Re: Hardware assisted message passing
Date: Mon, 13 Dec 2021 14:31:53 -0800
Organization: A noiseless patient Spider
Lines: 95
Message-ID: <sp8hkr$vih$1@dont-email.me>
References: <so2u87$tbg$1@dont-email.me>
<e6d5d393-a57e-4e5d-9632-fa2fda932dc0n@googlegroups.com>
<u1xrJ.95050$np6.11511@fx46.iad> <j18kaiFibh7U1@mid.individual.net>
<nBasJ.78885$JZ3.18060@fx05.iad> <j1dtflFiurcU1@mid.individual.net>
<66rsJ.178509$IW4.13731@fx48.iad> <j1f5b5Fqi1oU1@mid.individual.net>
<X%LsJ.69620$IB7.16827@fx02.iad> <j1hnjtFb3giU1@mid.individual.net>
<6b46e828-eb3a-425f-8d99-df538fcfbb58n@googlegroups.com>
<j1hru9FbsqqU1@mid.individual.net>
<885b2425-a5ac-4ab2-9c43-732cb3814704n@googlegroups.com>
<j1i1ssFcuvcU1@mid.individual.net> <sp1eht$ffl$1@dont-email.me>
<j1jghuFl8nkU1@mid.individual.net> <sp2k57$1je$1@dont-email.me>
<j1kf6eFqv51U1@mid.individual.net>
<e4a303c4-a25c-4ffe-b67e-9c3610dd36dbn@googlegroups.com>
<j1kig0FrhmkU1@mid.individual.net>
<eca569b2-1bd3-472a-b264-7edc1ac5a71fn@googlegroups.com>
<j1ltocF4n02U1@mid.individual.net> <sp4k0k$u6m$1@dont-email.me>
<j1mh6dF8ao6U1@mid.individual.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 13 Dec 2021 22:31:55 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="efed2c7f915d3d8da0f8a2ca73ed3f86";
logging-data="32337"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/o4pG1Fd+h0BGRG3Pe7fDOUdYaUAZy4Ag="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.4.0
Cancel-Lock: sha1:R7TsdKRxpzq71J+H7suq1Du1WZ8=
In-Reply-To: <j1mh6dF8ao6U1@mid.individual.net>
Content-Language: en-US
 by: Stephen Fuld - Mon, 13 Dec 2021 22:31 UTC

On 12/12/2021 7:01 AM, Niklas Holsti wrote:
>
> On 2021-12-12 12:47, Ivan Godard wrote:
>> On 12/12/2021 1:29 AM, Niklas Holsti wrote:
>
>
>    [snipped discussion of Ada rendez-vous and shared memory]
>
>
>>> And on 2021-12-12 0:30, Ivan Godard wrote:
>>>
>>>
>>>> You could do pass-by-reference without shared memory, too, by using
>>>> thunks to turn it into pass-by-name like Algol60. A reference would
>>>> look to the program like a memory fetch, but under the hood is
>>>> actually a function call that sends a value-request message.
>>>>
>>>> Slow of course, but if the messaging were hardware it should be
>>>> fairly close to a remote fetch in shared memory. Remote fetch is
>>>> going to be long latency due to SOL no matter how you do it.
>>>
>>> Yes, but that means twice the network latency for each access,
>>> compared to once if the parameter's "in" value is shipped along with
>>> the call message ("pushed" rather than "pulled"). And if the "out"
>>> value is shipped along with the call-completed message, the caller
>>> can access it faster than if the caller has to separately request it
>>> from the callee's memory (as in Mitch's example).
>>
>> But that is pass-by-copy, not pass-by-reference.
>
>
> Yes. Pass-by-copy works better in the message-passing system.
>
>
>> To me, shared memory must give the same semantics as local memory;
>> only wall-clock differs.
>
> I agree.
>
>
>> You can fake shared memory with copy if you know that the value
>> doesn't mutate during the RPC - but if it does, or might, then you've
>> got to go re-read it at every program reference.
>
>
> I agree.
>
>
>> And indeed, pass-by-copy is only distinguishable from
>> pass-by-reference if the referend is mutating,
>
>
> Yes.
>
>
>> which is by definition a race condition.
>
> No. The referend may be mutated by actions taken serially by the callee,
> for example if there are several access paths from parameters to the
> referend. Some languages try to prevent such aliasing to some extent,
> but if the parameters are sure to be passed by reference (for example,
> tagged objects in Ada), or explicitly passed by reference (for example,
> as pointers), they do allow it, I believe.
>
>
>>>>>>> [Some time ago,] On 2021-12-11 18:37, Stephen Fuld wrote:
>>>>>>>>
>>>>>>>> From my interpretation of your description, in the current Ada
>>>>>>>> system, it seems to require shared memory between the "sender",
>>>>>>>> and all of the "receivers", as
>>>>>>>> they must access the common queues, etc. Is that true?
>
> Perhaps Stephen should be the final judge of whether the current Ada
> system requires "shared memory" -- of whatever shade.

Oh No! I am certainly not the final judge of anything, least of all
what seems like a semantic argument.

However, IMHO, these various mechanisms of using some kind of messaging
to simulate/implement shared memory are not a good idea. The idea (at
least in its initial high performance applications) of message passing
is to eliminate the need for shared memory at all. Using it get back to
shared memory seems, at least to me, a step backward.

I should also say, that it seems that the a message passing
implementation should implement more than the currently implemented Ada
rendezvous mechanism, specifically some way to address multiple targets
for a source, and probably multiple sources for a target. Support of
asynch operations seems like one way to do at least part of that.

--
- Stephen Fuld
(e-mail address disguised to prevent spam)

Re: Hardware assisted message passing

<df0aa92f-0f8a-4bc1-94b8-0db32e4766b4n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=22292&group=comp.arch#22292

  copy link   Newsgroups: comp.arch
X-Received: by 2002:ac8:5712:: with SMTP id 18mr1825994qtw.584.1639437706341;
Mon, 13 Dec 2021 15:21:46 -0800 (PST)
X-Received: by 2002:a05:6808:3097:: with SMTP id bl23mr1475299oib.0.1639437704872;
Mon, 13 Dec 2021 15:21:44 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Mon, 13 Dec 2021 15:21:44 -0800 (PST)
In-Reply-To: <sp8hkr$vih$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:504f:29bc:1e9c:8aaf;
posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:504f:29bc:1e9c:8aaf
References: <so2u87$tbg$1@dont-email.me> <e6d5d393-a57e-4e5d-9632-fa2fda932dc0n@googlegroups.com>
<u1xrJ.95050$np6.11511@fx46.iad> <j18kaiFibh7U1@mid.individual.net>
<nBasJ.78885$JZ3.18060@fx05.iad> <j1dtflFiurcU1@mid.individual.net>
<66rsJ.178509$IW4.13731@fx48.iad> <j1f5b5Fqi1oU1@mid.individual.net>
<X%LsJ.69620$IB7.16827@fx02.iad> <j1hnjtFb3giU1@mid.individual.net>
<6b46e828-eb3a-425f-8d99-df538fcfbb58n@googlegroups.com> <j1hru9FbsqqU1@mid.individual.net>
<885b2425-a5ac-4ab2-9c43-732cb3814704n@googlegroups.com> <j1i1ssFcuvcU1@mid.individual.net>
<sp1eht$ffl$1@dont-email.me> <j1jghuFl8nkU1@mid.individual.net>
<sp2k57$1je$1@dont-email.me> <j1kf6eFqv51U1@mid.individual.net>
<e4a303c4-a25c-4ffe-b67e-9c3610dd36dbn@googlegroups.com> <j1kig0FrhmkU1@mid.individual.net>
<eca569b2-1bd3-472a-b264-7edc1ac5a71fn@googlegroups.com> <j1ltocF4n02U1@mid.individual.net>
<sp4k0k$u6m$1@dont-email.me> <j1mh6dF8ao6U1@mid.individual.net> <sp8hkr$vih$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <df0aa92f-0f8a-4bc1-94b8-0db32e4766b4n@googlegroups.com>
Subject: Re: Hardware assisted message passing
From: MitchAl...@aol.com (MitchAlsup)
Injection-Date: Mon, 13 Dec 2021 23:21:46 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 42
 by: MitchAlsup - Mon, 13 Dec 2021 23:21 UTC

On Monday, December 13, 2021 at 4:31:58 PM UTC-6, Stephen Fuld wrote:
> On 12/12/2021 7:01 AM, Niklas Holsti wrote:
> >
> > On 2021-12-12 12:47, Ivan Godard wrote:
> >
> > Perhaps Stephen should be the final judge of whether the current Ada
> > system requires "shared memory" -- of whatever shade.
> Oh No! I am certainly not the final judge of anything, least of all
> what seems like a semantic argument.
>
> However, IMHO, these various mechanisms of using some kind of messaging
> to simulate/implement shared memory are not a good idea. The idea (at
> least in its initial high performance applications) of message passing
> is to eliminate the need for shared memory at all. Using it get back to
> shared memory seems, at least to me, a step backward.
<
I see shared Memory and Message Passing as different means to an end.
Sort of like a Fourier Transform of some input data--it still contains the
original "meaning" of the data set, just in a different form.
<
Message passing can be used to give the illusion of shared memory.
Shared memory can be used to give the illusion of message passing.
<
Shared memory is more appropriate to the single mother board systems
Message passing is more appropriate to systems the size of a gymnasium.
<
The language definition should not preclude EITHER or make one harder
than the other.
>
> I should also say, that it seems that the a message passing
> implementation should implement more than the currently implemented Ada
> rendezvous mechanism, specifically some way to address multiple targets
> for a source, and probably multiple sources for a target. Support of
> asynch operations seems like one way to do at least part of that.
<
Yes to multiple acceptors from a single task pending simultaneously
Yes to multiple callers calling a vector of acceptors
<
1-binding (rendezvous) between a caller-task and acceptor-task
at any instant in time.
> --
> - Stephen Fuld
> (e-mail address disguised to prevent spam)

Re: Hardware assisted short message passing

<d6213bb0-2426-4ca8-88f6-5242f541fa95n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=22293&group=comp.arch#22293

  copy link   Newsgroups: comp.arch
X-Received: by 2002:ac8:5712:: with SMTP id 18mr9414615qtw.584.1639523889635;
Tue, 14 Dec 2021 15:18:09 -0800 (PST)
X-Received: by 2002:a05:6808:1448:: with SMTP id x8mr6630038oiv.84.1639523889343;
Tue, 14 Dec 2021 15:18:09 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Tue, 14 Dec 2021 15:18:09 -0800 (PST)
In-Reply-To: <df0aa92f-0f8a-4bc1-94b8-0db32e4766b4n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:e958:5e92:9948:b650;
posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:e958:5e92:9948:b650
References: <so2u87$tbg$1@dont-email.me> <e6d5d393-a57e-4e5d-9632-fa2fda932dc0n@googlegroups.com>
<u1xrJ.95050$np6.11511@fx46.iad> <j18kaiFibh7U1@mid.individual.net>
<nBasJ.78885$JZ3.18060@fx05.iad> <j1dtflFiurcU1@mid.individual.net>
<66rsJ.178509$IW4.13731@fx48.iad> <j1f5b5Fqi1oU1@mid.individual.net>
<X%LsJ.69620$IB7.16827@fx02.iad> <j1hnjtFb3giU1@mid.individual.net>
<6b46e828-eb3a-425f-8d99-df538fcfbb58n@googlegroups.com> <j1hru9FbsqqU1@mid.individual.net>
<885b2425-a5ac-4ab2-9c43-732cb3814704n@googlegroups.com> <j1i1ssFcuvcU1@mid.individual.net>
<sp1eht$ffl$1@dont-email.me> <j1jghuFl8nkU1@mid.individual.net>
<sp2k57$1je$1@dont-email.me> <j1kf6eFqv51U1@mid.individual.net>
<e4a303c4-a25c-4ffe-b67e-9c3610dd36dbn@googlegroups.com> <j1kig0FrhmkU1@mid.individual.net>
<eca569b2-1bd3-472a-b264-7edc1ac5a71fn@googlegroups.com> <j1ltocF4n02U1@mid.individual.net>
<sp4k0k$u6m$1@dont-email.me> <j1mh6dF8ao6U1@mid.individual.net>
<sp8hkr$vih$1@dont-email.me> <df0aa92f-0f8a-4bc1-94b8-0db32e4766b4n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <d6213bb0-2426-4ca8-88f6-5242f541fa95n@googlegroups.com>
Subject: Re: Hardware assisted short message passing
From: MitchAl...@aol.com (MitchAlsup)
Injection-Date: Tue, 14 Dec 2021 23:18:09 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 30
 by: MitchAlsup - Tue, 14 Dec 2021 23:18 UTC

Short versus long message passing.
<
At an ISA level, one could disguise one instruction to serve as a means to send
short messages. Keyword--disguise.
<
< -----------------------------I use these so the vertical white space eater does ---------------
< ------------------------------not lose my formatting---------------------------------------------------------
<
Consider a long message, first. A long message must be passed as a pointer to
a buffer and a length (or equivalently bounds). HW applies some kind of RDMA
and delivers the message.
<
Now consider a short message. This could be a STM (store multiple) instruction
which carries its own length (first register, last register, with end around continuance).
Such a message is necessarily limited, but likely to suffices for "lots of messages"
It might even be used as a courier for a long message RDMAed from the receiving
end rather than the sending end.
<
{It is the multiple registers that enable STM to encode this service request to HW}
<
Said STM instruction could target a non-cacheable* address known by HW to be
supplying message passing services. So, no actual additions to the ISA are
required in order to give messages first class citizenship.
<
(*) or Memory Mapped I/O space. My 66000 has a 64-bit cacheable virtual address
space AND 64-bit disjoint memory mapped I/O space (non-cacheable) AND a 64-bit
virtual Configuration space, AND a 64-bit virtual BOOT ROM address space. Only the
virtual addresses are limited to 64-bits, the rest of the system works with 66-bit
addresses all controlled by the PTEs.
<
Mitch

Re: Hardware assisted short message passing

<spdb57$39j$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=22294&group=comp.arch#22294

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: sfu...@alumni.cmu.edu.invalid (Stephen Fuld)
Newsgroups: comp.arch
Subject: Re: Hardware assisted short message passing
Date: Wed, 15 Dec 2021 10:11:49 -0800
Organization: A noiseless patient Spider
Lines: 47
Message-ID: <spdb57$39j$1@dont-email.me>
References: <so2u87$tbg$1@dont-email.me> <j18kaiFibh7U1@mid.individual.net>
<nBasJ.78885$JZ3.18060@fx05.iad> <j1dtflFiurcU1@mid.individual.net>
<66rsJ.178509$IW4.13731@fx48.iad> <j1f5b5Fqi1oU1@mid.individual.net>
<X%LsJ.69620$IB7.16827@fx02.iad> <j1hnjtFb3giU1@mid.individual.net>
<6b46e828-eb3a-425f-8d99-df538fcfbb58n@googlegroups.com>
<j1hru9FbsqqU1@mid.individual.net>
<885b2425-a5ac-4ab2-9c43-732cb3814704n@googlegroups.com>
<j1i1ssFcuvcU1@mid.individual.net> <sp1eht$ffl$1@dont-email.me>
<j1jghuFl8nkU1@mid.individual.net> <sp2k57$1je$1@dont-email.me>
<j1kf6eFqv51U1@mid.individual.net>
<e4a303c4-a25c-4ffe-b67e-9c3610dd36dbn@googlegroups.com>
<j1kig0FrhmkU1@mid.individual.net>
<eca569b2-1bd3-472a-b264-7edc1ac5a71fn@googlegroups.com>
<j1ltocF4n02U1@mid.individual.net> <sp4k0k$u6m$1@dont-email.me>
<j1mh6dF8ao6U1@mid.individual.net> <sp8hkr$vih$1@dont-email.me>
<df0aa92f-0f8a-4bc1-94b8-0db32e4766b4n@googlegroups.com>
<d6213bb0-2426-4ca8-88f6-5242f541fa95n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 15 Dec 2021 18:11:51 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="f33a6ece5b148859190d4d85458962f6";
logging-data="3379"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/So3+B/B+rvYtaN9tnEf6iSyLdVmzEEgA="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.4.0
Cancel-Lock: sha1:VLdDl6q5UQnwfgqpOw1SAN2qR80=
In-Reply-To: <d6213bb0-2426-4ca8-88f6-5242f541fa95n@googlegroups.com>
Content-Language: en-US
 by: Stephen Fuld - Wed, 15 Dec 2021 18:11 UTC

On 12/14/2021 3:18 PM, MitchAlsup wrote:
> Short versus long message passing.
> <
> At an ISA level, one could disguise one instruction to serve as a means to send
> short messages. Keyword--disguise.
> <
> < -----------------------------I use these so the vertical white space eater does ---------------
> < ------------------------------not lose my formatting---------------------------------------------------------
> <
> Consider a long message, first. A long message must be passed as a pointer to
> a buffer and a length (or equivalently bounds). HW applies some kind of RDMA
> and delivers the message.

There is the issue of whether the message is pushed or pulled, that is,
is the RDMA done on the source or destination side.

An advantage of doing it on the source side is it improves performance
by some implementation dependent, but non zero amount. It also reduces
the hardware requirements on a receiver, as no RDMA hardware is required
there. These may be minor, but I have yet to see any advantage in doing
the RDMA on the receiving side.

Then there is the question what is the boundary between short and long,
and is that boundary technology dependent, that is, is it likely to move
in the future with newer technology. If it is likely to move, that
argues for the same mechanism to be used for any (reasonable) length, in
order to prevent long term incompatibilities.

> <
> Now consider a short message. This could be a STM (store multiple) instruction
> which carries its own length (first register, last register, with end around continuance).
> Such a message is necessarily limited, but likely to suffices for "lots of messages"
> It might even be used as a courier for a long message RDMAed from the receiving
> end rather than the sending end.
> <
> {It is the multiple registers that enable STM to encode this service request to HW}

All true, but if I understand your proposal, it requires the data
comprising the short message to be pre-loaded into consecutive
registers. This seems like a lot of extra work.

--
- Stephen Fuld
(e-mail address disguised to prevent spam)

Re: Hardware assisted short message passing

<e80ee81b-0d92-46cc-af62-0d81550817c3n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=22295&group=comp.arch#22295

  copy link   Newsgroups: comp.arch
X-Received: by 2002:ac8:5c50:: with SMTP id j16mr13912637qtj.255.1639596718090;
Wed, 15 Dec 2021 11:31:58 -0800 (PST)
X-Received: by 2002:aca:eb0b:: with SMTP id j11mr1263567oih.51.1639596717923;
Wed, 15 Dec 2021 11:31:57 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Wed, 15 Dec 2021 11:31:57 -0800 (PST)
In-Reply-To: <spdb57$39j$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:8d25:95df:9415:9c86;
posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:8d25:95df:9415:9c86
References: <so2u87$tbg$1@dont-email.me> <j18kaiFibh7U1@mid.individual.net>
<nBasJ.78885$JZ3.18060@fx05.iad> <j1dtflFiurcU1@mid.individual.net>
<66rsJ.178509$IW4.13731@fx48.iad> <j1f5b5Fqi1oU1@mid.individual.net>
<X%LsJ.69620$IB7.16827@fx02.iad> <j1hnjtFb3giU1@mid.individual.net>
<6b46e828-eb3a-425f-8d99-df538fcfbb58n@googlegroups.com> <j1hru9FbsqqU1@mid.individual.net>
<885b2425-a5ac-4ab2-9c43-732cb3814704n@googlegroups.com> <j1i1ssFcuvcU1@mid.individual.net>
<sp1eht$ffl$1@dont-email.me> <j1jghuFl8nkU1@mid.individual.net>
<sp2k57$1je$1@dont-email.me> <j1kf6eFqv51U1@mid.individual.net>
<e4a303c4-a25c-4ffe-b67e-9c3610dd36dbn@googlegroups.com> <j1kig0FrhmkU1@mid.individual.net>
<eca569b2-1bd3-472a-b264-7edc1ac5a71fn@googlegroups.com> <j1ltocF4n02U1@mid.individual.net>
<sp4k0k$u6m$1@dont-email.me> <j1mh6dF8ao6U1@mid.individual.net>
<sp8hkr$vih$1@dont-email.me> <df0aa92f-0f8a-4bc1-94b8-0db32e4766b4n@googlegroups.com>
<d6213bb0-2426-4ca8-88f6-5242f541fa95n@googlegroups.com> <spdb57$39j$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <e80ee81b-0d92-46cc-af62-0d81550817c3n@googlegroups.com>
Subject: Re: Hardware assisted short message passing
From: MitchAl...@aol.com (MitchAlsup)
Injection-Date: Wed, 15 Dec 2021 19:31:58 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 65
 by: MitchAlsup - Wed, 15 Dec 2021 19:31 UTC

On Wednesday, December 15, 2021 at 12:11:55 PM UTC-6, Stephen Fuld wrote:
> On 12/14/2021 3:18 PM, MitchAlsup wrote:
> > Short versus long message passing.
> > <
> > At an ISA level, one could disguise one instruction to serve as a means to send
> > short messages. Keyword--disguise.
> > <
> > < -----------------------------I use these so the vertical white space eater does ---------------
> > < ------------------------------not lose my formatting---------------------------------------------------------
> > <
> > Consider a long message, first. A long message must be passed as a pointer to
> > a buffer and a length (or equivalently bounds). HW applies some kind of RDMA
> > and delivers the message.
> There is the issue of whether the message is pushed or pulled, that is,
> is the RDMA done on the source or destination side.
>
> An advantage of doing it on the source side is it improves performance
> by some implementation dependent, but non zero amount. It also reduces
> the hardware requirements on a receiver, as no RDMA hardware is required
> there. These may be minor, but I have yet to see any advantage in doing
> the RDMA on the receiving side.
<
But if the targeted device also has to use messages to "talk" back at the originator,
that RDMA already has to be there. So, for example, a SATA disk or network cont-
roller already have these RDMAs.
<
>
> Then there is the question what is the boundary between short and long,
<
The boundary seems to be the size of the useable register file--something
between about 16 and 24 GPRs.
<
> and is that boundary technology dependent,
<
I don't see why the number of registers in the file are going to change with
technology.
<
> that is, is it likely to move
> in the future with newer technology. If it is likely to move, that
> argues for the same mechanism to be used for any (reasonable) length, in
> order to prevent long term incompatibilities.
<
Your argument is that if we can't solve the general problem, give up.
Not a suitable engineering response.
<
> > <
> > Now consider a short message. This could be a STM (store multiple) instruction
> > which carries its own length (first register, last register, with end around continuance).
> > Such a message is necessarily limited, but likely to suffices for "lots of messages"
> > It might even be used as a courier for a long message RDMAed from the receiving
> > end rather than the sending end.
> > <
> > {It is the multiple registers that enable STM to encode this service request to HW}
<
> All true, but if I understand your proposal, it requires the data
> comprising the short message to be pre-loaded into consecutive
> registers. This seems like a lot of extra work.
<
I think much of the time, especially for short messages, the data will be passing
through the CPU registers shortly before the message is sent. I suspect that
much of the time the address and length of the long message passes through
the GPRs not long before the message is sent, too.
<
> --
> - Stephen Fuld
> (e-mail address disguised to prevent spam)

Re: Hardware assisted short message passing

<spdipt$pn4$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=22296&group=comp.arch#22296

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: sfu...@alumni.cmu.edu.invalid (Stephen Fuld)
Newsgroups: comp.arch
Subject: Re: Hardware assisted short message passing
Date: Wed, 15 Dec 2021 12:22:18 -0800
Organization: A noiseless patient Spider
Lines: 111
Message-ID: <spdipt$pn4$1@dont-email.me>
References: <so2u87$tbg$1@dont-email.me> <66rsJ.178509$IW4.13731@fx48.iad>
<j1f5b5Fqi1oU1@mid.individual.net> <X%LsJ.69620$IB7.16827@fx02.iad>
<j1hnjtFb3giU1@mid.individual.net>
<6b46e828-eb3a-425f-8d99-df538fcfbb58n@googlegroups.com>
<j1hru9FbsqqU1@mid.individual.net>
<885b2425-a5ac-4ab2-9c43-732cb3814704n@googlegroups.com>
<j1i1ssFcuvcU1@mid.individual.net> <sp1eht$ffl$1@dont-email.me>
<j1jghuFl8nkU1@mid.individual.net> <sp2k57$1je$1@dont-email.me>
<j1kf6eFqv51U1@mid.individual.net>
<e4a303c4-a25c-4ffe-b67e-9c3610dd36dbn@googlegroups.com>
<j1kig0FrhmkU1@mid.individual.net>
<eca569b2-1bd3-472a-b264-7edc1ac5a71fn@googlegroups.com>
<j1ltocF4n02U1@mid.individual.net> <sp4k0k$u6m$1@dont-email.me>
<j1mh6dF8ao6U1@mid.individual.net> <sp8hkr$vih$1@dont-email.me>
<df0aa92f-0f8a-4bc1-94b8-0db32e4766b4n@googlegroups.com>
<d6213bb0-2426-4ca8-88f6-5242f541fa95n@googlegroups.com>
<spdb57$39j$1@dont-email.me>
<e80ee81b-0d92-46cc-af62-0d81550817c3n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 15 Dec 2021 20:22:21 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="f33a6ece5b148859190d4d85458962f6";
logging-data="26340"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19P1Epx+oErF8slK1suoRMXyQEiEYdGNbk="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.4.0
Cancel-Lock: sha1:t2oxUGOGhDJuLa1g+3hx+FV7SVA=
In-Reply-To: <e80ee81b-0d92-46cc-af62-0d81550817c3n@googlegroups.com>
Content-Language: en-US
 by: Stephen Fuld - Wed, 15 Dec 2021 20:22 UTC

On 12/15/2021 11:31 AM, MitchAlsup wrote:
> On Wednesday, December 15, 2021 at 12:11:55 PM UTC-6, Stephen Fuld wrote:
>> On 12/14/2021 3:18 PM, MitchAlsup wrote:
>>> Short versus long message passing.
>>> <
>>> At an ISA level, one could disguise one instruction to serve as a means to send
>>> short messages. Keyword--disguise.
>>> <
>>> < -----------------------------I use these so the vertical white space eater does ---------------
>>> < ------------------------------not lose my formatting---------------------------------------------------------
>>> <
>>> Consider a long message, first. A long message must be passed as a pointer to
>>> a buffer and a length (or equivalently bounds). HW applies some kind of RDMA
>>> and delivers the message.
>> There is the issue of whether the message is pushed or pulled, that is,
>> is the RDMA done on the source or destination side.
>>
>> An advantage of doing it on the source side is it improves performance
>> by some implementation dependent, but non zero amount. It also reduces
>> the hardware requirements on a receiver, as no RDMA hardware is required
>> there. These may be minor, but I have yet to see any advantage in doing
>> the RDMA on the receiving side.
> <
> But if the targeted device also has to use messages to "talk" back at the originator,
> that RDMA already has to be there. So, for example, a SATA disk or network cont-
> roller already have these RDMAs.

That is a refutation of my second point, but not the first. And it
doesn't present an advantage of doing it on the receiving side.

>>
>> Then there is the question what is the boundary between short and long,
> <
> The boundary seems to be the size of the useable register file--something
> between about 16 and 24 GPRs.
> <
>> and is that boundary technology dependent,
> <
> I don't see why the number of registers in the file are going to change with
> technology.

Well, after looking it up, Elxsi's short messages were up to 4 or 8
bytes (depending upon whether the receiver was hardware or software), so
there is some evidence that the boundary has moved.

> <
>> that is, is it likely to move
>> in the future with newer technology. If it is likely to move, that
>> argues for the same mechanism to be used for any (reasonable) length, in
>> order to prevent long term incompatibilities.
> <
> Your argument is that if we can't solve the general problem, give up.
> Not a suitable engineering response.

No, not my argument at all. If anything, I am arguing for the
programmer interface be the same for as many different types of messages
as possible. Thus, for example, I want messages to hardware to differ
from messages to software only in destination address. I guess if short
messages can be done faster (not counting transferring fewer bytes) by a
different mechanism, that might be OK, but in general, I don't want the
programmer to have to do anything different if the length of the message
changes (of course other than changing the length indicator).

>>> <
>>> Now consider a short message. This could be a STM (store multiple) instruction
>>> which carries its own length (first register, last register, with end around continuance).
>>> Such a message is necessarily limited, but likely to suffices for "lots of messages"
>>> It might even be used as a courier for a long message RDMAed from the receiving
>>> end rather than the sending end.
>>> <
>>> {It is the multiple registers that enable STM to encode this service request to HW}
> <
>> All true, but if I understand your proposal, it requires the data
>> comprising the short message to be pre-loaded into consecutive
>> registers. This seems like a lot of extra work.
> <
> I think much of the time, especially for short messages, the data will be passing
> through the CPU registers shortly before the message is sent.

Perhaps, but you are adding the requirement that the registers they pass
through are consecutive and in order. This either adds extra work to
load it, or extra work in the compiler's register allocator to insure it
is so.

> I suspect that
> much of the time the address and length of the long message passes through
> the GPRs not long before the message is sent, too.

Again, perhaps, but I can see the information describing the target
address, message length and pointer to the data as a predefined "packet"
existing in memory, with the software just changing the values in some
of the fields in the packet, or even just changing the contents of the
data in the message with each invocation.

Of course, predicting usage of a yet to be implemented feature is, at
best, error prone. :-(

--
- Stephen Fuld
(e-mail address disguised to prevent spam)

Re: Hardware assisted short message passing

<823f68d7-64ee-48e3-b2ae-b25111708dc0n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=22298&group=comp.arch#22298

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a05:6214:d05:: with SMTP id 5mr3334323qvh.46.1639601801796;
Wed, 15 Dec 2021 12:56:41 -0800 (PST)
X-Received: by 2002:aca:646:: with SMTP id 67mr1490319oig.175.1639601801550;
Wed, 15 Dec 2021 12:56:41 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Wed, 15 Dec 2021 12:56:41 -0800 (PST)
In-Reply-To: <spdipt$pn4$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:8d25:95df:9415:9c86;
posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:8d25:95df:9415:9c86
References: <so2u87$tbg$1@dont-email.me> <66rsJ.178509$IW4.13731@fx48.iad>
<j1f5b5Fqi1oU1@mid.individual.net> <X%LsJ.69620$IB7.16827@fx02.iad>
<j1hnjtFb3giU1@mid.individual.net> <6b46e828-eb3a-425f-8d99-df538fcfbb58n@googlegroups.com>
<j1hru9FbsqqU1@mid.individual.net> <885b2425-a5ac-4ab2-9c43-732cb3814704n@googlegroups.com>
<j1i1ssFcuvcU1@mid.individual.net> <sp1eht$ffl$1@dont-email.me>
<j1jghuFl8nkU1@mid.individual.net> <sp2k57$1je$1@dont-email.me>
<j1kf6eFqv51U1@mid.individual.net> <e4a303c4-a25c-4ffe-b67e-9c3610dd36dbn@googlegroups.com>
<j1kig0FrhmkU1@mid.individual.net> <eca569b2-1bd3-472a-b264-7edc1ac5a71fn@googlegroups.com>
<j1ltocF4n02U1@mid.individual.net> <sp4k0k$u6m$1@dont-email.me>
<j1mh6dF8ao6U1@mid.individual.net> <sp8hkr$vih$1@dont-email.me>
<df0aa92f-0f8a-4bc1-94b8-0db32e4766b4n@googlegroups.com> <d6213bb0-2426-4ca8-88f6-5242f541fa95n@googlegroups.com>
<spdb57$39j$1@dont-email.me> <e80ee81b-0d92-46cc-af62-0d81550817c3n@googlegroups.com>
<spdipt$pn4$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <823f68d7-64ee-48e3-b2ae-b25111708dc0n@googlegroups.com>
Subject: Re: Hardware assisted short message passing
From: MitchAl...@aol.com (MitchAlsup)
Injection-Date: Wed, 15 Dec 2021 20:56:41 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 108
 by: MitchAlsup - Wed, 15 Dec 2021 20:56 UTC

On Wednesday, December 15, 2021 at 2:22:25 PM UTC-6, Stephen Fuld wrote:
> On 12/15/2021 11:31 AM, MitchAlsup wrote:
> > On Wednesday, December 15, 2021 at 12:11:55 PM UTC-6, Stephen Fuld wrote:
> >> On 12/14/2021 3:18 PM, MitchAlsup wrote:
> >>> Short versus long message passing.
> >>> <
> >>> At an ISA level, one could disguise one instruction to serve as a means to send
> >>> short messages. Keyword--disguise.
> >>> <
> >>> < -----------------------------I use these so the vertical white space eater does ---------------
> >>> < ------------------------------not lose my formatting---------------------------------------------------------
> >>> <
> >>> Consider a long message, first. A long message must be passed as a pointer to
> >>> a buffer and a length (or equivalently bounds). HW applies some kind of RDMA
> >>> and delivers the message.
> >> There is the issue of whether the message is pushed or pulled, that is,
> >> is the RDMA done on the source or destination side.
> >>
> >> An advantage of doing it on the source side is it improves performance
> >> by some implementation dependent, but non zero amount. It also reduces
> >> the hardware requirements on a receiver, as no RDMA hardware is required
> >> there. These may be minor, but I have yet to see any advantage in doing
> >> the RDMA on the receiving side.
> > <
> > But if the targeted device also has to use messages to "talk" back at the originator,
> > that RDMA already has to be there. So, for example, a SATA disk or network cont-
> > roller already have these RDMAs.
<
> That is a refutation of my second point, but not the first. And it
> doesn't present an advantage of doing it on the receiving side.
> >>
> >> Then there is the question what is the boundary between short and long,
> > <
> > The boundary seems to be the size of the useable register file--something
> > between about 16 and 24 GPRs.
> > <
> >> and is that boundary technology dependent,
> > <
> > I don't see why the number of registers in the file are going to change with
> > technology.
<
> Well, after looking it up, Elxsi's short messages were up to 4 or 8
> bytes (depending upon whether the receiver was hardware or software), so
> there is some evidence that the boundary has moved.
> > <
> >> that is, is it likely to move
> >> in the future with newer technology. If it is likely to move, that
> >> argues for the same mechanism to be used for any (reasonable) length, in
> >> order to prevent long term incompatibilities.
> > <
> > Your argument is that if we can't solve the general problem, give up.
> > Not a suitable engineering response.
<
> No, not my argument at all. If anything, I am arguing for the
> programmer interface be the same for as many different types of messages
> as possible. Thus, for example, I want messages to hardware to differ
> from messages to software only in destination address. I guess if short
> messages can be done faster (not counting transferring fewer bytes) by a
> different mechanism, that might be OK, but in general, I don't want the
> programmer to have to do anything different if the length of the message
> changes (of course other than changing the length indicator).
> >>> <
> >>> Now consider a short message. This could be a STM (store multiple) instruction
> >>> which carries its own length (first register, last register, with end around continuance).
> >>> Such a message is necessarily limited, but likely to suffices for "lots of messages"
> >>> It might even be used as a courier for a long message RDMAed from the receiving
> >>> end rather than the sending end.
> >>> <
> >>> {It is the multiple registers that enable STM to encode this service request to HW}
> > <
> >> All true, but if I understand your proposal, it requires the data
> >> comprising the short message to be pre-loaded into consecutive
> >> registers. This seems like a lot of extra work.
> > <
> > I think much of the time, especially for short messages, the data will be passing
> > through the CPU registers shortly before the message is sent.
<
> Perhaps, but you are adding the requirement that the registers they pass
> through are consecutive and in order. This either adds extra work to
> load it, or extra work in the compiler's register allocator to insure it
> is so.
<
If the task wanting to send a message has to call the message transport service
the consecutive nature of pointer and count can be set by simply making the
parameters appear in argument list order; the compiler has already been trained
to use the ABI and here is where designing the interface properly means both
HW and SW are efficient.
<
for example: read( file_des, buffer, len ) will have &buffer in R2 and len in R3
according to ABI.
<
I find it far easier to get these pairing and sharing of registers into object code
by using the call/return interface properly (than by pounding on the register
allocator.)
<
> > I suspect that
> > much of the time the address and length of the long message passes through
> > the GPRs not long before the message is sent, too.
> Again, perhaps, but I can see the information describing the target
> address, message length and pointer to the data as a predefined "packet"
> existing in memory, with the software just changing the values in some
> of the fields in the packet, or even just changing the contents of the
> data in the message with each invocation.
>
> Of course, predicting usage of a yet to be implemented feature is, at
> best, error prone. :-(
> --
> - Stephen Fuld
> (e-mail address disguised to prevent spam)

Re: Hardware assisted short message passing

<fda51679-b6cf-4d72-88af-cd65ec71c3d5n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=22301&group=comp.arch#22301

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a0c:8124:: with SMTP id 33mr8359449qvc.77.1639613272312;
Wed, 15 Dec 2021 16:07:52 -0800 (PST)
X-Received: by 2002:a9d:4c90:: with SMTP id m16mr10779698otf.129.1639613272009;
Wed, 15 Dec 2021 16:07:52 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Wed, 15 Dec 2021 16:07:51 -0800 (PST)
In-Reply-To: <823f68d7-64ee-48e3-b2ae-b25111708dc0n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2607:fea8:1de1:fb00:31ed:f252:7346:7cf;
posting-account=QId4bgoAAABV4s50talpu-qMcPp519Eb
NNTP-Posting-Host: 2607:fea8:1de1:fb00:31ed:f252:7346:7cf
References: <so2u87$tbg$1@dont-email.me> <66rsJ.178509$IW4.13731@fx48.iad>
<j1f5b5Fqi1oU1@mid.individual.net> <X%LsJ.69620$IB7.16827@fx02.iad>
<j1hnjtFb3giU1@mid.individual.net> <6b46e828-eb3a-425f-8d99-df538fcfbb58n@googlegroups.com>
<j1hru9FbsqqU1@mid.individual.net> <885b2425-a5ac-4ab2-9c43-732cb3814704n@googlegroups.com>
<j1i1ssFcuvcU1@mid.individual.net> <sp1eht$ffl$1@dont-email.me>
<j1jghuFl8nkU1@mid.individual.net> <sp2k57$1je$1@dont-email.me>
<j1kf6eFqv51U1@mid.individual.net> <e4a303c4-a25c-4ffe-b67e-9c3610dd36dbn@googlegroups.com>
<j1kig0FrhmkU1@mid.individual.net> <eca569b2-1bd3-472a-b264-7edc1ac5a71fn@googlegroups.com>
<j1ltocF4n02U1@mid.individual.net> <sp4k0k$u6m$1@dont-email.me>
<j1mh6dF8ao6U1@mid.individual.net> <sp8hkr$vih$1@dont-email.me>
<df0aa92f-0f8a-4bc1-94b8-0db32e4766b4n@googlegroups.com> <d6213bb0-2426-4ca8-88f6-5242f541fa95n@googlegroups.com>
<spdb57$39j$1@dont-email.me> <e80ee81b-0d92-46cc-af62-0d81550817c3n@googlegroups.com>
<spdipt$pn4$1@dont-email.me> <823f68d7-64ee-48e3-b2ae-b25111708dc0n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <fda51679-b6cf-4d72-88af-cd65ec71c3d5n@googlegroups.com>
Subject: Re: Hardware assisted short message passing
From: robfi...@gmail.com (robf...@gmail.com)
Injection-Date: Thu, 16 Dec 2021 00:07:52 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 42
 by: robf...@gmail.com - Thu, 16 Dec 2021 00:07 UTC

A couple of years ago I made a network-on-chip consisting of 56 nodes
connected as a torus. One node was dedicated to shared memory and I/O.
Each node had a small local memory and ROM.
Packets of information which could be considered to be messages were
passed through a routing network. I used to following small packets
(96 bits in size):

// Shared memory / IO is node 62
// Packets automatically deleted by hardware if too old.

typedef struct tagPacket
{ unsigned int rid : 6; // intended reciever (63 = global broadcast)
unsigned int tid : 6; // transmitting node (0 = empty packet)
unsigned int age : 6;
unsigned int ack : 1;
unsigned int type : 6; // read,write,interrupt, etc.
unsigned int pad : 2; // unused bits
unsigned int we : 1; // write enable
unsigned int sel : 4; // byte lane selects
unsigned int addr : 32; // memory / IO address
unsigned int data : 32;
} Packet;

Messsages always moved to the right or downwards. An entire message was
transferred every clock cycle between routers. Packets were queued in a
fifo at the destination node.

It turns out that the NoC did not work that well. There were always about
a half-dozen cores not responding. I had each core displaying a status
character in a grid on the display.

A lot can be done with even a small size message.

I had three 32-bit words as an I/O device mapped into the local memory
space of a node to access network packets. A fourth IO word was for
control and status. Ordinary load / store instructions were used to
access data. Excepting the dedicated shared memory / IO node which was
entirely hardware access. I think programmatic access to the message
packet took much longer than the time required to transmit or recieve
a message. IIRC the maximum distance a message would travel is 15 nodes,
eight across and seven down. That would be only 15 clock cycles unless
the message needed to cycle around again.

Re: Hardware assisted short message passing

<e4aab038-e720-465a-a62c-ae413d27f719n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=22303&group=comp.arch#22303

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a05:6214:2aa3:: with SMTP id js3mr2220177qvb.69.1639615523255;
Wed, 15 Dec 2021 16:45:23 -0800 (PST)
X-Received: by 2002:a9d:110:: with SMTP id 16mr10785566otu.94.1639615523004;
Wed, 15 Dec 2021 16:45:23 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Wed, 15 Dec 2021 16:45:22 -0800 (PST)
In-Reply-To: <fda51679-b6cf-4d72-88af-cd65ec71c3d5n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:8d25:95df:9415:9c86;
posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:8d25:95df:9415:9c86
References: <so2u87$tbg$1@dont-email.me> <66rsJ.178509$IW4.13731@fx48.iad>
<j1f5b5Fqi1oU1@mid.individual.net> <X%LsJ.69620$IB7.16827@fx02.iad>
<j1hnjtFb3giU1@mid.individual.net> <6b46e828-eb3a-425f-8d99-df538fcfbb58n@googlegroups.com>
<j1hru9FbsqqU1@mid.individual.net> <885b2425-a5ac-4ab2-9c43-732cb3814704n@googlegroups.com>
<j1i1ssFcuvcU1@mid.individual.net> <sp1eht$ffl$1@dont-email.me>
<j1jghuFl8nkU1@mid.individual.net> <sp2k57$1je$1@dont-email.me>
<j1kf6eFqv51U1@mid.individual.net> <e4a303c4-a25c-4ffe-b67e-9c3610dd36dbn@googlegroups.com>
<j1kig0FrhmkU1@mid.individual.net> <eca569b2-1bd3-472a-b264-7edc1ac5a71fn@googlegroups.com>
<j1ltocF4n02U1@mid.individual.net> <sp4k0k$u6m$1@dont-email.me>
<j1mh6dF8ao6U1@mid.individual.net> <sp8hkr$vih$1@dont-email.me>
<df0aa92f-0f8a-4bc1-94b8-0db32e4766b4n@googlegroups.com> <d6213bb0-2426-4ca8-88f6-5242f541fa95n@googlegroups.com>
<spdb57$39j$1@dont-email.me> <e80ee81b-0d92-46cc-af62-0d81550817c3n@googlegroups.com>
<spdipt$pn4$1@dont-email.me> <823f68d7-64ee-48e3-b2ae-b25111708dc0n@googlegroups.com>
<fda51679-b6cf-4d72-88af-cd65ec71c3d5n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <e4aab038-e720-465a-a62c-ae413d27f719n@googlegroups.com>
Subject: Re: Hardware assisted short message passing
From: MitchAl...@aol.com (MitchAlsup)
Injection-Date: Thu, 16 Dec 2021 00:45:23 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 53
 by: MitchAlsup - Thu, 16 Dec 2021 00:45 UTC

On Wednesday, December 15, 2021 at 6:07:53 PM UTC-6, robf...@gmail.com wrote:
> A couple of years ago I made a network-on-chip consisting of 56 nodes
> connected as a torus. One node was dedicated to shared memory and I/O.
> Each node had a small local memory and ROM.
> Packets of information which could be considered to be messages were
> passed through a routing network. I used to following small packets
> (96 bits in size):
>
> // Shared memory / IO is node 62
> // Packets automatically deleted by hardware if too old.
>
> typedef struct tagPacket
> {
> unsigned int rid : 6; // intended reciever (63 = global broadcast)
> unsigned int tid : 6; // transmitting node (0 = empty packet)
> unsigned int age : 6;
> unsigned int ack : 1;
> unsigned int type : 6; // read,write,interrupt, etc.
> unsigned int pad : 2; // unused bits
> unsigned int we : 1; // write enable
> unsigned int sel : 4; // byte lane selects
> unsigned int addr : 32; // memory / IO address
> unsigned int data : 32;
> } Packet;
>
> Messsages always moved to the right or downwards. An entire message was
> transferred every clock cycle between routers. Packets were queued in a
> fifo at the destination node.
>
> It turns out that the NoC did not work that well. There were always about
> a half-dozen cores not responding. I had each core displaying a status
> character in a grid on the display.
<
Cray XMP with 8 CPUs provided essentially full memory BW to 6 of the
8 (possible) CPUs, CPU[7] got 60%-ish of what it should have, CPU[8]
basically was left starving much of the time. CRAY YMP solved this by
having the next consumer of the BW allocated in a circular fashion per
port. So, CRAY left about 20% of system performance on the table--rather
similar to your data. 19.3% = 12/62
<
Interesting........
<
>
> A lot can be done with even a small size message.
>
> I had three 32-bit words as an I/O device mapped into the local memory
> space of a node to access network packets. A fourth IO word was for
> control and status. Ordinary load / store instructions were used to
> access data. Excepting the dedicated shared memory / IO node which was
> entirely hardware access. I think programmatic access to the message
> packet took much longer than the time required to transmit or recieve
> a message. IIRC the maximum distance a message would travel is 15 nodes,
> eight across and seven down. That would be only 15 clock cycles unless
> the message needed to cycle around again.

Pages:1234
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor