[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC 10/10] cpus: Do not sleep if some work item is pending
From: |
Alvise Rigo |
Subject: |
[Qemu-devel] [RFC 10/10] cpus: Do not sleep if some work item is pending |
Date: |
Thu, 26 May 2016 18:35:49 +0200 |
If a VCPU returns EXCP_HALTED from the guest code execution and in the
mean time receives a work item, it will go to sleep without processing
the job.
Before sleeping, check if any work has been added.
Signed-off-by: Alvise Rigo <address@hidden>
---
cpus.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cpus.c b/cpus.c
index 7bc96e2..3d19a2e 100644
--- a/cpus.c
+++ b/cpus.c
@@ -1477,7 +1477,7 @@ static void *qemu_tcg_cpu_thread_fn(void *arg)
handle_icount_deadline();
- if (sleep) {
+ if (sleep && cpu->queued_work_first == NULL) {
qemu_cond_wait(cpu->halt_cond, &qemu_global_mutex);
}
--
2.8.3
- [Qemu-devel] [RFC 00/10] MTTCG: Slow-path for atomic insns, Alvise Rigo, 2016/05/26
- [Qemu-devel] [RFC 01/10] exec: Introduce tcg_exclusive_{lock, unlock}(), Alvise Rigo, 2016/05/26
- [Qemu-devel] [RFC 04/10] cputlb: Introduce tlb_flush_other(), Alvise Rigo, 2016/05/26
- [Qemu-devel] [RFC 03/10] cpus: Introduce async_wait_run_on_cpu(), Alvise Rigo, 2016/05/26
- [Qemu-devel] [RFC 02/10] softmmu_llsc_template.h: Move to multi-threading, Alvise Rigo, 2016/05/26
- [Qemu-devel] [RFC 05/10] target-arm: End TB after ldrex instruction, Alvise Rigo, 2016/05/26
- [Qemu-devel] [RFC 06/10] cputlb: Add tlb_tables_flush_bitmap(), Alvise Rigo, 2016/05/26
- [Qemu-devel] [RFC 09/10] cputlb: Query tlb_flush_page_all, Alvise Rigo, 2016/05/26
- [Qemu-devel] [RFC 07/10] cputlb: Query tlb_flush_by_mmuidx, Alvise Rigo, 2016/05/26
- [Qemu-devel] [RFC 08/10] cputlb: Query tlb_flush_page_by_mmuidx, Alvise Rigo, 2016/05/26
- [Qemu-devel] [RFC 10/10] cpus: Do not sleep if some work item is pending,
Alvise Rigo <=