From: Richard Henderson <richard.henderson@linaro.org>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>, qemu-devel@nongnu.org
Subject: Re: [PATCH v3 00/10] accel/tcg: Improve tb_flush usage
Date: Wed, 24 Sep 2025 09:39:00 -0700 [thread overview]
Message-ID: <9758de22-e663-412a-b536-a8fcce30ffbc@linaro.org> (raw)
In-Reply-To: <6ef7e6e1-9ac1-466d-b4bc-332e135c258e@linaro.org>
On 9/24/25 05:14, Philippe Mathieu-Daudé wrote:
> On 23/9/25 23:54, Richard Henderson wrote:
>> It is too easy to mis-use tb_flush(). For instance, because of
>> the cpu argument, some parts assumed that it needed to call the
>> global flush function for every cpu. It is easy to forget that
>> the flush is not complete when the call returns: we have merely
>> queued work to the cpu run loop. So: remove tb_flush and expose
>> only the core as tb_flush__exclusive, to be used only when we
>> are already within an exclusive context.
>>
>> In some cases (gdbstub, alpha, riscv, ppc spapr),
>> we can eliminate the need for tb_flush completely.
>>
>> Changes for v3:
>> - Rename to tb_flush__exclusive_or_serial; retain the serial
>> check within, not updating to exclusive only.
>> - Rename the existing tb_flush to queue_tb_flush; retain the
>> sequence number check for duplicated flushes.
>> - Drop EXCP_TB_FLUSH.
>
> When using my split-accel branch, I had good results with v2.
>
> I'm getting crashes with v3:
Are you sure you didn't just get lucky with v2?
There's little functional change to v3...
Point me at your branch? While I can't test HVF, I can double-check at how you integrated
the flush.
r~
prev parent reply other threads:[~2025-09-24 16:40 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-23 21:54 [PATCH v3 00/10] accel/tcg: Improve tb_flush usage Richard Henderson
2025-09-23 21:54 ` [PATCH v3 01/10] gdbstub: Remove tb_flush uses Richard Henderson
2025-09-23 21:54 ` [PATCH v3 02/10] target/alpha: Simplify call_pal implementation Richard Henderson
2025-09-23 21:54 ` [PATCH v3 03/10] target/riscv: Record misa_ext in TCGTBCPUState.cs_base Richard Henderson
2025-09-23 21:54 ` [PATCH v3 04/10] hw/ppc/spapr: Use tb_invalidate_phys_range in h_page_init Richard Henderson
2025-09-24 3:20 ` Philippe Mathieu-Daudé
2025-09-23 21:54 ` [PATCH v3 05/10] accel/tcg: Split out tb_flush__exclusive_or_serial Richard Henderson
2025-09-25 2:15 ` Philippe Mathieu-Daudé
2025-09-23 21:54 ` [PATCH v3 06/10] accel/tcg: Move post-load tb_flush to vm_change_state hook Richard Henderson
2025-09-23 21:54 ` [PATCH v3 07/10] plugins: Use tb_flush__exclusive_or_serial Richard Henderson
2025-09-23 21:54 ` [PATCH v3 08/10] linux-user: Split out begin_parallel_context Richard Henderson
2025-09-24 3:23 ` Philippe Mathieu-Daudé
2025-09-23 21:54 ` [PATCH v3 09/10] accel/tcg: Create queue_tb_flush from tb_flush Richard Henderson
2025-09-24 3:26 ` Philippe Mathieu-Daudé
2025-09-23 21:54 ` [PATCH v3 10/10] accel/tcg: Improve buffer overflow in tb_gen_code Richard Henderson
2025-09-24 12:14 ` [PATCH v3 00/10] accel/tcg: Improve tb_flush usage Philippe Mathieu-Daudé
2025-09-24 16:39 ` Richard Henderson [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9758de22-e663-412a-b536-a8fcce30ffbc@linaro.org \
--to=richard.henderson@linaro.org \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).