* [Qemu-devel] [PATCH] Don't limit node count by smp count
@ 2011-03-30 19:14 Sasha Levin
2011-03-30 19:28 ` Anthony Liguori
2011-03-30 21:35 ` Michael Roth
0 siblings, 2 replies; 4+ messages in thread
From: Sasha Levin @ 2011-03-30 19:14 UTC (permalink / raw)
To: qemu-devel
It is possible to create CPU-less NUMA nodes, node amount shouldn't be
limited by amount of CPUs.
Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
---
vl.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/vl.c b/vl.c
index 8bcf2ae..8cc1aa8 100644
--- a/vl.c
+++ b/vl.c
@@ -3002,8 +3002,8 @@ int main(int argc, char **argv, char **envp)
if (nb_numa_nodes > 0) {
int i;
- if (nb_numa_nodes > smp_cpus) {
- nb_numa_nodes = smp_cpus;
+ if (nb_numa_nodes > MAX_NODES) {
+ nb_numa_nodes = MAX_NODES;
}
/* If no memory size if given for any node, assume the default
case
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] Don't limit node count by smp count
2011-03-30 19:14 [Qemu-devel] [PATCH] Don't limit node count by smp count Sasha Levin
@ 2011-03-30 19:28 ` Anthony Liguori
2011-03-30 20:17 ` Sasha Levin
2011-03-30 21:35 ` Michael Roth
1 sibling, 1 reply; 4+ messages in thread
From: Anthony Liguori @ 2011-03-30 19:28 UTC (permalink / raw)
To: Sasha Levin; +Cc: qemu-devel
On 03/30/2011 02:14 PM, Sasha Levin wrote:
> It is possible to create CPU-less NUMA nodes, node amount shouldn't be
> limited by amount of CPUs.
But does this actually work in the code today and does it work with any
guests?
Regards,
Anthony Liguori
> Signed-off-by: Sasha Levin<levinsasha928@gmail.com>
> ---
> vl.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/vl.c b/vl.c
> index 8bcf2ae..8cc1aa8 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -3002,8 +3002,8 @@ int main(int argc, char **argv, char **envp)
> if (nb_numa_nodes> 0) {
> int i;
>
> - if (nb_numa_nodes> smp_cpus) {
> - nb_numa_nodes = smp_cpus;
> + if (nb_numa_nodes> MAX_NODES) {
> + nb_numa_nodes = MAX_NODES;
> }
>
> /* If no memory size if given for any node, assume the default
> case
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] Don't limit node count by smp count
2011-03-30 19:28 ` Anthony Liguori
@ 2011-03-30 20:17 ` Sasha Levin
0 siblings, 0 replies; 4+ messages in thread
From: Sasha Levin @ 2011-03-30 20:17 UTC (permalink / raw)
To: Anthony Liguori; +Cc: qemu-devel
On Wed, 2011-03-30 at 14:28 -0500, Anthony Liguori wrote:
> On 03/30/2011 02:14 PM, Sasha Levin wrote:
> > It is possible to create CPU-less NUMA nodes, node amount shouldn't be
> > limited by amount of CPUs.
>
> But does this actually work in the code today and does it work with any
> guests?
>
I've tested it on an Ubuntu desktop as a guest and it worked
fine, /sys/devices/system/node/has_cpu was as expected.
> Regards,
>
> Anthony Liguori
>
> > Signed-off-by: Sasha Levin<levinsasha928@gmail.com>
> > ---
> > vl.c | 4 ++--
> > 1 files changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/vl.c b/vl.c
> > index 8bcf2ae..8cc1aa8 100644
> > --- a/vl.c
> > +++ b/vl.c
> > @@ -3002,8 +3002,8 @@ int main(int argc, char **argv, char **envp)
> > if (nb_numa_nodes> 0) {
> > int i;
> >
> > - if (nb_numa_nodes> smp_cpus) {
> > - nb_numa_nodes = smp_cpus;
> > + if (nb_numa_nodes> MAX_NODES) {
> > + nb_numa_nodes = MAX_NODES;
> > }
> >
> > /* If no memory size if given for any node, assume the default
> > case
> >
> >
>
--
Sasha.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] Don't limit node count by smp count
2011-03-30 19:14 [Qemu-devel] [PATCH] Don't limit node count by smp count Sasha Levin
2011-03-30 19:28 ` Anthony Liguori
@ 2011-03-30 21:35 ` Michael Roth
1 sibling, 0 replies; 4+ messages in thread
From: Michael Roth @ 2011-03-30 21:35 UTC (permalink / raw)
To: Sasha Levin; +Cc: qemu-devel
On 03/30/2011 02:14 PM, Sasha Levin wrote:
> It is possible to create CPU-less NUMA nodes, node amount shouldn't be
> limited by amount of CPUs.
>
> Signed-off-by: Sasha Levin<levinsasha928@gmail.com>
> ---
> vl.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/vl.c b/vl.c
> index 8bcf2ae..8cc1aa8 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -3002,8 +3002,8 @@ int main(int argc, char **argv, char **envp)
> if (nb_numa_nodes> 0) {
> int i;
>
> - if (nb_numa_nodes> smp_cpus) {
> - nb_numa_nodes = smp_cpus;
> + if (nb_numa_nodes> MAX_NODES) {
> + nb_numa_nodes = MAX_NODES;
> }
>
> /* If no memory size if given for any node, assume the default
> case
>
>
Did a quick test myself and it seems to work from what I can tell:
RHEL6 64-bit guest, QEMU master:
/home/mdroth/dev/kvm/qemu.git/x86_64-softmmu/qemu-system-x86_64 -smp 2
-numa node,nodeid=1 -numa node,nodeid=2 -numa node,nodeid=3 -drive
file=/home/mdroth/vm/rhel6_64_base.raw,snapshot=off,if=virtio -bios
/home/mdroth/dev/kvm/qemu.git/pc-bios/bios.bin -vnc :1 -m 1024 --enable-kvm
...
[mdroth@vm0 ~]$ cat /sys/devices/system/node/node{0,1,2}/cpulist
0
1
[mdroth@vm0 ~]$ cat /sys/devices/system/node/node{0,1,2}/distance
10 20 20
20 10 20
20 20 10
[mdroth@vm0 ~]$ cat /sys/devices/system/node/node{0,1,2}/meminfo
Node 0 MemTotal: 343664 kB
Node 0 MemFree: 181384 kB
Node 0 MemUsed: 162280 kB
Node 0 Active: 26640 kB
Node 0 Inactive: 52752 kB
Node 0 Active(anon): 12272 kB
Node 0 Inactive(anon): 0 kB
Node 0 Active(file): 14368 kB
Node 0 Inactive(file): 52752 kB
Node 0 Unevictable: 0 kB
Node 0 Mlocked: 0 kB
Node 0 Dirty: 116 kB
Node 0 Writeback: 0 kB
Node 0 FilePages: 67220 kB
Node 0 Mapped: 12980 kB
Node 0 AnonPages: 12168 kB
Node 0 Shmem: 104 kB
Node 0 KernelStack: 736 kB
Node 0 PageTables: 2988 kB
Node 0 NFS_Unstable: 0 kB
Node 0 Bounce: 0 kB
Node 0 WritebackTmp: 0 kB
Node 0 Slab: 53356 kB
Node 0 SReclaimable: 8896 kB
Node 0 SUnreclaim: 44460 kB
Node 0 HugePages_Total: 0
Node 0 HugePages_Free: 0
Node 0 HugePages_Surp: 0
Node 1 MemTotal: 344064 kB
Node 1 MemFree: 292756 kB
Node 1 MemUsed: 51308 kB
Node 1 Active: 12548 kB
Node 1 Inactive: 11296 kB
Node 1 Active(anon): 8120 kB
Node 1 Inactive(anon): 4 kB
Node 1 Active(file): 4428 kB
Node 1 Inactive(file): 11292 kB
Node 1 Unevictable: 0 kB
Node 1 Mlocked: 0 kB
Node 1 Dirty: 4 kB
Node 1 Writeback: 0 kB
Node 1 FilePages: 15776 kB
Node 1 Mapped: 3548 kB
Node 1 AnonPages: 6044 kB
Node 1 Shmem: 56 kB
Node 1 KernelStack: 264 kB
Node 1 PageTables: 1904 kB
Node 1 NFS_Unstable: 0 kB
Node 1 Bounce: 0 kB
Node 1 WritebackTmp: 0 kB
Node 1 Slab: 14696 kB
Node 1 SReclaimable: 1584 kB
Node 1 SUnreclaim: 13112 kB
Node 1 HugePages_Total: 0
Node 1 HugePages_Free: 0
Node 1 HugePages_Surp: 0
Node 2 MemTotal: 360436 kB
Node 2 MemFree: 345112 kB
Node 2 MemUsed: 15324 kB
Node 2 Active: 0 kB
Node 2 Inactive: 0 kB
Node 2 Active(anon): 0 kB
Node 2 Inactive(anon): 0 kB
Node 2 Active(file): 0 kB
Node 2 Inactive(file): 0 kB
Node 2 Unevictable: 0 kB
Node 2 Mlocked: 0 kB
Node 2 Dirty: 0 kB
Node 2 Writeback: 0 kB
Node 2 FilePages: 0 kB
Node 2 Mapped: 4 kB
Node 2 AnonPages: 0 kB
Node 2 Shmem: 0 kB
Node 2 KernelStack: 8 kB
Node 2 PageTables: 0 kB
Node 2 NFS_Unstable: 0 kB
Node 2 Bounce: 0 kB
Node 2 WritebackTmp: 0 kB
Node 2 Slab: 10920 kB
Node 2 SReclaimable: 1200 kB
Node 2 SUnreclaim: 9720 kB
Node 2 HugePages_Total: 0
Node 2 HugePages_Free: 0
Node 2 HugePages_Surp: 0
[mdroth@vm0 ~]$
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-03-30 21:35 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-30 19:14 [Qemu-devel] [PATCH] Don't limit node count by smp count Sasha Levin
2011-03-30 19:28 ` Anthony Liguori
2011-03-30 20:17 ` Sasha Levin
2011-03-30 21:35 ` Michael Roth
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.