x86-64 data aligment / faulting

OpenVMS x86 Field Test questions, reports, and feedback.
Post Reply

Topic author
mgdaniel
Valued Contributor
Posts: 62
Joined: Mon Feb 28, 2022 5:16 pm
Reputation: 0
Location: Adelaide, South Australia
Status: Offline
Contact:

x86-64 data aligment / faulting

Post by mgdaniel » Mon Feb 28, 2022 5:24 pm

(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?


madsweeney
VSI Expert
Active Contributor
Posts: 40
Joined: Mon Jun 10, 2019 9:23 am
Reputation: 1
Status: Offline

Re: x86-64 data aligment / faulting

Post by madsweeney » Tue Mar 15, 2022 7:04 am

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.
Dave Sweeney
CEO
VMS Software, Inc.
Boston, MA USA


Topic author
mgdaniel
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

Post by mgdaniel » Tue Mar 15, 2022 11:45 am

Many thanks Dave. Short, sweet and definitive. I will pass this on to c.o.v.


jreagan
VSI Expert
Master
Posts: 134
Joined: Tue Dec 01, 2020 8:40 am
Reputation: 0
Status: Offline

Re: x86-64 data aligment / faulting

Post by jreagan » Wed Mar 16, 2022 9:11 am

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.

User avatar

imiller
Master
Posts: 130
Joined: Fri Jun 28, 2019 8:45 am
Reputation: 0
Location: South Tyneside, UK
Status: Offline
Contact:

Re: x86-64 data aligment / faulting

Post by imiller » Fri Apr 08, 2022 11:46 am

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 ].

User avatar

arne_v
Master
Posts: 299
Joined: Fri Apr 17, 2020 7:31 pm
Reputation: 0
Location: Rhode Island, USA
Status: Offline
Contact:

Re: x86-64 data aligment / faulting

Post by arne_v » Sat Apr 09, 2022 2:35 pm

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.
Arne
arne@vajhoej.dk
VMS user since 1986

Post Reply