From: Juergen Gross <juergen.gross@ts.fujitsu.com>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: [Patch][resend] implementation of cpupool support in xl
Date: Wed, 15 Sep 2010 10:45:43 +0200 [thread overview]
Message-ID: <4C9087B7.4090205@ts.fujitsu.com> (raw)
In-Reply-To: <1284539351.14311.18361.camel@zakaz.uk.xensource.com>
On 09/15/10 10:29, Ian Campbell wrote:
> On Wed, 2010-09-15 at 08:26 +0100, Juergen Gross wrote:
>> diff -r 3985fea87987 tools/libxl/libxl.idl
>> --- a/tools/libxl/libxl.idl Fri Sep 10 19:06:33 2010 +0100
>> +++ b/tools/libxl/libxl.idl Wed Sep 15 09:19:02 2010 +0200
>> @@ -43,7 +43,11 @@ SHUTDOWN_* constant."""),
>> ], destructor_fn=None)
>>
>> libxl_poolinfo = Struct("poolinfo", [
>> - ("poolid", uint32)
>> + ("poolid", uint32),
>> + ("sched_id", uint32),
>> + ("n_dom", uint32),
>> + ("cpumap_size", uint32),
>> + ("cpumap", libxl_cpumap)
>> ], destructor_fn=None)
>>
>> libxl_vminfo = Struct("vminfo", [
>
> Does the addition of the cpumap field here mean that we now need to
> generate a destructor function (by removing destructor_fn=None) and call
> it e.g. from main_pool*?
I took care of this by allocating the space for the cpumap(s) together with
the poolinfo structure(s).
If you don't like this, a destructor would be the correct solution, I think.
> Would it make sense to turn libxl_cpumap into a struct containing both
> the size and the data pointer?
IMO this would make sense. You ALWAYS need the size of a cpumap to handle it
correctly.
>
>> diff -r 3985fea87987 tools/libxl/libxl.h
>> --- a/tools/libxl/libxl.h Fri Sep 10 19:06:33 2010 +0100
>> +++ b/tools/libxl/libxl.h Wed Sep 15 09:19:02 2010 +0200
>> @@ -471,6 +471,15 @@ int libxl_device_net2_del(libxl_ctx *ctx
>> int libxl_device_net2_del(libxl_ctx *ctx, libxl_device_net2 *net2,
>> int wait);
>>
>> +int libxl_get_freecpus(libxl_ctx *ctx, int *n_cpus, uint64_t **cpumap);
>> +int libxl_create_cpupool(libxl_ctx *ctx, char *name, int schedid,
>> + uint64_t *cpumap, int n_cpus, libxl_uuid *uuid,
>> + uint32_t *poolid);
>
> Should these cpumap parameters be libxl_cpumap* or are they a different sort of cpumap?
You are right, these should be libxl_cpumap.
I'll update the patch. It would be nice to know whether you are planning to
change libxl_cpumap to include the size or not.
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
next prev parent reply other threads:[~2010-09-15 8:45 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-15 7:26 [Patch][resend] implementation of cpupool support in xl Juergen Gross
2010-09-15 8:29 ` Ian Campbell
2010-09-15 8:45 ` Juergen Gross [this message]
2010-09-15 9:16 ` Ian Campbell
2010-09-15 9:23 ` Juergen Gross
2010-09-15 9:37 ` Ian Campbell
2010-09-15 10:22 ` Ian Campbell
2010-09-15 11:28 ` Juergen Gross
2010-09-15 15:35 ` Ian Campbell
2010-09-16 5:48 ` Juergen Gross
2010-09-16 17:24 ` Ian Jackson
2010-09-16 5:58 ` Vasiliy G Tolstov
2010-09-16 13:01 ` Juergen Gross
2010-09-16 13:02 ` Vasiliy G Tolstov
2010-09-16 10:45 ` Ian Campbell
2010-09-16 12:02 ` Juergen Gross
2010-09-16 17:22 ` Ian Jackson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4C9087B7.4090205@ts.fujitsu.com \
--to=juergen.gross@ts.fujitsu.com \
--cc=Ian.Campbell@citrix.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.