[ltt-dev] [PATCH] rcutorture: put thread offline while waiting for the init flag
Mathieu Desnoyers
compudj at krystal.dyndns.org
Tue Aug 9 16:47:30 EDT 2011
* Paolo Bonzini (pbonzini at redhat.com) wrote:
> Otherwise, the call_rcu thread might end up in a synchronize_rcu that
> never ends.
Cood catch! Merged,
Thanks,
Mathieu
>
> Signed-off-by: Paolo Bonzini <pbonzini at redhat.com>
> ---
> tests/rcutorture.h | 6 ++++--
> 1 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/tests/rcutorture.h b/tests/rcutorture.h
> index 5ba3d2b..4c6f9da 100644
> --- a/tests/rcutorture.h
> +++ b/tests/rcutorture.h
> @@ -127,9 +127,10 @@ void *rcu_read_perf_test(void *arg)
> rcu_register_thread();
> run_on(me);
> uatomic_inc(&nthreadsrunning);
> + put_thread_offline();
> while (goflag == GOFLAG_INIT)
> poll(NULL, 0, 1);
> - mark_rcu_quiescent_state();
> + put_thread_online();
> while (goflag == GOFLAG_RUN) {
> for (i = 0; i < RCU_READ_RUN; i++) {
> rcu_read_lock();
> @@ -286,9 +287,10 @@ void *rcu_read_stress_test(void *arg)
> int pc;
>
> rcu_register_thread();
> + put_thread_offline();
> while (goflag == GOFLAG_INIT)
> poll(NULL, 0, 1);
> - mark_rcu_quiescent_state();
> + put_thread_online();
> while (goflag == GOFLAG_RUN) {
> rcu_read_lock();
> p = rcu_dereference(rcu_stress_current);
> --
> 1.7.6
>
>
> _______________________________________________
> ltt-dev mailing list
> ltt-dev at lists.casi.polymtl.ca
> http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev
>
--
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com
More information about the lttng-dev
mailing list