[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC PATCH] target-arm/psci.c: wake up sleeping CPUs (M
From: |
Alex Bennée |
Subject: |
Re: [Qemu-devel] [RFC PATCH] target-arm/psci.c: wake up sleeping CPUs (MTTCG) |
Date: |
Wed, 24 Jun 2015 19:15:56 +0100 |
Paolo Bonzini <address@hidden> writes:
> On 24/06/2015 19:18, Alex Bennée wrote:
>>>> >> @@ -196,6 +196,8 @@ void arm_handle_psci_call(ARMCPU *cpu)
>>>> >> }
>>>> >> target_cpu_class->set_pc(target_cpu_state, entry);
>>>> >>
>>>> >> + qemu_cond_signal(target_cpu_state->halt_cond);
>>> >
>>> > That's called qemu_cpu_kick(target_cpu_state). :) The patch should be
>>> > acceptable now upstream, I think.
>> Oh so this might well fail in KVM too?
>>
>> The qemu_cpu_kick does a qemu_cond_broadcast(cpu->halt_cond) which seems
>> a little excessive? Won't all sleeping CPUs wake up (and return to sleep)?
>
> On KVM (and I assume on MT-TCG), each CPU has a different halt_cond.
You are right of course, I got my sense the wrong way around. Given it
is per-cpu I wonder if you will ever have multiple threads waiting on
it?
Anyway I'll fix that up and re-submit after I've tested to see of these
test cases break current KVM.
>
> Paolo
--
Alex Bennée
- [Qemu-devel] [RFC PATCH] target-arm/psci.c: wake up sleeping CPUs (MTTCG), Alex Bennée, 2015/06/24
- Re: [Qemu-devel] [RFC PATCH] target-arm/psci.c: wake up sleeping CPUs (MTTCG), Paolo Bonzini, 2015/06/24
- Re: [Qemu-devel] [RFC PATCH] target-arm/psci.c: wake up sleeping CPUs (MTTCG), Alex Bennée, 2015/06/24
- Re: [Qemu-devel] [RFC PATCH] target-arm/psci.c: wake up sleeping CPUs (MTTCG), Peter Maydell, 2015/06/24
- Re: [Qemu-devel] [RFC PATCH] target-arm/psci.c: wake up sleeping CPUs (MTTCG), Andrew Jones, 2015/06/25
- Re: [Qemu-devel] [RFC PATCH] target-arm/psci.c: wake up sleeping CPUs (MTTCG), Alex Bennée, 2015/06/26
- Re: [Qemu-devel] [RFC PATCH] target-arm/psci.c: wake up sleeping CPUs (MTTCG), Andrew Jones, 2015/06/26
Re: [Qemu-devel] [RFC PATCH] target-arm/psci.c: wake up sleeping CPUs (MTTCG), Alexander Spyridakis, 2015/06/24