[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 3 of 3] full support of setting scheduler parameters on domain creation


  • To: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
  • From: Juergen Gross <juergen.gross@xxxxxxxxxxxxxx>
  • Date: Tue, 22 May 2012 14:39:38 +0200
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Tue, 22 May 2012 12:39:55 +0000
  • Domainkey-signature: s=s1536a; d=ts.fujitsu.com; c=nofws; q=dns; h=X-SBRSScore:X-IronPort-AV:Received:X-IronPort-AV: Received:Received:Message-ID:Date:From:Organization: User-Agent:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=n9JiHRsKASC2/3xa/tk01XFlMyaew1aikF7YMCdZq61xkPoPFWIQUAMz 7Wvqu8F0YXM1PHUvjoKv1bdFEai9ixHITU/2MM5VzX+0S2dC5g4BfIYAx BN1QVdHAaMukcn0BZkBGI9FMG8fCf5rboQHozcp9d5xHHqUPUQYdJOUB+ Q8Sn7jqx9BFfSk+VBM/5nR7Tju52/sq6gGNdAF9p2viQbGmuYWkqV8Vck nfjkZP6ZW6uF+tmurPb6LKjHv5nxe;
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>

On 05/22/2012 02:30 PM, Ian Campbell wrote:
# HG changeset patch
# User Juergen Gross<juergen.gross@xxxxxxxxxxxxxx>
# 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@xxxxxxxxxxxxxx>

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@xxxxxxxxxxxxxx
Domagkstr. 28                           Internet: ts.fujitsu.com
D-80807 Muenchen                 Company details: ts.fujitsu.com/imprint.html


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.