Need card #285 · Relevance High · Status New

Lost Atomic Update on Loongson CPU

Updated 10/1/2026, 22:07:23

Problem

An atomic update loss bug occurs on Loongson CPUs, causing data inconsistency in multi-threaded contexts. The fix requires setting bit 13 of an undocumented internal CSR MCSR24 to 1, with only a slight performance impact.

Pain points

Questions to verify

Evidence

quote
The fix is to set bit 13 of MCSR24 to 1. MCSR24 is an internal CSR whose function is not described in the manual. After setting this bit, the lost update no longer occurs. Testing showed the performance loss is very small: single-core performance is unaffected, and multi-core performance drops only slightly. Presumably this is a so-called “chicken bit”.

Disclaimer: this card is distilled by AI from community discussions as “pain point evidence”. It is a starting point for need analysis and validation, not a “validated market need”. AI has analytical limits; please open the original discussion above to manually verify before key decisions.