[Info-vax] yet another sys$qiow question
George Cornelius
cornelius at eisner.decus.org
Tue Aug 18 04:15:28 EDT 2015
In article <oO08vDbfPd84 at eisner.encompasserve.org>, cornelius at eisner.decus.org (George Cornelius) writes:
> Remember that if you poll the IOSB and
> it indicates completion you can go right
> to the buffer without further ado.
That was a rather extreme error. It means I completely forgot
everything I learned about Alpha programming.
No, with Alphas, and I suppose Itania, you cannot make assumptions
about write ordering relative to other processors or even relative
to I/O. Synchronization is necessary.
It's a very disturbing development to have blundered into making
a statement that has been outright wrong for over 20 years.
On the other hand, it has been that long since I worked in a
position in which writing code was part of the job description,
with the minor exception of writing an interface or two at one
point for an older VAX 4000 based DECMessageQ environment.
So I never needed to retain much at all of what I learned
about Alphas.
Not that I had not learned certain key facts early on.
I read the Alpha Architecture Handbook and learned about
memory barriers and LDxL/STxL, the latter all nicely
highlighted in my 1992 edition AARM.
I participated when someone I knew became a beta tester
for a Sandpiper box, a 140Mhz EV4, finding in general
a 10:1 speedup over a VAX 6000-410, and in the case
where there was a discrepancy, finding that by hand coding
in Macro-64 I could speed up certain multiply intensive
instruction mixes well beyond the modest 4:1 speedup
provided by the C compiler, the reason being that that
early compiler did not make use of the fact that most
of an EV4 multiply operation's 19 or 23 cycles can be
overlapped with ordinary integer unit operations.
Nope, never used any of that. Alphas came in eventually
but were used for vendor code and databases, and what
small amount of code I was writing by that time continued
to work fine on the older VAXes and would not be
migrated until much later.
Not that it did not migrate. In fact I do not recall
having a problem migrating anything that I did.
One porting problem that kept a key production program
back on uVAX 3100/80's for several years was a known
bug in telnet's passing of binary data in early TCPIP
Services 5.x rev levels, one whose fix got inadvertently
sidetracked at Digital/Compaq until I finally mentioned
it on comp.os.vms in response to another poster's
complaint, the result being a profuse apology and a quick
release of the lost patch.
Eventually I learned that having detailed knowledge
of Alphas might not even be necessary. First of all,
Macro-64 was desupported quite early on. Secondly,
memory barriers and LDxL/STxL could be avoided by
judicious use of system services, and, perhaps, the
use of library routines or PALcode providing the same
functionality as the old VAX interlocked instructions.
For system services, the emphasis on the term _judicious_
was critical. You could not cut corners or you did not have
the built-in protections.
But 20 years later it all merges together and I am
forgetting that I can't just indiscriminately get away with
coding styles that worked perfectly well on my old VAXen and
PDP11's.
Maybe it's time to stop trying to tell others how to write
code.
George
More information about the Info-vax
mailing list