qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC PATCH V7 16/19] translate-all: introduces tb_flush


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [RFC PATCH V7 16/19] translate-all: introduces tb_flush_safe.
Date: Mon, 10 Aug 2015 18:26:17 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0


On 10/08/2015 17:27, address@hidden wrote:
> +
> +void tb_flush_safe(CPUState *cpu)
> +{
> +#if 0 /* !MTTCG */
> +    tb_flush(cpu);
> +#else
> +    async_run_safe_work_on_cpu(cpu, tb_flush_work, cpu);
> +#endif /* MTTCG */
> +}
> +

I think this can use first_cpu unconditionally; tb_flush only uses its
argument for an error message.

In fact, I think that by definition async_run_safe_work_on_cpu can use
any CPU for its work; it locks out everyone else, so it does not matter
which thread you're on.  So async_run_safe_work_on_cpu could drop the
@cpu argument (becoming async_run_safe_cpu_work) and use first_cpu
unconditionally.

Paolo



reply via email to

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