qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 2/2] accel/tcg: Register a force_rcu notifier


From: Greg Kurz
Subject: Re: [PATCH v3 2/2] accel/tcg: Register a force_rcu notifier
Date: Tue, 9 Nov 2021 18:24:07 +0100

On Tue, 9 Nov 2021 09:21:27 +0100
Richard Henderson <richard.henderson@linaro.org> wrote:

> On 11/9/21 8:54 AM, Richard Henderson wrote:
> > On 11/8/21 12:33 PM, Greg Kurz wrote:
> >> +static void rr_force_rcu(Notifier *notify, void *data)
> >> +{
> >> +    /*
> >> +     * Called with rcu_registry_lock held, using async_run_on_cpu() 
> >> ensures
> >> +     * that there are no deadlocks.
> >> +     */
> >> +    async_run_on_cpu(first_cpu, do_nothing, RUN_ON_CPU_NULL);
> >> +}
> > 
> > Should first_cpu really be rr_current_cpu?
> > It's not clear to me that this will work for -smp 2 -cpu thread=single.
> 

Why wouldn't it work ? IIUC we always have a first_cpu and
async_run_on_cpu() will kick any vCPU currently run by the
RR thread... or am I missing something ?

Anyway, it seems more explicit to use rr_current_cpu.

> Alternately, no async_run_on_cpu at all, just rr_kick_next_cpu().
> 

Heh, this looks even better ! I'll try this right away.

Thanks Richard !

--
Greg

> 
> r~
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]