From: George Dunlap <george.dunlap@eu.citrix.com>
To: xen-devel@lists.xensource.com
Cc: george.dunlap@eu.citrix.com
Subject: [PATCH 05 of 10] libxc: Implement SCHEDOP sysctl for credit scheduler
Date: Tue, 21 Feb 2012 13:34:11 +0000 [thread overview]
Message-ID: <5e3ca9be617e7c82d305.1329831251@kodo2> (raw)
In-Reply-To: <patchbomb.1329831246@kodo2>
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
diff -r 4ce1812b0249 -r 5e3ca9be617e tools/libxc/xc_csched.c
--- a/tools/libxc/xc_csched.c Tue Feb 21 12:14:18 2012 +0000
+++ b/tools/libxc/xc_csched.c Tue Feb 21 12:14:32 2012 +0000
@@ -61,3 +61,47 @@ xc_sched_credit_domain_get(
return err;
}
+
+int
+xc_sched_credit_param_set(
+ xc_interface *xch,
+ uint32_t cpupool_id,
+ struct xen_sysctl_credit_schedule *schedule)
+{
+ int rc;
+ DECLARE_SYSCTL;
+
+ sysctl.cmd = XEN_SYSCTL_scheduler_op;
+ sysctl.u.scheduler_op.cpupool_id = cpupool_id;
+ sysctl.u.scheduler_op.sched_id = XEN_SCHEDULER_CREDIT;
+ sysctl.u.scheduler_op.cmd = XEN_SYSCTL_SCHEDOP_putinfo;
+
+ sysctl.u.scheduler_op.u.sched_credit = *schedule;
+
+ rc = do_sysctl(xch, &sysctl);
+
+ *schedule = sysctl.u.scheduler_op.u.sched_credit;
+
+ return rc;
+}
+
+int
+xc_sched_credit_param_get(
+ xc_interface *xch,
+ uint32_t cpupool_id,
+ struct xen_sysctl_credit_schedule *schedule)
+{
+ int rc;
+ DECLARE_SYSCTL;
+
+ sysctl.cmd = XEN_SYSCTL_scheduler_op;
+ sysctl.u.scheduler_op.cpupool_id = cpupool_id;
+ sysctl.u.scheduler_op.sched_id = XEN_SCHEDULER_CREDIT;
+ sysctl.u.scheduler_op.cmd = XEN_SYSCTL_SCHEDOP_getinfo;
+
+ rc = do_sysctl(xch, &sysctl);
+
+ *schedule = sysctl.u.scheduler_op.u.sched_credit;
+
+ return rc;
+}
diff -r 4ce1812b0249 -r 5e3ca9be617e tools/libxc/xenctrl.h
--- a/tools/libxc/xenctrl.h Tue Feb 21 12:14:18 2012 +0000
+++ b/tools/libxc/xenctrl.h Tue Feb 21 12:14:32 2012 +0000
@@ -668,7 +668,12 @@ int xc_sched_credit_domain_set(xc_interf
int xc_sched_credit_domain_get(xc_interface *xch,
uint32_t domid,
struct xen_domctl_sched_credit *sdom);
-
+int xc_sched_credit_param_set(xc_interface *xch,
+ uint32_t cpupool_id,
+ struct xen_sysctl_credit_schedule *schedule);
+int xc_sched_credit_param_get(xc_interface *xch,
+ uint32_t cpupool_id,
+ struct xen_sysctl_credit_schedule *schedule);
int xc_sched_credit2_domain_set(xc_interface *xch,
uint32_t domid,
struct xen_domctl_sched_credit2 *sdom);
next prev parent reply other threads:[~2012-02-21 13:34 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-21 13:34 [PATCH 00 of 10] Allow user to configure credit scheduler parameters George Dunlap
2012-02-21 13:34 ` [PATCH 01 of 10] cleanup: Remove dependency files in efi directory during a make clean George Dunlap
2012-02-21 13:34 ` [PATCH 02 of 10] xen: Add a #define for the default ratelimit George Dunlap
2012-02-21 13:34 ` [PATCH 03 of 10] xen: Print ratelimit in scheduler debugkey George Dunlap
2012-02-21 13:34 ` [PATCH 04 of 10] xen: Implement SCHEDOP sysctl for credit scheduler George Dunlap
2012-02-21 13:34 ` George Dunlap [this message]
2012-02-21 17:49 ` [PATCH 05 of 10] libxc: " Ian Jackson
2012-02-21 13:34 ` [PATCH 06 of 10] libxl: cleanup: Remove pointless ERRNOVAL George Dunlap
2012-02-21 17:46 ` Ian Jackson
2012-02-21 13:34 ` [PATCH 07 of 10] libxl: Rename libxl_sched_* to include _domain George Dunlap
2012-02-21 17:52 ` Ian Jackson
2012-02-21 17:54 ` George Dunlap
2012-02-21 13:34 ` [PATCH 08 of 10] libxl: Implement libxl_sched_credit_param_[gs]et George Dunlap
2012-02-21 17:51 ` Ian Jackson
2012-02-21 17:56 ` George Dunlap
2012-02-21 17:57 ` Ian Jackson
2012-02-21 13:34 ` [PATCH 09 of 10] xl: Refactor sched_domain_output to have a callback for pool information George Dunlap
2012-02-21 17:49 ` Ian Jackson
2012-02-21 13:34 ` [PATCH 10 of 10] xl: Implement sched-credit schedule parameter command-line interface George Dunlap
2012-02-21 17:56 ` Ian Jackson
2012-02-21 18:11 ` George Dunlap
2012-02-21 18:17 ` 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=5e3ca9be617e7c82d305.1329831251@kodo2 \
--to=george.dunlap@eu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).