qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] ppc/pnv: fix cores per chip for multiple cpus


From: David Gibson
Subject: Re: [Qemu-devel] [PATCH] ppc/pnv: fix cores per chip for multiple cpus
Date: Fri, 22 Sep 2017 20:12:01 +1000
User-agent: Mutt/1.9.0 (2017-09-02)

On Fri, Sep 22, 2017 at 08:07:06AM +0200, Cédric Le Goater wrote:
> On 09/22/2017 08:00 AM, Nikunj A Dadhania wrote:
> > David Gibson <address@hidden> writes:
> > 
> >>>>>
> >>>>> As smp_thread defaults to 1 in vl.c, similarly smp_cores also has the
> >>>>> default value of 1 in vl.c. In powernv, we were setting nr-cores like
> >>>>> this:
> >>>>>
> >>>>>         object_property_set_int(chip, smp_cores, "nr-cores", 
> >>>>> &error_fatal);
> >>>>>
> >>>>> Even when there were multiple cpus (-smp 4), when the guest boots up, we
> >>>>> just get one core (i.e. smp_cores was 1) with single thread(smp_threads
> >>>>> was 1), which is wrong as per the command-line that was provided.
> >>>>
> >>>> Right, so, -smp 4 defaults to 4 sockets, each with 1 core of 1
> >>>> thread.  If you can't supply 4 sockets you should error, but you
> >>>> shouldn't go and change the number of cores per socket.
> >>>
> >>> OK, that makes sense now. And I do see that smp_cpus is 4 in the above
> >>> case. Now looking more into it, i see that powernv has something called
> >>> "num_chips", isnt this same as sockets ? Do we need num_chips separately?
> >>
> >> Ah, yes, I see.  It's probably still reasonable to keep num_chips as
> >> an internal variable, rather than using (smp_cpus / smp_cores /
> >> smp_threads) everywhere.  But we shouldn't have it as a direct
> >> user-settable property, instead setting it from the -smp command line
> >> option.
> > 
> > Something like the below works till num_chips=2, after that guest does
> > not boot up. This might be some limitation within the OS, Cedric might
> > have some clue.
> 
> Some controllers might need some more tweaking, PSI, LPC, to elect a 
> master one.

Uh.. why?

> Anyhow I don't think we want to deduce the number of chips
> from the number of cpus. These two figures are very different.

How so?  It's not totally perfect, but making a single chip correspond
to a "socket" in qemu's (somewhat x86 centric) terminology is still a
pretty good match.

-- 
David Gibson                    | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au  | minimalist, thank you.  NOT _the_ _other_
                                | _way_ _around_!
http://www.ozlabs.org/~dgibson

Attachment: signature.asc
Description: PGP signature


reply via email to

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