Download VAX MP Technical Overview
Transcript
Therefore, while using native-mode interlocked implementation has some benefits compared to portable mode 85, it may cause instability and retry loop timeouts in third-party components (user-mode applications and privileged code) in the following cases: • If the component contains preemptable code (user-mode code or privileged mode code executing at IPL < 3) that uses retry loop count on interlocked queue instructions (INSQHI, INSQTI, REMQHI, REMQTI) smaller than min(900000, LOCKRETRY). • If preemptable code uses finite retry count on interlocked queue instructions and queue header also gets locked with BBSSI instruction. • If preemptable code tries to lock interlocked queue header with BBSSI instruction and uses finite retry count for this BBSSI. • If non-preemptable code (kernel-mode code executing at IPL >= 3) uses smaller retry count for interlocked queue instructions than is hardwired in VMS macros $REMQHI, $REMQTI, $INSQHI or $INSQTI, i.e. 900,000 times, or set by SYSGEN parameter LOCKRETRY, whichever is less, i.e. smaller than min(900000, LOCKRETRY). • If non-preemptable code tries to lock interlocked queue header with BBSSI instruction and uses retry count yielding total number of instructions executed in retry loop lesser than 3 * min(900000, LOCKRETRY). We are not aware at the moment of any applications or components that do this, but they might exist. Under native-mode interlock implementation, such code would be secured from failing only by “soft” safeguards, but not by “hard” safeguard of the synchronization window, and may fail. For this reason, VAX MP provides both implementations of interlocked instructions (on platform where native-mode interlock can be implemented) – both portable and native mode implementations – but with configurable option that allows user to switch between the implementations. Default is to use portable implementation. Native-mode implementation can be enabled at the time VSMP is started with the following option: VSMP LOAD INTERLOCK=NATIVE SYNCW=ALL and is likely to be preferable from performance viewpoint when system does not run applications and components that use tighter interlocked queue retry limits than OpenVMS itself does. 86 85 Chiefly, eliminating overhead associated with system calls to elevate and demote VCPU thread priority when executing BBSSI, BBCCI and ADAWI instructions (but not interlocked queue instructions). Also avoidance of false sharing of lock index, i.e. situation when different interlocked operand addresses map to the same lock index. 86 We also considered an option for hybrid mode, based on native mode but supplemented with interlocked queue instructions (but not BBSSI, BBCCI and ADAWI instructions) acquiring locks from a hashed set of locks indexed by 70