[ltt-dev] [PATCH 09/10] call_rcu: factor polling from RT and non-RT cases

Mathieu Desnoyers compudj at krystal.dyndns.org
Thu Jun 9 10:06:53 EDT 2011


* Paolo Bonzini (pbonzini at redhat.com) wrote:
> This has the additional advantage of introducing a small delay before
> consecutive checks of the list.  In case call_rcu is very busy, this and
> the following patch practically eliminate the difference between the RT
> and non-RT version.

Not sure this patch is still relevant with current git head ? If yes,
can you rebase it ?

Thanks,

Mathieu

> 
> Signed-off-by: Paolo Bonzini <pbonzini at redhat.com>
> ---
>  urcu-call-rcu-impl.h |    7 ++-----
>  1 files changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/urcu-call-rcu-impl.h b/urcu-call-rcu-impl.h
> index 9824515..d8570e3 100644
> --- a/urcu-call-rcu-impl.h
> +++ b/urcu-call-rcu-impl.h
> @@ -205,6 +205,7 @@ static void *call_rcu_thread(void *arg)
>  	thread_call_rcu_data = crdp;
>  	for (;;) {
>  		for (;;) {
> +			poll(NULL, 0, 10);
>  			if (&crdp->cbs.head
>  			    == _CMM_LOAD_SHARED(crdp->cbs.tail)) {
>  				uatomic_and(&crdp->flags, ~URCU_CALL_RCU_BUSY);
> @@ -237,12 +238,8 @@ static void *call_rcu_thread(void *arg)
>  		cmm_smp_mb();
>  		if (uatomic_read(&crdp->flags) & URCU_CALL_RCU_STOP)
>  			break;
> -		if (uatomic_read(&crdp->flags) & URCU_CALL_RCU_RT)
> -			poll(NULL, 0, 10);
> -		else {
> +		if ((uatomic_read(&crdp->flags) & URCU_CALL_RCU_RT) == 0)
>  			call_rcu_wait(crdp);
> -			poll(NULL, 0, 10);
> -		}
>  	}
>  	uatomic_or(&crdp->flags, URCU_CALL_RCU_STOPPED);
>  	return NULL;
> -- 
> 1.7.4.4
> 
> 
> 
> _______________________________________________
> 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