[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
- [Qemu-devel] [RFC PATCH V7 10/19] cpu: remove exit_request global., (continued)
- [Qemu-devel] [RFC PATCH V7 10/19] cpu: remove exit_request global., fred . konrad, 2015/08/10
- [Qemu-devel] [RFC PATCH V7 12/19] Use atomic cmpxchg to atomically check the exclusive value in a STREX, fred . konrad, 2015/08/10
- [Qemu-devel] [RFC PATCH V7 14/19] cpu: introduce tlb_flush*_all., fred . konrad, 2015/08/10
- [Qemu-devel] [RFC PATCH V7 15/19] arm: use tlb_flush*_all, fred . konrad, 2015/08/10
- [Qemu-devel] [RFC PATCH V7 18/19] mttcg: signal the associated cpu anyway., fred . konrad, 2015/08/10
- [Qemu-devel] [RFC PATCH V7 16/19] translate-all: introduces tb_flush_safe., fred . konrad, 2015/08/10
- [Qemu-devel] [RFC PATCH V7 17/19] translate-all: (wip) use tb_flush_safe when we can't alloc more tb., fred . konrad, 2015/08/10
- [Qemu-devel] [RFC PATCH V7 19/19] target-arm/psci.c: wake up sleeping CPUs (MTTCG), fred . konrad, 2015/08/10
- Re: [Qemu-devel] [RFC PATCH V7 00/19] Multithread TCG., Alex Bennée, 2015/08/10
- Re: [Qemu-devel] [RFC PATCH V7 00/19] Multithread TCG., Benjamin Herrenschmidt, 2015/08/11