urcu:lfqueue-dev2

Last commit made on 2011-08-17
Get this branch:
git clone -b lfqueue-dev2 https://git.launchpad.net/urcu

Branch merges

Branch information

Name:
lfqueue-dev2
Repository:
lp:urcu

Recent commits

21002fc... by Mathieu Desnoyers on 2011-08-17

Merge branch 'lfqueue-dev' into lfqueue-dev2

e7385b9... by Mathieu Desnoyers on 2011-08-17

Merge branch 'master' into lfqueue-dev

83a2c42... by Paolo Bonzini <email address hidden> on 2011-08-17

urcu-qsbr: avoid useless futex wakeups and burning CPU for long grace periods

I noticed that urcu makes exactly _one_ attempt at using futexes
to avoid busy looping on synchronize_rcu. The attached patch instead
switches from busy waiting to futexes after RCU_QS_ACTIVE_ATTEMPTS.
To limit the amount of system calls, reading threads remember whether
they already had a quiescent state in this grace period; if so they were
already removed from the list, and can avoid signaling the futex.

Performance measured with rcutorture (nreaders: 10, nupdaters: 1,
duration: 10, median of nine runs):

     RCU_QS_ACTIVE_ATTEMPTS == 100, no patch n_updates = 292
     RCU_QS_ACTIVE_ATTEMPTS == 1, no patch n_updates = 290
     RCU_QS_ACTIVE_ATTEMPTS == 100, with patch n_updates = 408
     RCU_QS_ACTIVE_ATTEMPTS == 1, with patch n_updates = 404

(the first two cases are obviously the same; the only change is
when the futex is used, but over many calls there is no difference).

This patch matches the update to the Promela model.

Signed-off-by: Paolo Bonzini <email address hidden>
Signed-off-by: Mathieu Desnoyers <email address hidden>

78bec10... by Paolo Bonzini <email address hidden> on 2011-08-17

api: reimplement BUILD_BUG_ON in compiler.h

Even though it's just two lines of code, I'm reimplementing it
cleanly out of paranoia.

Signed-off-by: Paolo Bonzini <email address hidden>
Signed-off-by: Mathieu Desnoyers <email address hidden>

8c4f494... by Paolo Bonzini <email address hidden> on 2011-08-17

test api cleanup: remove unused primitives

[ Mathieu: the rationale for this is that we can always add back that
  code if every needed. Removing leftover GPLv2 test code is an
  incentive to create the appropriate library-wide LGPL/MIT-style
  abstractions.]

Signed-off-by: Paolo Bonzini <email address hidden>
Signed-off-by: Mathieu Desnoyers <email address hidden>

43d2641... by Paolo Bonzini <email address hidden> on 2011-08-09

put thread offline while waiting for the init flag

Otherwise, the call_rcu thread might end up in a synchronize_rcu that
never ends.

Signed-off-by: Paolo Bonzini <email address hidden>
Signed-off-by: Mathieu Desnoyers <email address hidden>

b6df4e9... by Paolo Bonzini <email address hidden> on 2011-08-09

urcu: move private definitions to .c file

The reader does not and should not know about RCU_QS_ACTIVE_ATTEMPTS
and KICK_READER_LOOPS. Move the definition to urcu.c.

Signed-off-by: Paolo Bonzini <email address hidden>
Signed-off-by: Mathieu Desnoyers <email address hidden>

c92b27e... by Paolo Bonzini <email address hidden> on 2011-08-09

urcu-bp: move private definitions to .c file

The reader does not and should not know about RCU_QS_ACTIVE_ATTEMPTS.
Move the definition to urcu-bp.c.

Signed-off-by: Paolo Bonzini <email address hidden>
Signed-off-by: Mathieu Desnoyers <email address hidden>

408f6d9... by Paolo Bonzini <email address hidden> on 2011-08-09

urcu-qsbr: move private definitions to .c file

The reader does not and should not know about RCU_QS_ACTIVE_ATTEMPTS.
Move the definition to urcu-qsbr.c. Also remove KICK_READER_LOOPS.

Signed-off-by: Paolo Bonzini <email address hidden>
Signed-off-by: Mathieu Desnoyers <email address hidden>

8d0693d... by Paolo Bonzini <email address hidden> on 2011-08-09

rcutorture: fix rcutorture-qsbr

rcutorture-qsbr is not marking quiescent states, so it will always
have just one update in the whole test. Fix it.

Signed-off-by: Paolo Bonzini <email address hidden>
Signed-off-by: Mathieu Desnoyers <email address hidden>