From 65247f2603233cdecf003fce96280c28786defe6 Mon Sep 17 00:00:00 2001 From: hujun5 Date: Thu, 18 Sep 2025 09:24:28 +0800 Subject: [PATCH] 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 --- include/nuttx/seqlock.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/nuttx/seqlock.h b/include/nuttx/seqlock.h index a6106fbf8e7..d501bb08eac 100644 --- a/include/nuttx/seqlock.h +++ b/include/nuttx/seqlock.h @@ -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;