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 3 of 3] full support of setting scheduler parameters on domain creation
Date: Tue, 22 May 2012 14:39:38 +0200 [thread overview]
Message-ID: <4FBB890A.4060507@ts.fujitsu.com> (raw)
In-Reply-To: <1337689856.10118.100.camel@zakaz.uk.xensource.com>
On 05/22/2012 02:30 PM, Ian Campbell wrote:
>> # HG changeset patch
>> # User Juergen Gross<juergen.gross@ts.fujitsu.com>
>> # Date 1337677423 -7200
>> # Node ID 953383741ff44d97587c2e75da79b092523d6e83
>> # Parent 19aaa30d7fdce2f1b56cb13399d603d955a61fb8
>> full support of setting scheduler parameters on domain creation
>>
>> Obtains default scheduler parameters before modifying any settings
>> specified
>> via domain config.
>>
>> Corrected an error for setting sedf parameters (setting .period
>> multiple
>> times).
>>
>> Signed-off-by: Juergen Gross<juergen.gross@ts.fujitsu.com>
>>
>> diff -r 19aaa30d7fdc -r 953383741ff4 tools/libxl/libxl.h
>> --- a/tools/libxl/libxl.h Tue May 22 10:31:30 2012 +0200
>> +++ b/tools/libxl/libxl.h Tue May 22 11:03:43 2012 +0200
>> @@ -605,6 +605,8 @@ int libxl_primary_console_exec(libxl_ctx
>> /* May be called with info_r == NULL to check for domain's existance
>> */
>> int libxl_domain_info(libxl_ctx*, libxl_dominfo *info_r,
>> uint32_t domid);
>> +int libxl_sched_set_defaults(libxl_ctx*, uint32_t poolid,
>> + libxl_sched_params *scparams);
> This interface really makes libxl_sched_params differ from all the other
> libxl structs (which have a public _init function and an internal
> setdefaults function). I'm not really sure its justified either, I was
> under the impression that you'd found that there were useful
> discriminating values?
Dario opted for this solution, so I proposed a patch implementing it.
I prefer this solution, too, as it isn't exporting scheduler internals to
the tools.
> If this function was called libxl_sched_init (replacing the
> autogenerated one) then it might be ok. Although I'm still not really
> sure what the issue is with having a discriminating value meaning
> default is, doing that keeps the _init function cheap too.
Okay, I can rename it.
>
>> int libxl__sched_set_params(libxl__gc *gc, uint32_t domid,
>> libxl_sched_params *scparams)
>> {
>> libxl_ctx *ctx = libxl__gc_owner(gc);
>> - libxl_scheduler sched;
>> libxl_sched_sedf_domain sedf_info;
>> libxl_sched_credit_domain credit_info;
>> libxl_sched_credit2_domain credit2_info;
>> int ret;
>>
>> - sched = libxl_get_scheduler (ctx);
>> - switch (sched) {
>> + switch (scparams->sched) {
> What happens if scparams->sched is not the scheduler used for this
> domain? Should it either be checked or set somewhere?
The check would be the same as the original setting of scparams->sched.
Setting of the scheduler parameters will be rejected by the hypervisor if the
scheduler does not match.
Juergen
--
Juergen Gross Principal Developer Operating Systems
PDG 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:[~2012-05-22 12:39 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-22 9:16 [PATCH 0 of 3] support of setting scheduler parameters on domain creation Juergen Gross
2012-05-22 9:16 ` [PATCH 1 of 3] Support of getting scheduler defaults Juergen Gross
2012-05-22 12:22 ` Ian Campbell
2012-05-22 12:29 ` Juergen Gross
2012-05-22 12:32 ` Ian Campbell
2012-05-22 12:58 ` Juergen Gross
2012-05-22 13:05 ` George Dunlap
2012-05-22 13:16 ` Ian Campbell
2012-05-22 13:40 ` Ian Campbell
2012-05-22 14:59 ` Ian Campbell
2012-05-22 23:46 ` Dario Faggioli
2012-05-23 5:34 ` Juergen Gross
2012-05-23 7:22 ` Dario Faggioli
2012-05-23 7:41 ` Ian Campbell
2012-05-23 8:45 ` Juergen Gross
2012-05-23 9:17 ` Ian Campbell
2012-05-23 10:18 ` Dario Faggioli
2012-05-23 8:48 ` Juergen Gross
2012-05-22 9:16 ` [PATCH 2 of 3] Support getting scheduler defaults in libxc Juergen Gross
2012-05-22 9:16 ` [PATCH 3 of 3] full support of setting scheduler parameters on domain creation Juergen Gross
2012-05-22 12:30 ` Ian Campbell
2012-05-22 12:39 ` Juergen Gross [this message]
2012-05-22 12:51 ` Ian Campbell
2012-05-22 22:15 ` Dario Faggioli
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=4FBB890A.4060507@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.