All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andre Przywara <andre.przywara@amd.com>
To: Brian Jackson <iggy@theiggy.com>
Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org
Subject: Re: [RFC] allow multi-core guests: introduce cores= option to -cpu
Date: Sat, 4 Jul 2009 00:52:30 +0200	[thread overview]
Message-ID: <4A4E8BAE.7090602@amd.com> (raw)
In-Reply-To: <4A4E20BA.2040100@theiggy.com>

Brian Jackson wrote:
> Andre Przywara wrote:
>> currently SMP guests happen to see <n> vCPUs as <n> different sockets.
>> Some guests (Windows comes to mind) have license restrictions and refuse
>> to run on multi-socket machines.
>> So lets introduce a "cores=" parameter to the -cpu option to let the user
>> specify the number of _cores_ the guest should see.
 >> ...
>>
> Personally, I'd like to see it as an extra arg to the -smp option. We've 
> seen too many people use -cpu incorrectly in #kvm, so we've gotten into 
> the habit of telling people not to touch that option unless they know 
> exactly what they are doing. Plus it seems odd to have to use -cpu foo 
> when you just want more cpus, not a specific cpu.

Ok, I see your point. I simply used -cpu because of technical reasons 
(the core topology is reflected in CPUID, which -cpu cares about). But 
you are right, it does not belong here, -smp looks like a good candidate 
(IMO better than -numa). Or we use an abstract "-topology" for this, but 
this seems like overkill.
So what about: "-smp 4,cores=2,threads=2[,sockets=1]" to inject 4 vCPUs 
in one package (automatically determined if omitted) with two cores and 
two threads/core? All parameters except the number of vCPUs would be 
optional, which would make this new format backwards compatible.
Only we have to agree on the default topology: multi-socket like the 
current implementation or multi-core, which would mimic the most common 
SMP architecture today. It seems that the latter one causes less 
problems for guests.

Regards,
Andre.

-- 
Andre Przywara
AMD-Operating System Research Center (OSRC), Dresden, Germany
Tel: +49 351 488-3567-12
----to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen
Geschaeftsfuehrer: Jochen Polster; Thomas M. McCoy; Giuliano Meroni
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632


WARNING: multiple messages have this Message-ID (diff)
From: Andre Przywara <andre.przywara@amd.com>
To: Brian Jackson <iggy@theiggy.com>
Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org
Subject: [Qemu-devel] Re: [RFC] allow multi-core guests: introduce cores= option to -cpu
Date: Sat, 4 Jul 2009 00:52:30 +0200	[thread overview]
Message-ID: <4A4E8BAE.7090602@amd.com> (raw)
In-Reply-To: <4A4E20BA.2040100@theiggy.com>

Brian Jackson wrote:
> Andre Przywara wrote:
>> currently SMP guests happen to see <n> vCPUs as <n> different sockets.
>> Some guests (Windows comes to mind) have license restrictions and refuse
>> to run on multi-socket machines.
>> So lets introduce a "cores=" parameter to the -cpu option to let the user
>> specify the number of _cores_ the guest should see.
 >> ...
>>
> Personally, I'd like to see it as an extra arg to the -smp option. We've 
> seen too many people use -cpu incorrectly in #kvm, so we've gotten into 
> the habit of telling people not to touch that option unless they know 
> exactly what they are doing. Plus it seems odd to have to use -cpu foo 
> when you just want more cpus, not a specific cpu.

Ok, I see your point. I simply used -cpu because of technical reasons 
(the core topology is reflected in CPUID, which -cpu cares about). But 
you are right, it does not belong here, -smp looks like a good candidate 
(IMO better than -numa). Or we use an abstract "-topology" for this, but 
this seems like overkill.
So what about: "-smp 4,cores=2,threads=2[,sockets=1]" to inject 4 vCPUs 
in one package (automatically determined if omitted) with two cores and 
two threads/core? All parameters except the number of vCPUs would be 
optional, which would make this new format backwards compatible.
Only we have to agree on the default topology: multi-socket like the 
current implementation or multi-core, which would mimic the most common 
SMP architecture today. It seems that the latter one causes less 
problems for guests.

Regards,
Andre.

-- 
Andre Przywara
AMD-Operating System Research Center (OSRC), Dresden, Germany
Tel: +49 351 488-3567-12
----to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen
Geschaeftsfuehrer: Jochen Polster; Thomas M. McCoy; Giuliano Meroni
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632

  reply	other threads:[~2009-07-03 22:51 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-03 14:41 [RFC] allow multi-core guests: introduce cores= option to -cpu Andre Przywara
2009-07-03 14:41 ` [Qemu-devel] " Andre Przywara
2009-07-03 14:52 ` Samuel Thibault
2009-07-03 14:52   ` [Qemu-devel] " Samuel Thibault
2009-07-03 23:28   ` Andre Przywara
2009-07-03 23:53     ` Samuel Thibault
2009-07-03 23:53       ` [Qemu-devel] " Samuel Thibault
2009-07-03 15:16 ` Brian Jackson
2009-07-03 15:16   ` [Qemu-devel] " Brian Jackson
2009-07-03 22:52   ` Andre Przywara [this message]
2009-07-03 22:52     ` Andre Przywara
2009-07-04  0:04     ` Jamie Lokier
2009-07-04  7:18     ` Gleb Natapov
2009-07-03 15:46 ` [Qemu-devel] " Paul Brook
2009-07-03 15:46   ` Paul Brook
2009-07-03 23:45   ` Andre Przywara
2009-07-04  5:58     ` Paul Brook
2009-07-04 15:25 ` Avi Kivity
2009-07-04 15:25   ` [Qemu-devel] " Avi Kivity
2009-07-05 13:23   ` Alexander Graf
2009-07-05 13:23     ` [Qemu-devel] " Alexander Graf
2009-07-05 14:53     ` Avi Kivity
2009-07-05 14:53       ` [Qemu-devel] " Avi Kivity
2009-07-05 15:04       ` Gleb Natapov
2009-07-05 15:04         ` [Qemu-devel] " Gleb Natapov
2009-07-05 15:11         ` Avi Kivity
2009-07-05 15:11           ` [Qemu-devel] " Avi Kivity
2009-07-05 15:11           ` Alexander Graf
2009-07-05 15:11             ` [Qemu-devel] " Alexander Graf
2009-07-05 15:17             ` Avi Kivity
2009-07-05 15:17               ` [Qemu-devel] " Avi Kivity

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A4E8BAE.7090602@amd.com \
    --to=andre.przywara@amd.com \
    --cc=iggy@theiggy.com \
    --cc=kvm@vger.kernel.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.