From: Chao Peng <chao.p.peng@linux.intel.com>
To: Chong Li <lichong659@gmail.com>
Cc: Chong Li <chong.li@wustl.edu>, Sisu Xi <xisisu@gmail.com>,
george.dunlap@eu.citrix.com, dario.faggioli@citrix.com,
xen-devel@lists.xen.org, mengxu@cis.upenn.edu, jbeulich@suse.com,
dgolomb@seas.upenn.edu
Subject: Re: [PATCH v2 for Xen 4.6 1/4] xen: enabling XL to set per-VCPU parameters of a domain for RTDS scheduler
Date: Wed, 27 May 2015 18:02:08 +0800 [thread overview]
Message-ID: <20150527100208.GA9643@pengc-linux.bj.intel.com> (raw)
In-Reply-To: <1432598752-20826-1-git-send-email-chong.li@wustl.edu>
On Mon, May 25, 2015 at 07:05:52PM -0500, Chong Li wrote:
> --- a/xen/common/domctl.c
> +++ b/xen/common/domctl.c
> @@ -841,6 +841,11 @@ long do_domctl(XEN_GUEST_HANDLE_PARAM(xen_domctl_t) u_domctl)
> copyback = 1;
> break;
>
> + case XEN_DOMCTL_scheduler_vcpu_op:
> + ret = sched_adjust_vcpu(d, &op->u.scheduler_vcpu_op);
> + copyback = 1;
I didn't see any fields you need to copy back here ('vcpus' were copied back
in rt_vcpu_cntl() already).
> +{
> + struct rt_private *prv = rt_priv(ops);
> + struct rt_dom * const sdom = rt_dom(d);
> + struct rt_vcpu *svc;
> + struct list_head *iter;
> + unsigned long flags;
> + int rc = 0;
> + xen_domctl_sched_rtds_params_t local_sched;
> + unsigned int vcpuid;
> + unsigned int i;
'vcpuid' is only used in 'get' path once while 'i' is used in 'set' path
only, perhaps merge the two variables?
> +
> + switch ( op->cmd )
> + {
> + case XEN_DOMCTL_SCHEDOP_getvcpuinfo:
> + spin_lock_irqsave(&prv->lock, flags);
> + list_for_each( iter, &sdom->vcpu )
> + {
> + svc = list_entry(iter, struct rt_vcpu, sdom_elem);
> + vcpuid = svc->vcpu->vcpu_id;
> +
> + local_sched.budget = svc->budget / MICROSECS(1);
> + local_sched.period = svc->period / MICROSECS(1);
> + if ( copy_to_guest_offset(op->u.rtds.vcpus, vcpuid,
> + &local_sched, 1) )
> + {
> + spin_unlock_irqrestore(&prv->lock, flags);
> + return -EFAULT;
^Double spaces.
> + }
> + hypercall_preempt_check();
The check itself does nothing for preemption, you need return –ERESTART
or call hypercall_create_continuation to make the preemption happen.
> + }
> + spin_unlock_irqrestore(&prv->lock, flags);
> + break;
'nr_vcpus' is not actually used untile now but in xc side you do pass
that in.
Regards
Chao
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2015-05-27 10:02 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-26 0:05 [PATCH v2 for Xen 4.6 1/4] xen: enabling XL to set per-VCPU parameters of a domain for RTDS scheduler Chong Li
2015-05-26 9:08 ` Jan Beulich
2015-05-26 17:18 ` Chong Li
2015-05-27 5:33 ` Chong Li
2015-05-27 11:42 ` Jan Beulich
2015-05-27 11:41 ` Jan Beulich
2015-05-29 13:01 ` Dario Faggioli
2015-05-29 13:14 ` Jan Beulich
2015-06-04 15:27 ` Dario Faggioli
2015-05-27 10:02 ` Chao Peng [this message]
2015-05-27 22:16 ` Chong Li
2015-05-29 13:51 ` Dario Faggioli
2015-05-29 16:47 ` Chong Li
2015-06-04 15:10 ` Dario Faggioli
2015-06-02 16:06 ` George Dunlap
2015-06-02 16:28 ` George Dunlap
2015-06-04 15:14 ` 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=20150527100208.GA9643@pengc-linux.bj.intel.com \
--to=chao.p.peng@linux.intel.com \
--cc=chong.li@wustl.edu \
--cc=dario.faggioli@citrix.com \
--cc=dgolomb@seas.upenn.edu \
--cc=george.dunlap@eu.citrix.com \
--cc=jbeulich@suse.com \
--cc=lichong659@gmail.com \
--cc=mengxu@cis.upenn.edu \
--cc=xen-devel@lists.xen.org \
--cc=xisisu@gmail.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.