From mboxrd@z Thu Jan 1 00:00:00 1970 From: pbonzini@redhat.com (Paolo Bonzini) Date: Wed, 8 Jun 2011 11:17:18 +0200 Subject: [ltt-dev] [PATCH] call_rcu: keep BUSY flag set as long as possible In-Reply-To: <1307523558-16960-1-git-send-email-pbonzini@redhat.com> References: <1307523558-16960-1-git-send-email-pbonzini@redhat.com> Message-ID: <1307524638-17313-1-git-send-email-pbonzini@redhat.com> Signed-off-by: Paolo Bonzini --- Not a correctness issue, and it will just save a syscall in rare cases. Can be committed separately, or squashed in patch 8 (that would be my favorite option), or left out altogether. urcu-call-rcu-impl.h | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/urcu-call-rcu-impl.h b/urcu-call-rcu-impl.h index 165956e..c45928a 100644 --- a/urcu-call-rcu-impl.h +++ b/urcu-call-rcu-impl.h @@ -214,6 +214,9 @@ static void *call_rcu_thread(void *arg) if (&crdp->cbs.head == _CMM_LOAD_SHARED(crdp->cbs.tail)) break; + /* False alarm... another bunch is ready. */ + cmm_smp_mb(); + uatomic_or(&crdp->flags, URCU_CALL_RCU_BUSY); } while ((cbs = _CMM_LOAD_SHARED(crdp->cbs.head)) == NULL) poll(NULL, 0, 1); -- 1.7.4.4