seqlock: change UP_DMB to UP_RMB to improve performance

read_seq Loop 20,000,000 times
before
233333376
after
183333375

Signed-off-by: hujun5 <hujun5@xiaomi.com>
This commit is contained in:
hujun5
2025-09-18 09:24:28 +08:00
committed by Alan C. Assis
parent 9e3b852d4b
commit 65247f2603
+1 -1
View File
@@ -105,7 +105,7 @@ unsigned int read_seqbegin(FAR const seqcount_t *s)
while (predict_false((seq = s->sequence) & 1));
#ifdef CONFIG_SMP
UP_DMB();
SMP_RMB();
#endif
return seq;