qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] QEMU ARM SMP: IPI delivery delayed until next main loop


From: Alex Züpke
Subject: Re: [Qemu-devel] QEMU ARM SMP: IPI delivery delayed until next main loop event // how to improve IPI latency?
Date: Mon, 15 Jun 2015 18:12:51 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

Am 15.06.2015 um 17:49 schrieb Peter Maydell:
> On 15 June 2015 at 16:36, Alex Züpke <address@hidden> wrote:
>> So this is the way to go:
>>
>> --- a/target-arm/translate.c
>> +++ b/target-arm/translate.c
>> @@ -4084,6 +4084,7 @@ static void gen_nop_hint(DisasContext *s, int val)
>>          gen_set_pc_im(s, s->pc);
>>          s->is_jmp = DISAS_WFI;
>>          break;
>> +    case 1: /* yield */
>>      case 2: /* wfe */
>>          gen_set_pc_im(s, s->pc);
>>          s->is_jmp = DISAS_WFE;
> 
> Actually I want to split out the yield code path from the wfe
> one, because some day we may actually implement WFE as WFE,
> at which point WFE has some trap-to-EL2 logic that YIELD
> doesn't. I was about to write a patch to do that...

OK.

Both the cpu_exit-after-sending-IPI or the YIELD patch would fix my issue, but 
I think the YIELD one fits better.

I updated my testcase to YIELD during polling:
http://www.cs.hs-rm.de/~zuepke/qemu/ipi_yield.elf
3174 bytes, md5sum e74897e6b6d70f472db9e9d657780035


> (If you plan to run your custom OS under a hypervisor you
> might prefer SEV/WFE over YIELD, because then if your custom OS
> is under heavy load the hypervisor has a chance to swap this
> vcpu out and run some other one.)
> 
> thanks
> -- PMM
> 

Thanks for the hint!



Best regards
Alex



reply via email to

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