[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [Qemu-devel] [PATCH RFC 2/4] target-ppc: with MTTCG repor
From: |
Nikunj A Dadhania |
Subject: |
Re: [Qemu-ppc] [Qemu-devel] [PATCH RFC 2/4] target-ppc: with MTTCG report more threads |
Date: |
Sat, 03 Sep 2016 22:04:13 +0530 |
User-agent: |
Notmuch/0.21 (https://notmuchmail.org) Emacs/25.0.94.1 (x86_64-redhat-linux-gnu) |
Greg Kurz <address@hidden> writes:
> On Fri, 02 Sep 2016 15:04:47 +0530
> Nikunj A Dadhania <address@hidden> wrote:
>
>> Greg Kurz <address@hidden> writes:
>>
>> > On Fri, 2 Sep 2016 12:02:54 +0530
>> > Nikunj A Dadhania <address@hidden> wrote:
>> >
>> >> Signed-off-by: Nikunj A Dadhania <address@hidden>
>> >> ---
>> >
>> > Shouldn't this patch be the last one, when all other issues have been
>> > addressed ?
>> >
>> >> target-ppc/kvm.c | 2 +-
>> >> target-ppc/kvm_ppc.h | 2 +-
>> >> 2 files changed, 2 insertions(+), 2 deletions(-)
>> >>
>> >> diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c
>> >> index dcb68b9..20eb450 100644
>> >> --- a/target-ppc/kvm.c
>> >> +++ b/target-ppc/kvm.c
>> >> @@ -2090,7 +2090,7 @@ void kvmppc_set_mpic_proxy(PowerPCCPU *cpu, int
>> >> mpic_proxy)
>> >>
>> >> int kvmppc_smt_threads(void)
>> >> {
>> >> - return cap_ppc_smt ? cap_ppc_smt : 1;
>> >> + return cap_ppc_smt ? cap_ppc_smt : 8;
>> >
>> > If KVM is there but does not support SMT processor modes, it looks
>> > wrong to return anything but 1. This check needs kvm_enabled().
>>
>> This also gets called when emulating PPC on PPC.
>>
>
> Yes and the current value of 1 is the default for non HV KVM and TCG. If
> you want to change the default for MTTCG, then you need separate paths.
>
>> > Also, why 8 ? This depends on the CPU model.
>>
>> Not sure if I need to emulate according to the host cpu model. I had
>> selected 8, as that was the highest number of threads possible for POWER.
>>
>
> If running in full emulation and cpu type is POWER7, this shouldn't be
> higher than 4.
>
> In the end, something like:
>
> int kvmppc_smt_threads(void)
> {
> if (kvm_enabled()) {
> return cap_ppc_smt ? cap_ppc_smt : 1;
> } else {
> return 8_or_4_or_2_or_1_depending_on_the_cpu_model;
> }
> }
Sure, will need something like this.
Regards,
Nikunj
- Re: [Qemu-ppc] [Qemu-devel] [PATCH RFC 1/4] spapr-hcall: take iothread lock during handler call, (continued)
Re: [Qemu-ppc] [Qemu-devel] [PATCH RFC 1/4] spapr-hcall: take iothread lock during handler call, Thomas Huth, 2016/09/02
[Qemu-ppc] [PATCH RFC 2/4] target-ppc: with MTTCG report more threads, Nikunj A Dadhania, 2016/09/02
Re: [Qemu-ppc] [PATCH RFC 2/4] target-ppc: with MTTCG report more threads, David Gibson, 2016/09/07
[Qemu-ppc] [PATCH RFC 4/4] target-ppc: flush tlb from all the cpu, Nikunj A Dadhania, 2016/09/02
- Re: [Qemu-ppc] [PATCH RFC 4/4] target-ppc: flush tlb from all the cpu, Benjamin Herrenschmidt, 2016/09/02
- Re: [Qemu-ppc] [PATCH RFC 4/4] target-ppc: flush tlb from all the cpu, Nikunj A Dadhania, 2016/09/02
- Re: [Qemu-ppc] [PATCH RFC 4/4] target-ppc: flush tlb from all the cpu, Alex Bennée, 2016/09/04
- Re: [Qemu-ppc] [PATCH RFC 4/4] target-ppc: flush tlb from all the cpu, Benjamin Herrenschmidt, 2016/09/04
- Re: [Qemu-ppc] [PATCH RFC 4/4] target-ppc: flush tlb from all the cpu, Benjamin Herrenschmidt, 2016/09/04
- Re: [Qemu-ppc] [PATCH RFC 4/4] target-ppc: flush tlb from all the cpu, Nikunj A Dadhania, 2016/09/05
- Re: [Qemu-ppc] [PATCH RFC 4/4] target-ppc: flush tlb from all the cpu, Benjamin Herrenschmidt, 2016/09/05