Our atomic ops library supports compilation in the mode where "atomic operations" aren't really atomic, but are protected with "rwlocks" (actually, mutexes). It was supposed to be used on platforms where we don't have native support for atomic ops.
This mode complicates the code significantly. There's a lot of extra declarations, preprocessor macros and wrappers, etc everywhere. But in fact, this mode is almost never used — in a few cases where it was used, that happened by mistake, was caused by an error elsewhere. Furthermore, XtraDB now has (and had it for quite a while) the code that requires atomic ops and cannot be compiled with rwlocks. We build with XtraDB everywhere — meaning atomic ops are supported everywhere where we build.
A suggestion is to remove this "rwlock" mode and remove all that complications that it forced into the code.
Attachments
Issue Links
relates to
MDEV-8403Build on AIX: my_atomic.h", line 121.2: 1506-205 (S) #error atomic ops for this platform are not implemented
rwlocks are not guaranteed to issue expected full memory barrier
if we'll ever need to, we can hide locks behind API anyway
Sergey Vojtovich
added a comment - I like it. Just for the record:
MySQL already removed them, see https://github.com/mysql/mysql-server/commit/885e9d30bdeb0c69db33138b4531eddc4d9bb97e
rwlocks are not guaranteed to issue expected full memory barrier
if we'll ever need to, we can hide locks behind API anyway
People
Sergei Golubchik
Sergei Golubchik
Votes:
0Vote for this issue
Watchers:
2Start watching this issue
Dates
Created:
Updated:
Resolved:
Git Integration
Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.
{"report":{"fcp":870.9000000953674,"ttfb":223.09999990463257,"pageVisibility":"visible","entityId":49539,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"4c3366ee-fe3a-40f8-9eea-cb6d5c7cc4a8","navigationType":0,"readyForUser":979.5999999046326,"redirectCount":0,"resourceLoadedEnd":579,"resourceLoadedStart":238.5,"resourceTiming":[{"duration":24.700000047683716,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":238.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":238.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":263.2000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":24.40000009536743,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/download/contextbatch/css/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true","startTime":238.79999995231628,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":238.79999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":263.2000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":221.69999980926514,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":238.90000009536743,"connectEnd":238.90000009536743,"connectStart":238.90000009536743,"domainLookupEnd":238.90000009536743,"domainLookupStart":238.90000009536743,"fetchStart":238.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":277.59999990463257,"responseEnd":460.59999990463257,"responseStart":299.2000000476837,"secureConnectionStart":238.90000009536743},{"duration":339.90000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/s/099b33461394b8015fc36c0a4b96e19f-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/download/contextbatch/js/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true","startTime":239.09999990463257,"connectEnd":239.09999990463257,"connectStart":239.09999990463257,"domainLookupEnd":239.09999990463257,"domainLookupStart":239.09999990463257,"fetchStart":239.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":278.09999990463257,"responseEnd":579,"responseStart":297.2999999523163,"secureConnectionStart":239.09999990463257},{"duration":71.39999985694885,"initiatorType":"script","name":"https://jira.mariadb.org/s/94c15bff32baef80f4096a08aceae8bc-CDN/lu2bu7/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":239.20000004768372,"connectEnd":239.20000004768372,"connectStart":239.20000004768372,"domainLookupEnd":239.20000004768372,"domainLookupStart":239.20000004768372,"fetchStart":239.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":278.59999990463257,"responseEnd":310.59999990463257,"responseStart":306.7000000476837,"secureConnectionStart":239.20000004768372},{"duration":68.79999995231628,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":239.29999995231628,"connectEnd":239.29999995231628,"connectStart":239.29999995231628,"domainLookupEnd":239.29999995231628,"domainLookupStart":239.29999995231628,"fetchStart":239.29999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":278.7000000476837,"responseEnd":308.09999990463257,"responseStart":305.7999999523163,"secureConnectionStart":239.29999995231628},{"duration":64.39999985694885,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":239.40000009536743,"connectEnd":239.40000009536743,"connectStart":239.40000009536743,"domainLookupEnd":239.40000009536743,"domainLookupStart":239.40000009536743,"fetchStart":239.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":279,"responseEnd":303.7999999523163,"responseStart":302,"secureConnectionStart":239.40000009536743},{"duration":34.799999952316284,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2bu7/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":239.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":239.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":274.2999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":90.5,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":239.59999990463257,"connectEnd":239.59999990463257,"connectStart":239.59999990463257,"domainLookupEnd":239.59999990463257,"domainLookupStart":239.59999990463257,"fetchStart":239.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":280.2999999523163,"responseEnd":330.09999990463257,"responseStart":327.90000009536743,"secureConnectionStart":239.59999990463257},{"duration":35.200000047683716,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2bu7/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/css/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.css?jira.create.linked.issue=true","startTime":239.79999995231628,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":239.79999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":275,"responseStart":0,"secureConnectionStart":0},{"duration":80.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/3339d87fa2538a859872f2df449bf8d0-CDN/lu2bu7/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/js/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.js?jira.create.linked.issue=true&locale=en","startTime":239.79999995231628,"connectEnd":239.79999995231628,"connectStart":239.79999995231628,"domainLookupEnd":239.79999995231628,"domainLookupStart":239.79999995231628,"fetchStart":239.79999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":280.5,"responseEnd":320.2999999523163,"responseStart":302.7000000476837,"secureConnectionStart":239.79999995231628},{"duration":307.7000000476837,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":240.70000004768372,"connectEnd":240.70000004768372,"connectStart":240.70000004768372,"domainLookupEnd":240.70000004768372,"domainLookupStart":240.70000004768372,"fetchStart":240.70000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":298.59999990463257,"responseEnd":548.4000000953674,"responseStart":542.0999999046326,"secureConnectionStart":240.70000004768372},{"duration":309.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":242.79999995231628,"connectEnd":242.79999995231628,"connectStart":242.79999995231628,"domainLookupEnd":242.79999995231628,"domainLookupStart":242.79999995231628,"fetchStart":242.79999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":314.5,"responseEnd":552.2999999523163,"responseStart":544.5,"secureConnectionStart":242.79999995231628},{"duration":126.29999995231628,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":615,"connectEnd":615,"connectStart":615,"domainLookupEnd":615,"domainLookupStart":615,"fetchStart":615,"redirectEnd":0,"redirectStart":0,"requestStart":708.7999999523163,"responseEnd":741.2999999523163,"responseStart":740.4000000953674,"secureConnectionStart":615},{"duration":148.79999995231628,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":862.7000000476837,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":862.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1011.5,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":94,"responseStart":223,"responseEnd":237,"domLoading":229,"domInteractive":1035,"domContentLoadedEventStart":1035,"domContentLoadedEventEnd":1082,"domComplete":1410,"loadEventStart":1410,"loadEventEnd":1410,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1013.5},{"name":"bigPipe.sidebar-id.end","time":1014.2999999523163},{"name":"bigPipe.activity-panel-pipe-id.start","time":1014.5},{"name":"bigPipe.activity-panel-pipe-id.end","time":1015.5999999046326},{"name":"activityTabFullyLoaded","time":1099.4000000953674}],"measures":[],"correlationId":"30ea59d1a23d4b","effectiveType":"4g","downlink":9.6,"rtt":0,"serverDuration":75,"dbReadsTimeInMs":11,"dbConnsTimeInMs":19,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
svoj, what do you think about it?