[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: |
Paolo Bonzini |
Subject: |
Re: [PATCH v3 2/2] accel/tcg: Register a force_rcu notifier |
Date: |
Tue, 9 Nov 2021 19:03:56 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 |
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.
Paolo