qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v5] docs: add cpu-hotplug.txt


From: Dou Liyang
Subject: Re: [Qemu-devel] [PATCH v5] docs: add cpu-hotplug.txt
Date: Tue, 16 Aug 2016 20:46:36 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1

Hi drew,

At 08/16/2016 07:37 PM, Andrew Jones wrote:
On Tue, Aug 16, 2016 at 03:54:26PM +0800, Dou Liyang wrote:
This document describes how to use cpu hotplug in QEMU.

Signed-off-by: Andrew Jones <address@hidden>

I didn't give my s-o-b for this patch. I'm not sure where
you got that idea.Anyway, I wouldn't, I'd give an r-b.


I'm sorry, it's my own idea.
Because I’m truly grateful for your help,
you give me a lot of advice and help me modify almost all of the doc very carefully.:-)

Yes, I will remove it in next version.


Signed-off-by: Dou Liyang <address@hidden>
---
Change log v4 -> v5
  1. add an example for sPAPR
  From Bharata's advice
    1. Fix the examples

Change log v3 -> v4
  From David's advice
    1. add spapr examples
    2. Fix some comment
  From drew's advice
    1. Fix some syntax

Change log v2 -> v3:
  From drew's advice:
    1. modify the examples.
    2. Fix some syntax.

Change log v1 -> v2:
  From Fam's advice:
    1. Fix some comment.

Change log v1:
  From Igor's advice:
    1. Remove any mentioning of apic-id from the document.
    2. Remove the "device_del qom_path" from the CPU hot-unplug.
    3. Fix some comment.

 docs/cpu-hotplug.txt | 141 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 141 insertions(+)
 create mode 100644 docs/cpu-hotplug.txt

diff --git a/docs/cpu-hotplug.txt b/docs/cpu-hotplug.txt
new file mode 100644
index 0000000..d08111c
--- /dev/null
+++ b/docs/cpu-hotplug.txt
@@ -0,0 +1,141 @@
+QEMU CPU hotplug
+================
+
+This document explains how to use the CPU hotplug feature in QEMU,
+which regards the CPU as a device, using -device/device_add and
+device_del.
+
+QEMU support was merged for 2.7.
+
+Guest support is required for CPU hotplug to work.
+
+CPU hot-plug
+------------
+
+In order to be able to hotplug CPUs, QEMU has to be told the maximum
+number of CPUs which the guest can have. This is done at startup time
+by means of the -smp command-line option, which has the following
+format:
+
+ -smp [cpus=]n[,maxcpus=cpus][,cores=cores][,threads=threads]
+       [,sockets=sockets]
+
+Where,
+
+ - "cpus"    sets the number of CPUs to 'n' [default=1].
+ - "maxcpus" sets the maximum number of CPUs, including offline VCPUs
+   for hotplug.
+ - "sockets" sets the number of discrete sockets in the system.
+ - "cores"   sets the number of CPU cores on one socket.
+ - "threads" sets the number of threads on one CPU core.
+
+For example, the following command-line:
+
+ qemu [...] -smp 4,maxcpus=8,sockets=2,cores=2,threads=2
+
+creates a guest with 4 VCPUs and supports up to 8 VCPUs. The CPU
+topology is sockets (2) * cores (2) * threads (2) and can't be
+greater than maxcpus. When the guest finishes loading, the guest

I think I've suggested something for this a few times. Here's
another try

 The CPU topology is sockets (2) * cores (2) * threads (2) and should
 compute a number of slots exactly equal to maxcpus. A computed number
 of slots greater than maxcpus will result in an error.

Yes, I have read the patches [1,2] you sent.

I will modify.

[1] https://www.mail-archive.com/address@hidden/msg376965.html
[2] https://www.mail-archive.com/address@hidden/msg376961.html

Thanks,
Dou





reply via email to

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