[Info-vax] If sensitive with ! Data misalignment - Impacts codes/system performances
John Reagan
johnrreagan at earthlink.net
Thu Dec 8 10:52:26 EST 2011
"A famous IT technical writer" <Philippe.vouters at laposte.net> wrote in
message
news:39464d28-b1dc-4de1-9153-5d5d08d05281 at w1g2000vba.googlegroups.com...
> Dear reader,
>
> If sensitive with unaligned data which impacts more or less codes/
> system performances on every processor architecture, three special
> studies on OpenVMS systems highlighting the benefit of data alignment:
> http://vouters.dyndns.org/tima/OpenVMS-Cobol-Effect_of_the_ALIGN_compiler_qualifier.html
> (read the FOREWORD section; the obtained performance figures call for
> no discussion)
The section about COBOL is actually showing a bug in the COBOL compiler that
I fixed for the V2.9 release. For COBOL, the /ALIGN qualifier will NEVER
make alignment faults increase or decrease for COBOL generated code. If the
COBOL compiler knows the data is aligned, it will use more efficient
instructions. If it knows the data is unaligned, it will use more
instructions to avoid the alignment fault. The compiler should never
generate code that would cause an alignment fault on something it clearly
knows is unaligned. [That was the bug in V2.8.]
However, you can get alignment faults if you pass COBOL data onto other
routines (like the DECForms example listed below). DECForms clearly has
some assumptions that the data passes is naturally aligned. COBOL's /ALIGN
will affect that.
> http://vouters.dyndns.org/tima/OpenVMS-IA64-Unaligned_data_accesses.html
> (a study of the HP C compiler generated machine code on Itanium
> processors when data is aligned or unaligned along with the
> corresponding pseudo-algorithm)
There is a Heisenberg issue with the study. As Philippe notes, on Alpha,
ALL unaligned access trap to the PAL code without OpenVMS knowing about it.
On Itanium, some are handled on-chip and others are signalled back to
OpenVMS (since there is no PAL code).
However, when you start tracking alignment faults either with the SDA FLT,
with the DEBUGer's SET BREAK /UNALIGNED, with the various alignment fault
tracking system services, then:
On Alpha, the PAL code cannot just silently fixed up and continue, but
rather it fixes the fault AND signals to OpenVMS so you can take the
breakpoint, etc.
On Itanium, we tell the chip to stop doing on-chip fixups and report ALL
alignment faults to OpenVMS since somebody wants to count them, take a
breakpoint, etc.
> http://vouters.dyndns.org/tima/OpenVMS-Alpha-IA64_Misaligned_pointers.html
> (a performance impact study on both Alpha and Itanium processors of
> misaligned pointers)
>
> Aligned data is what HP suggests in all its literature but does not
> always respect what it states for some products it sells:
> http://vouters.dyndns.org/tima/OpenVMS-DECForms-DECForms_misalignments_and_performances.html
>
> If you have been interest with, I shall be glad. This will mean more
> performant codes over the market to the benefit of every end-users.
> For your company, this will lead to your customers satisfactions,
> possibly impacting revenues.
>
> Philippe Vouters
More information about the Info-vax
mailing list