xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: Chong Li <lichong659@gmail.com>
Cc: Chong Li <chong.li@wustl.edu>, Sisu Xi <xisisu@gmail.com>,
	George Dunlap <george.dunlap@eu.citrix.com>,
	Dario Faggioli <dario.faggioli@citrix.com>,
	xen-devel <xen-devel@lists.xen.org>,
	Meng Xu <mengxu@cis.upenn.edu>,
	Dagaen Golomb <dgolomb@seas.upenn.edu>
Subject: Re: [PATCH v7 for Xen 4.7 1/4] xen: enable per-VCPU parameter settings for RTDS scheduler
Date: Fri, 18 Mar 2016 01:39:21 -0600	[thread overview]
Message-ID: <56EBBEB902000078000DE315@prv-mh.provo.novell.com> (raw)
In-Reply-To: <CAGHO-ioEhHuirZFGRW5RDzZ+CBvf_sO-AxmjrWyL-cZAKNWdTA@mail.gmail.com>

>>> On 17.03.16 at 21:42, <lichong659@gmail.com> wrote:
> On Thu, Mar 17, 2016 at 5:03 AM, Dario Faggioli
> <dario.faggioli@citrix.com> wrote:
>> On Wed, 2016-03-16 at 11:47 -0500, Chong Li wrote:
> 
>>
>>> --- a/xen/common/sched_rt.c
>>> +++ b/xen/common/sched_rt.c
>>> @@ -1129,24 +1145,22 @@ rt_dom_cntl(
>>>      struct vcpu *v;
>>>      unsigned long flags;
>>>      int rc = 0;
>>> +    xen_domctl_schedparam_vcpu_t local_sched;
>>> +    s_time_t period, budget;
>>> +    uint32_t index = 0;
>>>
>>>      switch ( op->cmd )
>>>      {
>>>      case XEN_DOMCTL_SCHEDOP_getinfo:
>>> -        if ( d->max_vcpus > 0 )
>>> -        {
>>> -            spin_lock_irqsave(&prv->lock, flags);
>>> -            svc = rt_vcpu(d->vcpu[0]);
>>> -            op->u.rtds.period = svc->period / MICROSECS(1);
>>> -            op->u.rtds.budget = svc->budget / MICROSECS(1);
>>> -            spin_unlock_irqrestore(&prv->lock, flags);
>>> -        }
>>> -        else
>>> -        {
>>> -            /* If we don't have vcpus yet, let's just return the
>>> defaults. */
>>> -            op->u.rtds.period = RTDS_DEFAULT_PERIOD;
>>> -            op->u.rtds.budget = RTDS_DEFAULT_BUDGET;
>>> -        }
>>> +        /* Return the default parameters.
>>> +         * A previous bug fixed here:
>>> +         * The default PERIOD or BUDGET should be divided by
>>> MICROSECS(1),
>>> +         * before returned to upper caller.
>>> +         */
>> Comment style (missing opening '/*').
>>
>> Also, putting this kind of things in comments is not at all ideal. If
>> doing this in this patch, you should mention it in the changelog. Or
>> you do it in a separate patch (that you put before this one in the
>> series).
>>
>> I'd say that, in this specific case, is not a big deal which one of the
>> two approaches you take (mentioning or separate patch), but the having
>> a separate one is indeed almost always preferable (e.g., the fix can be
>> backported).
> 
> If I choose mentioning, do I move the comment to the changelog? Or do I keep
> it here and say it again in the changelog?

Just consider what would happen if everyone mentioned in
comments the bugs they fixed. I think the answer to you question
is obvious then...

Jan


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

  reply	other threads:[~2016-03-18  7:39 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-16 16:47 [PATCH v7 for Xen 4.7 0/4] Enable per-VCPU parameter settings for RTDS scheduler Chong Li
2016-03-16 16:47 ` [PATCH v7 for Xen 4.7 1/4] xen: enable " Chong Li
2016-03-17 10:03   ` Dario Faggioli
2016-03-17 20:42     ` Chong Li
2016-03-18  7:39       ` Jan Beulich [this message]
2016-03-18 10:47         ` Dario Faggioli
2016-03-18 20:22           ` Chong Li
2016-03-18  7:48     ` Jan Beulich
2016-03-16 16:47 ` [PATCH v7 for Xen 4.7 2/4] libxc: " Chong Li
2016-03-16 19:24   ` Wei Liu
2016-03-17  2:28   ` Dario Faggioli
2016-03-16 16:47 ` [PATCH v7 for Xen 4.7 3/4] libxl: " Chong Li
2016-03-16 19:24   ` Wei Liu
2016-03-17  4:05   ` Dario Faggioli
2016-03-17 19:50     ` Chong Li
2016-03-18  9:17       ` Dario Faggioli
2016-03-17  4:29   ` Dario Faggioli
2016-03-16 16:47 ` [PATCH v7 for Xen 4.7 4/4] xl: " Chong Li
2016-03-16 19:24   ` Wei Liu
2016-03-16 19:29     ` Wei Liu

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=56EBBEB902000078000DE315@prv-mh.provo.novell.com \
    --to=jbeulich@suse.com \
    --cc=chong.li@wustl.edu \
    --cc=dario.faggioli@citrix.com \
    --cc=dgolomb@seas.upenn.edu \
    --cc=george.dunlap@eu.citrix.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 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).