[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 19:29:23 +0100 |
On Tue, 9 Nov 2021 19:03:56 +0100
Paolo Bonzini <pbonzini@redhat.com> wrote:
> On 11/9/21 18:24, Greg Kurz wrote:> 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.
>
> Once you've tested it I can queue the series with just a
>
> --- a/accel/tcg/tcg-accel-ops-rr.c
> +++ b/accel/tcg/tcg-accel-ops-rr.c
> @@ -141,10 +141,10 @@ static void do_nothing(CPUState *cpu, run_on_cpu_data d)
> 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.
> + * Called with rcu_registry_lock held. rr_kick_next_cpu() is
> + * asynchronous, so there cannot be deadlocks.
> */
> - async_run_on_cpu(first_cpu, do_nothing, RUN_ON_CPU_NULL);
> + rr_kick_next_cpu();
> }
>
> /*
>
> squashed in.
>
I've tested and it works just fine. I need to send a v4 anyway so that
the commit message is in sync with the code changes.
Cheers,
--
Greg
> Paolo
>