All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] libxl: Make 'xl vcpu-set' work properly on overcommited hosts.
@ 2013-05-07 20:40 Konrad Rzeszutek Wilk
  2013-05-08 10:32 ` George Dunlap
  0 siblings, 1 reply; 21+ messages in thread
From: Konrad Rzeszutek Wilk @ 2013-05-07 20:40 UTC (permalink / raw)
  To: Ian.Jackson, Ian.Campbell, xen-devel; +Cc: Konrad Rzeszutek Wilk

The libxl_cpu_bitmap_alloc(..) function, if provided with a zero
value for max CPUs will call xc_get_max_cpus() which will retrieve
the number of physical CPUs the host has. This is usually
OK if the guest's maxvcpus <= host pcpus. But if the value
is different, then the bitmap for VCPUs is limited by the
number of CPUs the host has.

This is incorrect as what we want is to hotplug in the guest
the amount of CPUs that the user specified on the command line
and not be limited by the amount of physical CPUs.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
 tools/libxl/xl_cmdimpl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
index c1a969b..ef7f81b 100644
--- a/tools/libxl/xl_cmdimpl.c
+++ b/tools/libxl/xl_cmdimpl.c
@@ -4499,7 +4499,7 @@ static void vcpuset(uint32_t domid, const char* nr_vcpus)
         return;
     }
 
-    if (libxl_cpu_bitmap_alloc(ctx, &cpumap, 0)) {
+    if (libxl_cpu_bitmap_alloc(ctx, &cpumap, max_vcpus)) {
         fprintf(stderr, "libxl_cpu_bitmap_alloc failed\n");
         return;
     }
-- 
1.8.1.4

^ permalink raw reply related	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2013-05-13 14:02 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-07 20:40 [PATCH] libxl: Make 'xl vcpu-set' work properly on overcommited hosts Konrad Rzeszutek Wilk
2013-05-08 10:32 ` George Dunlap
2013-05-08 10:46   ` Ian Campbell
2013-05-08 14:29     ` Konrad Rzeszutek Wilk
2013-05-08 15:04       ` Ian Campbell
2013-05-08 16:04         ` Ian Jackson
2013-05-08 16:35         ` Konrad Rzeszutek Wilk
2013-05-08 16:49           ` Ian Campbell
2013-05-08 17:05             ` Konrad Rzeszutek Wilk
2013-05-08 19:09               ` Ian Campbell
2013-05-08 22:39                 ` Konrad Rzeszutek Wilk
2013-05-09  8:43                   ` Ian Campbell
2013-05-09  9:09                   ` George Dunlap
2013-05-09 13:13                     ` Konrad Rzeszutek Wilk
2013-05-09 13:59                       ` George Dunlap
2013-05-10 18:05                         ` Ian Jackson
2013-05-13  5:00                   ` Juergen Gross
2013-05-08 16:03       ` Ian Jackson
2013-05-10 19:35         ` Konrad Rzeszutek Wilk
2013-05-13 14:02           ` Ian Jackson
2013-05-08 11:58   ` Ian Jackson

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.