Support for the TSO memory model on Arm CPUs
Support for the TSO memory model on Arm CPUs
Posted Apr 28, 2024 20:18 UTC (Sun) by ringerc (subscriber, #3071)In reply to: Support for the TSO memory model on Arm CPUs by anton
Parent article: Support for the TSO memory model on Arm CPUs
It's like database isolation. READ UNCOMMITTED is weaker than READ COMMITTED which is weaker than REPEATABLE READ and so on. Some implementations support some isolation levels and not others. Almost none support totally strict ordering because that makes necessary concurrency almost impossible; instead stronger isolation levels use speculative execution where the transaction can fail and roll back if an isolation requirement cannot be satisfied.
There's more of a spectrum (or really an n-dimensional matrix) of possible ordering decisions in memory ordering and logical order of operations. There is no one right choice - "100% ordered all the time" just isn't feasible with concurrent execution with shared-anything, so *all* design decisions are compromises.
In a database I pick the isolation level most appropriate to my application's requirements. Or even that specific operations; sometimes I want to have stronger guarantees on specific things where I'm more willing to have them slow and/or require retries. So having something similar for the CPU memory model makes perfect sense to me. You use what's appropriate for the app's correctness, latency and throughput requirements.
The LWN site is currently under high scraper load, so comment display has been suppressed for anonymous users. If you are a human, you may read the comments by clicking the button below:
Note: you can avoid this step in the future by logging into your LWN account.
