(Already asked on c.o.v. but this may be the more direct, less cluttered, approach.)
Alpha and Itanium had data alignment requirements with penalties for faulting. Does x86-64? Is sys$start_align_fault_report() et al. still relevant?
Using an alignment fault generator and reporter I'm seeing plenty on Alpha and Itanium; zero on x86-64 (V9.1-A).
Is this an interim result due to the EAK?
Will alignment fault reporting be activated in a more final V9.2?
x86-64 data aligment / faulting
-
- VSI Expert
- Active Contributor
- Posts: 40
- Joined: Mon Jun 10, 2019 9:23 am
- Reputation: 1
- Status: Offline
Re: x86-64 data aligment / faulting
I know that unaligned data does not cause nearly as serious performance problems on the x86 platform as Itanium. I do not have details but hope an engineer will followup.
Added in 2 hours 2 minutes 16 seconds:
From VSI Engineering:
On Alpha and IA64, accessing unaligned data results in an exception and an exception handler fixes up the read and records the alignment fault. On X86, there is no such thing as an alignment fault nor is there a performance penalty for accessing unaligned data. The various tools to report alignment faults are still present on X86, but they are not relevant and will never report any alignment faults.
Added in 2 hours 2 minutes 16 seconds:
From VSI Engineering:
On Alpha and IA64, accessing unaligned data results in an exception and an exception handler fixes up the read and records the alignment fault. On X86, there is no such thing as an alignment fault nor is there a performance penalty for accessing unaligned data. The various tools to report alignment faults are still present on X86, but they are not relevant and will never report any alignment faults.
Dave Sweeney
CEO
VMS Software, Inc.
Boston, MA USA
CEO
VMS Software, Inc.
Boston, MA USA
-
Topic author - Valued Contributor
- Posts: 62
- Joined: Mon Feb 28, 2022 5:16 pm
- Reputation: 0
- Location: Adelaide, South Australia
- Status: Offline
- Contact:
Re: x86-64 data aligment / faulting
Many thanks Dave. Short, sweet and definitive. I will pass this on to c.o.v.
Re: x86-64 data aligment / faulting
To expand on the answer above, I posted this to comp.os.vms
On Alpha, all unaligned access trap to the PAL code where the unaligned operation
is fixed up without the knowledge of OpenVMS. Fast and quick.
On Itanium, unaligned accesses within the same cache line are handled by the chip
unless the 'ac' flag is set in the User Mask register.
From the Itanium SRM Volume 1
ac 3 Alignment check for data memory references (including IA-32)
0: unaligned data memory references may cause an Unaligned Data Reference fault.
1: all unaligned data memory references cause an Unaligned Data Reference fault.
When trapped to OpenVMS, there are several possible spinlocks that need to be acquired
in the event that the unaligned access might be with memory that is being deallocated by
another CPU.
On x86, at this point, we don't even turn on the trapping. I'm sure there are hardware
performance registers that count them globally but OpenVMS doesn't ask about that.
Tools like MONITOR ALIGNMENT and the various system services to report alignment
faults will just return 0s.
On Alpha, all unaligned access trap to the PAL code where the unaligned operation
is fixed up without the knowledge of OpenVMS. Fast and quick.
On Itanium, unaligned accesses within the same cache line are handled by the chip
unless the 'ac' flag is set in the User Mask register.
From the Itanium SRM Volume 1
ac 3 Alignment check for data memory references (including IA-32)
0: unaligned data memory references may cause an Unaligned Data Reference fault.
1: all unaligned data memory references cause an Unaligned Data Reference fault.
When trapped to OpenVMS, there are several possible spinlocks that need to be acquired
in the event that the unaligned access might be with memory that is being deallocated by
another CPU.
On x86, at this point, we don't even turn on the trapping. I'm sure there are hardware
performance registers that count them globally but OpenVMS doesn't ask about that.
Tools like MONITOR ALIGNMENT and the various system services to report alignment
faults will just return 0s.
-
- Master
- Posts: 142
- Joined: Fri Jun 28, 2019 8:45 am
- Reputation: 0
- Location: South Tyneside, UK
- Status: Offline
- Contact:
Re: x86-64 data aligment / faulting
are there plans to turn on alignment fault trapping and have the usual tools generate useful data?
Ian Miller
[ personal opinion only. usual disclaimers apply. Do not taunt happy fun ball ].
[ personal opinion only. usual disclaimers apply. Do not taunt happy fun ball ].
-
- Master
- Posts: 342
- Joined: Fri Apr 17, 2020 7:31 pm
- Reputation: 0
- Location: Rhode Island, USA
- Status: Offline
- Contact:
Re: x86-64 data aligment / faulting
Why should they?
The impact of unaligned access is somewhere in the zero to small range.
There would be little value of such a report.
The impact of unaligned access is somewhere in the zero to small range.
There would be little value of such a report.