@charlotte @joe @8051enthusiast @whitequark concepts like ll/sc or lwarx/stcwx allow you to make (within reason) larger operations atomic, and there is also transactional memory but I’m not sure how widely that is implemented in hardware.
Conversation
Notices
-
Embed this notice
Aaron Sawdey, Ph.D. (acsawdey@fosstodon.org)'s status on Sunday, 27-Jul-2025 00:29:13 JST
Aaron Sawdey, Ph.D.
-
Embed this notice
✧✦Catherine✦✧ (whitequark@mastodon.social)'s status on Sunday, 27-Jul-2025 00:29:13 JST
✧✦Catherine✦✧
@acsawdey @charlotte @joe @8051enthusiast transactional memory exists essentially nowhere, and LL/SC have extremely severe microarchitectural restrictions if you add the requirement of making forward progress, meaning they can't be exposed as primitives to e.g. LLVM IR generators, and have to be fully encapsulated in codegen step, sadly
-
Embed this notice
Aaron Sawdey, Ph.D. (acsawdey@fosstodon.org)'s status on Sunday, 27-Jul-2025 00:34:27 JST
Aaron Sawdey, Ph.D.
@whitequark @charlotte @joe @8051enthusiast I think the problem with transactional memory is people keep trying it and no performance gains are found in software. And yeah, nobody has taught a compiler to make appropriate use of lwarx/stcwx so it is relegated to libraries.
-
Embed this notice
✧✦Catherine✦✧ (whitequark@mastodon.social)'s status on Sunday, 27-Jul-2025 00:34:27 JST
✧✦Catherine✦✧
@acsawdey @charlotte @joe @8051enthusiast i have only a passing familiarity with transactional memory, but isn't another issue with it is that the hardware implementations are fairly limited and require the use of software fallbacks, at which point you might as well just run fallback code as-is?
-
Embed this notice
Aaron Sawdey, Ph.D. (acsawdey@fosstodon.org)'s status on Sunday, 27-Jul-2025 00:38:03 JST
Aaron Sawdey, Ph.D.
@whitequark @charlotte @joe @8051enthusiast yes that’s true as far as I know. The hope is always that the hardware can handle most cases, if not yeah why bother.
It seems like a good idea, but often the problem is hardware and software folks don’t talk enough or understand each other. It’s why people who straddle the line are always in great demand of course.
-
Embed this notice
✧✦Catherine✦✧ (whitequark@mastodon.social)'s status on Sunday, 27-Jul-2025 00:38:03 JST
✧✦Catherine✦✧
@acsawdey @charlotte @joe @8051enthusiast absolutely, yeah
i do quite a bit of hardware/software co-design these days ^^
-
Embed this notice