qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Lucas Meneghel Rodrigues <lmr@redhat.com>
To: KVM mailing list <kvm@vger.kernel.org>
Cc: qemu mailing list <qemu-devel@nongnu.org>
Subject: [Qemu-devel] About cpu_set, CPU hotplug and related subjects
Date: Mon, 19 Apr 2010 16:34:54 -0300	[thread overview]
Message-ID: <1271705694.2505.36.camel@localhost.localdomain> (raw)

Hi folks, 

I've implemented a functional test for the cpu_set feature some time
ago. I was going through the patch queue and realized the patch needed
some respin, so I did it. I decided to try and see what is the state of
the feature, considering last time I tried it was not working
(segfaulting).

Now, with the latest qemu-kvm things are on a much better shape, cpu_set
is not giving me segfaults, and qemu monitor reports the new cpus added.

10:21:20 INFO | Adding 1 CPUs to guest
10:21:20 DEBUG| Sending monitor command: cpu_set 0 online
10:21:20 DEBUG| Sending monitor command: cpu_set 1 online
10:21:20 DEBUG| Sending monitor command: info cpus
10:21:20 DEBUG| Output of info cpus:
* CPU #0: pc=0xffffffff8102e23d thread_id=11035 
  CPU #1: pc=0x0000000000000000 thread_id=11065 

The address of the CPU #1 seems a little strange. The guest OS is
completely unaware of any changes to the number of CPUs though.

After doing some reading it seems to me that the reason why that is not
happening is because SeaBIOS still doesn't have code to support CPU hot
plugging as BochsBIOS did. I also looked after some documentation about
how that feature is supposed to work, and didn't find it. So, assuming
my understanding about the current status is correct:

1) Is anybody planning on adding the necessary support to SeaBIOS
anytime soon?
2) How the whole functionality is supposed to work? My mental model goes
like this:

* cpu_set [total number of CPUs you want the system to have] online
* Guest should notice new CPUS added to the system and they appear
under /sys/devices/system/cpu/cpu*, initially offlined
* The online status of each CPU is
in /sys/devices/system/cpu/cpu*/online, and onlining it is just a matter
of writing 1 to this file
* It is not possible to downgrade the number of CPUs of the system
during the lifetime of the VM process

Thanks for your attention,

Lucas

             reply	other threads:[~2010-04-19 19:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-19 19:34 Lucas Meneghel Rodrigues [this message]
2010-04-22  1:12 ` [Qemu-devel] Re: About cpu_set, CPU hotplug and related subjects Kevin O'Connor
2010-04-28  9:31   ` [Qemu-devel] Re: [SeaBIOS] " Jes Sorensen
2010-04-28 10:30     ` Gleb Natapov
2010-04-28 10:41       ` Jes Sorensen
2010-04-28 10:45         ` Gleb Natapov
2010-05-11  1:09           ` Carl-Daniel Hailfinger

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=1271705694.2505.36.camel@localhost.localdomain \
    --to=lmr@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).