xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: anshulmakkar <anshulmakkar@gmail.com>
To: xen-devel@lists.xen.org
Cc: jgross@suse.com, sstabellini@kernel.org, wei.liu2@citrix.com,
	George.Dunlap@eu.citrix.com, andrew.cooper3@citrix.com,
	dario.faggioli@citrix.com, ian.jackson@eu.citrix.com,
	marmarek@invisiblethingslab.com,
	robert.vanvossen@dornerworks.com, tim@xen.org,
	josh.whitehead@dornerworks.com, mengxu@cis.upenn.edu,
	jbeulich@suse.com, anshulmakkar <anshulmakkar@gmail.com>
Subject: [PATCH 1/3] credit2: libxc related changes to add support for runqueue per cpupool.
Date: Tue, 12 Sep 2017 01:45:40 +0100	[thread overview]
Message-ID: <1505177142-14864-2-git-send-email-anshulmakkar@gmail.com> (raw)
In-Reply-To: <1505177142-14864-1-git-send-email-anshulmakkar@gmail.com>

libxc receives scheduler specific configuration parametes from 
libxl.

Signed-off-by: Anshul Makkar <anshulmakkar@gmail.com>
---
 tools/libxc/include/xenctrl.h     | 6 +++++-
 tools/libxc/xc_cpupool.c          | 4 +++-
 tools/python/xen/lowlevel/xc/xc.c | 3 ++-
 3 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/tools/libxc/include/xenctrl.h b/tools/libxc/include/xenctrl.h
index 43151cb..e2157e9 100644
--- a/tools/libxc/include/xenctrl.h
+++ b/tools/libxc/include/xenctrl.h
@@ -1077,17 +1077,21 @@ typedef struct xc_cpupoolinfo {
 
 #define XC_CPUPOOL_POOLID_ANY 0xFFFFFFFF
 
+typedef xen_sysctl_sched_param_t xc_schedparam_t;
+
 /**
  * Create a new cpupool.
  *
  * @parm xc_handle a handle to an open hypervisor interface
  * @parm ppoolid pointer to the new cpupool id (in/out)
  * @parm sched_id id of scheduler to use for pool
+ * @parm sched_param parameter of the scheduler of the cpupool eg. runq for credit2
  * return 0 on success, -1 on failure
  */
 int xc_cpupool_create(xc_interface *xch,
                       uint32_t *ppoolid,
-                      uint32_t sched_id);
+                      uint32_t sched_id,
+                      xc_schedparam_t * sched_param);
 
 /**
  * Destroy a cpupool. Pool must be unused and have no cpu assigned.
diff --git a/tools/libxc/xc_cpupool.c b/tools/libxc/xc_cpupool.c
index fbd8cc9..fb2d183 100644
--- a/tools/libxc/xc_cpupool.c
+++ b/tools/libxc/xc_cpupool.c
@@ -36,7 +36,8 @@ static int do_sysctl_save(xc_interface *xch, struct xen_sysctl *sysctl)
 
 int xc_cpupool_create(xc_interface *xch,
                       uint32_t *ppoolid,
-                      uint32_t sched_id)
+                      uint32_t sched_id,
+                      xc_schedparam_t * sched_params)
 {
     int err;
     DECLARE_SYSCTL;
@@ -46,6 +47,7 @@ int xc_cpupool_create(xc_interface *xch,
     sysctl.u.cpupool_op.cpupool_id = (*ppoolid == XC_CPUPOOL_POOLID_ANY) ?
         XEN_SYSCTL_CPUPOOL_PAR_ANY : *ppoolid;
     sysctl.u.cpupool_op.sched_id = sched_id;
+    sysctl.u.cpupool_op.sched_param = *sched_params;
     if ( (err = do_sysctl_save(xch, &sysctl)) != 0 )
         return err;
 
diff --git a/tools/python/xen/lowlevel/xc/xc.c b/tools/python/xen/lowlevel/xc/xc.c
index aa9f8e4..a83a23f 100644
--- a/tools/python/xen/lowlevel/xc/xc.c
+++ b/tools/python/xen/lowlevel/xc/xc.c
@@ -1704,6 +1704,7 @@ static PyObject *pyxc_cpupool_create(XcObject *self,
                                      PyObject *kwds)
 {
     uint32_t cpupool = XC_CPUPOOL_POOLID_ANY, sched = XEN_SCHEDULER_CREDIT;
+    xc_schedparam_t param;
 
     static char *kwd_list[] = { "pool", "sched", NULL };
 
@@ -1711,7 +1712,7 @@ static PyObject *pyxc_cpupool_create(XcObject *self,
                                       &sched))
         return NULL;
 
-    if ( xc_cpupool_create(self->xc_handle, &cpupool, sched) < 0 )
+    if ( xc_cpupool_create(self->xc_handle, &cpupool, sched, &param) < 0 )
         return pyxc_error_to_exception(self->xc_handle);
 
     return PyLongOrInt_FromLong(cpupool);
-- 
2.7.4


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

  reply	other threads:[~2017-09-12  0:45 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-12  0:45 implement runqueue per cpupool anshulmakkar
2017-09-12  0:45 ` anshulmakkar [this message]
2017-09-14  6:42   ` [PATCH 1/3] credit2: libxc related changes to add support for " Juergen Gross
2017-09-14 12:58     ` Dario Faggioli
2019-01-17 16:10       ` anshul
2019-01-17 16:17         ` Juergen Gross
2017-09-14 13:28   ` Dario Faggioli
2017-09-12  0:45 ` [PATCH 2/3] credit2: libxl " anshulmakkar
2017-09-14  6:37   ` Juergen Gross
2017-11-16 21:10     ` Anshul Makkar
2017-11-17  6:58       ` Juergen Gross
2017-09-12  0:45 ` [PATCH 3/3] credit2: xen " anshulmakkar
2017-09-14  6:24   ` Juergen Gross
2017-09-14 10:03   ` Jan Beulich
2017-09-14 14:08   ` Dario Faggioli
2017-09-14  4:21 ` implement " Juergen Gross

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=1505177142-14864-2-git-send-email-anshulmakkar@gmail.com \
    --to=anshulmakkar@gmail.com \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=dario.faggioli@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=jbeulich@suse.com \
    --cc=jgross@suse.com \
    --cc=josh.whitehead@dornerworks.com \
    --cc=marmarek@invisiblethingslab.com \
    --cc=mengxu@cis.upenn.edu \
    --cc=robert.vanvossen@dornerworks.com \
    --cc=sstabellini@kernel.org \
    --cc=tim@xen.org \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.org \
    /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).