Details
-
Task
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Fixed
-
None
Description
As requested in MDEV-27936, s390x for transactional memory of s390 was requested.
In going far to much in the fix for MDEV-27936 the branch containing this was developed.
The first commit is probably a debian compiler downstream issue and will be omitted.
marko, feedback on continuing aspects of this implementation requested please:
For the rest of the s390x changes, target version 10.9?
In making a common s390x/ppc64le htm detection I used a SIGILL based detection modeled of openssl. sigsetjmp not fully understood, seems to avoid SIGILL during testing, but scrutiny requested.
Problems is solves are:
- compatible with non-linux (BSDs)
- compatible with s390x
- The innodb implementation uses transactions without syscalls (please validate this closely that no syscall gets called from under transactional_shared_lock_guard), the feature detection of the suspend mode (not explicitly used, and please don't) and operation system call interface, is overly strict.
- the s390x tm begin implementation defaults to no floats. I assume because I haven't looked at the ISA, that this means that any use of floats under HTM won't get restored on tabort. Is there consequences here?
If all these are moderately on track, what version should the transactional_lock_enabled go into?
Attachments
Issue Links
- relates to
-
MDEV-28137 Some memory transactions are unnecessarily complex
-
- Closed
-
-
MDEV-29324 Compile error in debug mode on s390x (srw_lock.cc)
-
- Closed
-
Activity
Field | Original Value | New Value |
---|---|---|
Assignee | Daniel Black [ danblack ] |
Fix Version/s | 10.6 [ 24028 ] |
Summary | hardware lock ellision on s390x / ppc64 detection improvements | hardware lock elision on s390x / ppc64 detection improvements |
issue.field.resolutiondate | 2022-03-11 00:21:09.0 | 2022-03-11 00:21:09.932 |
Fix Version/s | 10.6.8 [ 27506 ] | |
Fix Version/s | 10.7.4 [ 27504 ] | |
Fix Version/s | 10.8.3 [ 27502 ] | |
Fix Version/s | 10.6 [ 24028 ] | |
Resolution | Fixed [ 1 ] | |
Status | Open [ 1 ] | Closed [ 6 ] |
Link |
This issue relates to |
Link |
This issue relates to |
I think that it should be fine to introduce the s390x lock elision in 10.6.
The critical sections of lock elision should be very small, and I don’t think that they should include any floating-point operations. There should be no system calls either, except maybe for debug assertions that might call write() and abort(), should they hold. I tested the Intel TSX-NI implementation and paid attention to the tx-abort event counts reported by perf, and removed some too optimistic lock elision sections until I got it to a reasonable level. I think that on Intel TSX-NI, any system call would lead to memory transaction abort.