Re: [Qemu-devel] [RFC PATCH v2] PPC: smp: autodetect numbers of threads per core

2014-01-10 Thread Alexey Kardashevskiy
On 01/11/2014 01:25 AM, Alexander Graf wrote: > > On 10.01.2014, at 15:21, Mike Day wrote: > >> On Fri, Jan 10, 2014 at 9:13 AM, Alexey Kardashevskiy >> wrote: >>> On 01/11/2014 01:00 AM, Alexander Graf wrote: >> Can't we determine the number of "default threads" at a common place, p

Re: [Qemu-devel] [RFC PATCH v2] PPC: smp: autodetect numbers of threads per core

2014-01-10 Thread Mike Day
On Fri, Jan 10, 2014 at 9:25 AM, Alexander Graf wrote: >>> On 01/11/2014 01:00 AM, Alexander Graf wrote: >> Can't we determine the number of "default threads" at a common place, preferably derived from cpu type? >>> >>> We can do anything. I asked how exactly as I really (really) do not

Re: [Qemu-devel] [RFC PATCH v2] PPC: smp: autodetect numbers of threads per core

2014-01-10 Thread Alexander Graf
On 10.01.2014, at 15:21, Mike Day wrote: > On Fri, Jan 10, 2014 at 9:13 AM, Alexey Kardashevskiy wrote: >> On 01/11/2014 01:00 AM, Alexander Graf wrote: > >>> Can't we determine the number of "default threads" at a common place, >>> preferably derived from cpu type? >> >> We can do anything.

Re: [Qemu-devel] [RFC PATCH v2] PPC: smp: autodetect numbers of threads per core

2014-01-10 Thread Mike Day
On Fri, Jan 10, 2014 at 9:13 AM, Alexey Kardashevskiy wrote: > On 01/11/2014 01:00 AM, Alexander Graf wrote: >> Can't we determine the number of "default threads" at a common place, >> preferably derived from cpu type? > > We can do anything. I asked how exactly as I really (really) do not > unde

Re: [Qemu-devel] [RFC PATCH v2] PPC: smp: autodetect numbers of threads per core

2014-01-10 Thread Alexander Graf
On 10.01.2014, at 15:13, Alexey Kardashevskiy wrote: > On 01/11/2014 01:00 AM, Alexander Graf wrote: >> >> On 10.01.2014, at 14:42, Alexey Kardashevskiy wrote: >> >>> On 01/11/2014 12:28 AM, Alexander Graf wrote: On 10.01.2014, at 14:03, Mike Day wrote: > > Alexey K

Re: [Qemu-devel] [RFC PATCH v2] PPC: smp: autodetect numbers of threads per core

2014-01-10 Thread Alexey Kardashevskiy
On 01/11/2014 01:00 AM, Alexander Graf wrote: > > On 10.01.2014, at 14:42, Alexey Kardashevskiy wrote: > >> On 01/11/2014 12:28 AM, Alexander Graf wrote: >>> >>> On 10.01.2014, at 14:03, Mike Day wrote: >>> Alexey Kardashevskiy writes: > On 01/10/2014 10:40 AM, Alexander

Re: [Qemu-devel] [RFC PATCH v2] PPC: smp: autodetect numbers of threads per core

2014-01-10 Thread Mike Day
Alexander Graf writes: >> The patch as it its now is very simple and well-contained. I wonder how >> much it would expand if we added a max thread count to the cpu class. It >> seems like the need for a max thread count is idiomatic to powerpc. > > It's only ever useful on IBM POWER. Any other

Re: [Qemu-devel] [RFC PATCH v2] PPC: smp: autodetect numbers of threads per core

2014-01-10 Thread Alexander Graf
On 10.01.2014, at 14:42, Alexey Kardashevskiy wrote: > On 01/11/2014 12:28 AM, Alexander Graf wrote: >> >> On 10.01.2014, at 14:03, Mike Day wrote: >> >>> >>> Alexey Kardashevskiy writes: >>> On 01/10/2014 10:40 AM, Alexander Graf wrote: > > What if we make the max thre

Re: [Qemu-devel] [RFC PATCH v2] PPC: smp: autodetect numbers of threads per core

2014-01-10 Thread Alexey Kardashevskiy
On 01/11/2014 12:28 AM, Alexander Graf wrote: > > On 10.01.2014, at 14:03, Mike Day wrote: > >> >> Alexey Kardashevskiy writes: >> >>> On 01/10/2014 10:40 AM, Alexander Graf wrote: >>> What if we make the max thread count a property of our cpu class? The we >>> can add a thre

Re: [Qemu-devel] [RFC PATCH v2] PPC: smp: autodetect numbers of threads per core

2014-01-10 Thread Alexander Graf
On 10.01.2014, at 14:03, Mike Day wrote: > > Alexey Kardashevskiy writes: > >> On 01/10/2014 10:40 AM, Alexander Graf wrote: >>> >> >>> What if we make the max thread count a property of our cpu class? The >>> we >> can add a threads=max option which will be identical between kvm and tcg. >

Re: [Qemu-devel] [RFC PATCH v2] PPC: smp: autodetect numbers of threads per core

2014-01-10 Thread Mike Day
Alexey Kardashevskiy writes: > On 01/10/2014 10:40 AM, Alexander Graf wrote: >> > >> What if we make the max thread count a property of our cpu class? The >> we > can add a threads=max option which will be identical between kvm and tcg. > > > You lost me here :) > Right now the sequence is: > 1

Re: [Qemu-devel] [RFC PATCH v2] PPC: smp: autodetect numbers of threads per core

2014-01-09 Thread Alexey Kardashevskiy
On 01/10/2014 10:40 AM, Alexander Graf wrote: > > >> Am 09.01.2014 um 23:12 schrieb Alexey Kardashevskiy : >> >>> On 01/10/2014 08:00 AM, Mike Day wrote: >>> >>> Alexey Kardashevskiy writes: >>> /* compute missing values, prefer sockets over cores over threads */

Re: [Qemu-devel] [RFC PATCH v2] PPC: smp: autodetect numbers of threads per core

2014-01-09 Thread Alexander Graf
> Am 09.01.2014 um 23:12 schrieb Alexey Kardashevskiy : > >> On 01/10/2014 08:00 AM, Mike Day wrote: >> >> Alexey Kardashevskiy writes: >> >>> /* compute missing values, prefer sockets over cores over threads */ >>> if (cpus == 0 || sockets == 0) { >>> sockets = so

Re: [Qemu-devel] [RFC PATCH v2] PPC: smp: autodetect numbers of threads per core

2014-01-09 Thread Scott Wood
On Thu, 2014-01-09 at 16:34 +1100, Alexey Kardashevskiy wrote: > On POWERPC, only a whole CPU core can be assigned to a KVM. s/POWERPC/POWER/ -Scott

Re: [Qemu-devel] [RFC PATCH v2] PPC: smp: autodetect numbers of threads per core

2014-01-09 Thread Alexey Kardashevskiy
On 01/10/2014 08:00 AM, Mike Day wrote: > > Alexey Kardashevskiy writes: > >> /* compute missing values, prefer sockets over cores over threads */ >> if (cpus == 0 || sockets == 0) { >> sockets = sockets > 0 ? sockets : 1; >> cores = cores > 0 ? cores

Re: [Qemu-devel] [RFC PATCH v2] PPC: smp: autodetect numbers of threads per core

2014-01-09 Thread Mike Day
Alexey Kardashevskiy writes: > /* compute missing values, prefer sockets over cores over threads */ > if (cpus == 0 || sockets == 0) { > sockets = sockets > 0 ? sockets : 1; > cores = cores > 0 ? cores : 1; > -threads = threads > 0 ? thread

[Qemu-devel] [RFC PATCH v2] PPC: smp: autodetect numbers of threads per core

2014-01-08 Thread Alexey Kardashevskiy
On POWERPC, only a whole CPU core can be assigned to a KVM. Since POWER7/8 support several threads per core, we want all threads of a core to go to the same KVM so every time we run QEMU with -enable-kvm, we have to add -smp X,threads=(4|8)" (4 for POWER7 and 8 for POWER8). The user rather wants t