smp_rendezvous_action: Are atomics correctly used ?

From: Alexandre Martins <alexandre.martins_at_stormshield.eu>
Date: Thu, 09 Mar 2017 10:43:14 +0100
Hello,

I'm curently reading the code of the function smp_rendezvous_action, in 
kern/subr_smp.c file. In that function, i see that the variable smp_rv_waiters 
is read in some while() loop in a non-atomic way.

https://svnweb.freebsd.org/base/head/sys/kern/subr_smp.c?view=annotate#l412
https://svnweb.freebsd.org/base/head/sys/kern/subr_smp.c?view=annotate#l458
https://svnweb.freebsd.org/base/head/sys/kern/subr_smp.c?view=annotate#l472

I suspect one of my freeze to be due by that.

Should this function be patched to use 
"atomic_load_acq_int(&smp_rv_waiters[])" ?

Best regards

-- 
Alexandre Martins
STORMSHIELD


Received on Thu Mar 09 2017 - 08:41:46 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:10 UTC