diff mbox

[resend] vl.c: Don't limit node count by smp count

Message ID 1309404579-32115-1-git-send-email-levinsasha928@gmail.com
State New
Headers show

Commit Message

Sasha Levin June 30, 2011, 3:29 a.m. UTC
[I've sent this patch couple of months ago and noticed it
 didn't make it's way in - so I'm sending it again]

It is possible to create CPU-less NUMA nodes, node amount shouldn't be
limited by amount of CPUs.

Tested-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
---
 vl.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Comments

Andre Przywara June 30, 2011, 9:14 a.m. UTC | #1
On 06/30/2011 05:29 AM, Sasha Levin wrote:
> [I've sent this patch couple of months ago and noticed it
>   didn't make it's way in - so I'm sending it again]
>
> It is possible to create CPU-less NUMA nodes, node amount shouldn't be
> limited by amount of CPUs.
>
> Tested-by: Michael Roth<mdroth@linux.vnet.ibm.com>
> 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 e0191e1..b95ae8d 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -3147,8 +3147,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

Acked-by: Andre Przywara <andre.przywara@amd.com>

Regards,
Andre.
Anthony Liguori July 23, 2011, 4:55 p.m. UTC | #2
On 06/29/2011 10:29 PM, Sasha Levin wrote:
> [I've sent this patch couple of months ago and noticed it
>   didn't make it's way in - so I'm sending it again]
>
> It is possible to create CPU-less NUMA nodes, node amount shouldn't be
> limited by amount of CPUs.
>
> Tested-by: Michael Roth<mdroth@linux.vnet.ibm.com>
> Signed-off-by: Sasha Levin<levinsasha928@gmail.com>

Applied.  Thanks.

Regards,

Anthony Liguori

> ---
>   vl.c |    4 ++--
>   1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/vl.c b/vl.c
> index e0191e1..b95ae8d 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -3147,8 +3147,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
diff mbox

Patch

diff --git a/vl.c b/vl.c
index e0191e1..b95ae8d 100644
--- a/vl.c
+++ b/vl.c
@@ -3147,8 +3147,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