Juergen Gross
2011-Feb-14 10:47 UTC
[Xen-devel] [PATCH] xl cpupool-numa-split: reduce number of Dom0 vcpus
When reducing the number of physical cpus available for Domain-0 by xl cpupool-numa-split, reduce the number of vcpus accordingly. Signed-off-by: juergen.gross@ts.fujitsu.com 1 file changed, 20 insertions(+), 2 deletions(-) tools/libxl/xl_cmdimpl.c | 22 ++++++++++++++++++++-- _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
George Dunlap
2011-Feb-14 12:36 UTC
Re: [Xen-devel] [PATCH] xl cpupool-numa-split: reduce number of Dom0 vcpus
Is looping 10 times really the best option? -George On Mon, Feb 14, 2011 at 10:47 AM, Juergen Gross <juergen.gross@ts.fujitsu.com> wrote:> When reducing the number of physical cpus available for Domain-0 by xl > cpupool-numa-split, reduce the number of vcpus accordingly. > > Signed-off-by: juergen.gross@ts.fujitsu.com > > > 1 file changed, 20 insertions(+), 2 deletions(-) > tools/libxl/xl_cmdimpl.c | 22 ++++++++++++++++++++-- > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel > >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Juergen Gross
2011-Feb-14 13:13 UTC
Re: [Xen-devel] [PATCH] xl cpupool-numa-split: reduce number of Dom0 vcpus
On 02/14/11 13:36, George Dunlap wrote:> Is looping 10 times really the best option?Oops! Forgot the sleep(1) :-( What about this one? -- Juergen Gross Principal Developer Operating Systems TSP ES&S SWE OS6 Telephone: +49 (0) 89 3222 2967 Fujitsu Technology Solutions e-mail: juergen.gross@ts.fujitsu.com Domagkstr. 28 Internet: ts.fujitsu.com D-80807 Muenchen Company details: ts.fujitsu.com/imprint.html _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ian Jackson
2011-Feb-14 15:45 UTC
Re: [Xen-devel] [PATCH] xl cpupool-numa-split: reduce number of Dom0 vcpus
Juergen Gross writes ("Re: [Xen-devel] [PATCH] xl cpupool-numa-split: reduce number of Dom0 vcpus"):> On 02/14/11 13:36, George Dunlap wrote: > > Is looping 10 times really the best option? > > Oops! Forgot the sleep(1) :-( > What about this one?Um, are you sure ? It still doesn''t seem to have a sleep and you haven''t answered George''s question ... Ian. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Juergen Gross
2011-Feb-15 06:02 UTC
Re: [Xen-devel] [PATCH] xl cpupool-numa-split: reduce number of Dom0 vcpus
On 02/14/11 16:45, Ian Jackson wrote:> Juergen Gross writes ("Re: [Xen-devel] [PATCH] xl cpupool-numa-split: reduce number of Dom0 vcpus"): >> On 02/14/11 13:36, George Dunlap wrote: >>> Is looping 10 times really the best option? >> >> Oops! Forgot the sleep(1) :-( >> What about this one? > > Um, are you sure ? It still doesn''t seem to have a sleep and you > haven''t answered George''s question ...Sigh. Modifying the patch isn''t enough, have to send the modified version... Regarding the question: libxl_set_vcpuonline() is asynchronous. It will trigger the offlining (or onlining) of vcpus, but the result is not checked and will happen sometimes in the future, if ever. So some kind of timeout seems to be a good idea. 10 seconds should be enough to do the work. I added a failure exit if not all required vcpus are offlined. Juergen -- Juergen Gross Principal Developer Operating Systems TSP ES&S SWE OS6 Telephone: +49 (0) 89 3222 2967 Fujitsu Technology Solutions e-mail: juergen.gross@ts.fujitsu.com Domagkstr. 28 Internet: ts.fujitsu.com D-80807 Muenchen Company details: ts.fujitsu.com/imprint.html _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ian Jackson
2011-Feb-15 19:27 UTC
Re: [Xen-devel] [PATCH] xl cpupool-numa-split: reduce number of Dom0 vcpus
Juergen Gross writes ("Re: [Xen-devel] [PATCH] xl cpupool-numa-split: reduce number of Dom0 vcpus"):> I added a failure exit if not all required vcpus are offlined.Thanks. But, is this test correct ?> + if (info.vcpu_online == n) { > + break; > + }Is it possible for the online map to have n cpus in it, but for them to be the wrong n cpus ? What if two copies of this code run concurrently ? (Perhaps in 4.2 we will need to add a lock?) Ian. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Juergen Gross
2011-Feb-16 08:40 UTC
Re: [Xen-devel] [PATCH] xl cpupool-numa-split: reduce number of Dom0 vcpus
On 02/15/11 20:27, Ian Jackson wrote:> Juergen Gross writes ("Re: [Xen-devel] [PATCH] xl cpupool-numa-split: reduce number of Dom0 vcpus"): >> I added a failure exit if not all required vcpus are offlined. > > Thanks. But, is this test correct ? > >> + if (info.vcpu_online == n) { >> + break; >> + } > > Is it possible for the online map to have n cpus in it, but for them > to be the wrong n cpus ?The number of online vcpus is important, not which vcpus. In a strange case it could lead to a wrong number of online vcpus, if the number was correct in the beginning and e.g. vcpu 0 was offline and offlining the last vcpu fails. But I don''t think this would be a huge problem, as offlining the vcpus is just a optimization measure.> > What if two copies of this code run concurrently ? (Perhaps in 4.2 we > will need to add a lock?)The result of both copies should be the same, as it is depending on the machine configuration only. And we are speaking of a global machine configuration action. This would mean two administrators are configuring the same machine without knowing what the other is doing. Seems to be a very strange scenario. A possible failure (meaning: not reaching the desired configuration, but no crashing) should be regarded as acceptable in this case. Juergen -- Juergen Gross Principal Developer Operating Systems TSP ES&S SWE OS6 Telephone: +49 (0) 89 3222 2967 Fujitsu Technology Solutions e-mail: juergen.gross@ts.fujitsu.com Domagkstr. 28 Internet: ts.fujitsu.com D-80807 Muenchen Company details: ts.fujitsu.com/imprint.html _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ian Jackson
2011-Feb-17 19:39 UTC
Re: [Xen-devel] [PATCH] xl cpupool-numa-split: reduce number of Dom0 vcpus
Juergen Gross writes ("Re: [Xen-devel] [PATCH] xl cpupool-numa-split: reduce number of Dom0 vcpus"):> Regarding the question: libxl_set_vcpuonline() is asynchronous. It will > trigger the offlining (or onlining) of vcpus, but the result is not checked > and will happen sometimes in the future, if ever. So some kind of timeout > seems to be a good idea. 10 seconds should be enough to do the work. > > I added a failure exit if not all required vcpus are offlined.Thanks, and for your replies to my questions. I have applied your patch. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel