xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: Meng Xu <xumengpanda@gmail.com>
Cc: Ian Campbell <ian.campbell@citrix.com>,
	Sisu Xi <xisisu@gmail.com>,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
	George Dunlap <george.dunlap@eu.citrix.com>,
	Chenyang Lu <lu@cse.wustl.edu>,
	Dario Faggioli <dario.faggioli@citrix.com>,
	Ian Jackson <ian.jackson@eu.citrix.com>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>,
	Linh Thi Xuan Phan <ptxlinh@gmail.com>,
	Meng Xu <mengxu@cis.upenn.edu>, Chao Wang <chaowang@wustl.edu>,
	Chong Li <lichong659@gmail.com>,
	Dagaen Golomb <dgolomb@seas.upenn.edu>
Subject: Re: [PATCH v3 1/4] xen: add real time scheduler rtds
Date: Wed, 17 Sep 2014 10:22:28 +0100	[thread overview]
Message-ID: <54196EF4020000780003596F@mail.emea.novell.com> (raw)
In-Reply-To: <CAENZ-+kMdEgk=xJz3ndz8FzqEzrrz3aZLXCROrhUKsx51Joh1w@mail.gmail.com>

>>> On 16.09.14 at 18:38, <xumengpanda@gmail.com> wrote:
> 2014-09-16 4:52 GMT-04:00 Jan Beulich <JBeulich@suse.com>:
>>
>> >>> On 16.09.14 at 10:42, <dario.faggioli@citrix.com> wrote:
>> > On Sun, 2014-09-14 at 17:37 -0400, Meng Xu wrote:
>> >> --- /dev/null
>> >> +++ b/xen/common/sched_rt.c
>> >
>> >> +/*
>> >> + * Init/Free related code
>> >> + */
>> >> +static int
>> >> +rt_init(struct scheduler *ops)
>> >> +{
>> >> +    struct rt_private *prv = xzalloc(struct rt_private);
>> >> +
>> >> +    printk("Initializing RTDS scheduler\n" \
>> >> +           "WARNING: This is experimental software in development.\n" \
>> >> +           "Use at your own risk.\n");
>> >>
>> > I don't think you need the '\' in this case...
>>
>> Definitely not. Please drop.
>>
>> >> +    list_for_each_safe(iter, tmp, runq)
>> >> +    {
>> >> +        svc = __q_elem(iter);
>> >> +
>> >> +        if ( now >= svc->cur_deadline )
>> >> +        {
>> >> +            rt_update_deadline(now, svc);
>> >> +            /* reinsert the vcpu if its deadline is updated */
>> >> +            __q_remove(svc);
>> >> +            __runq_insert(ops, svc);
>> >> +        }
>> >> +        else
>> >> +            break;
>> >>
>> > Just from an aesthetic perspective, I think I'd have inverted the
>> > condition and, hence, the two brances (i.e., "if ( < ) break; else {}").
>>
>> In which case the "else" and with it one level of indentation
>> should go away.
> 
> 
> So the code will be like this:
> 
> if ( < )
>     break;
> 
> rt_update_deadline(now, svc);
>  /* reinsert the vcpu if its deadline is updated */
>  __q_remove(svc);
> __runq_insert(ops, svc);
> 
> 
> Am I correct? (Just confirm I understand what you said correctly. :-) )

Yes.

Jan

  reply	other threads:[~2014-09-17  9:22 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-14 21:37 Introduce rtds real-time scheduler for Xen Meng Xu
2014-09-14 21:37 ` [PATCH v3 1/4] xen: add real time scheduler rtds Meng Xu
2014-09-15 10:40   ` Jan Beulich
2014-09-16  8:42   ` Dario Faggioli
2014-09-16  8:52     ` Jan Beulich
2014-09-16  8:59       ` Dario Faggioli
2014-09-16 16:38       ` Meng Xu
2014-09-17  9:22         ` Jan Beulich [this message]
2014-09-18 16:08   ` George Dunlap
2014-09-18 18:08     ` Dario Faggioli
2014-09-19 13:11       ` Meng Xu
2014-09-22 17:11         ` Dario Faggioli
2014-09-22 20:40           ` Meng Xu
2014-09-19  9:45     ` Dario Faggioli
2014-09-19 16:44     ` Konrad Rzeszutek Wilk
2014-09-22 17:26       ` Dario Faggioli
2014-09-22 20:45         ` Meng Xu
2014-09-22 22:43         ` Konrad Rzeszutek Wilk
2014-09-20 21:10     ` Meng Xu
2014-09-23 10:47       ` George Dunlap
2014-09-14 21:37 ` [PATCH v3 2/4] libxc: add rtds scheduler Meng Xu
2014-09-18 16:15   ` George Dunlap
2014-09-14 21:37 ` [PATCH v3 3/4] libxl: " Meng Xu
2014-09-15 22:07   ` Ian Campbell
2014-09-16  1:11     ` Meng Xu
2014-09-16  1:49       ` Ian Campbell
2014-09-16  3:32         ` Meng Xu
2014-09-16  7:27           ` Dario Faggioli
2014-09-16 16:54             ` Ian Campbell
2014-09-17 10:19               ` Dario Faggioli
2014-09-16  8:04   ` Dario Faggioli
2014-09-16 16:56     ` Ian Campbell
2014-09-18 16:24   ` George Dunlap
2014-09-18 17:19     ` Ian Campbell
2014-09-14 21:37 ` [PATCH v3 4/4] xl: introduce " Meng Xu
2014-09-15 22:18   ` Ian Campbell
2014-09-16  7:49   ` Dario Faggioli
2014-09-18 16:35   ` George Dunlap
2014-09-16  7:43 ` Introduce rtds real-time scheduler for Xen Dario Faggioli
2014-09-17 14:15 ` Dario Faggioli
2014-09-17 14:33   ` Meng Xu
2014-09-18 16:00   ` Meng Xu
2014-09-23 13:50 ` Ian Campbell
2014-09-24 20:59   ` Meng Xu
2014-09-24 21:14     ` Wei Liu
2014-09-25  7:39       ` Ian Campbell

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=54196EF4020000780003596F@mail.emea.novell.com \
    --to=jbeulich@suse.com \
    --cc=chaowang@wustl.edu \
    --cc=dario.faggioli@citrix.com \
    --cc=dgolomb@seas.upenn.edu \
    --cc=george.dunlap@eu.citrix.com \
    --cc=ian.campbell@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=lichong659@gmail.com \
    --cc=lu@cse.wustl.edu \
    --cc=mengxu@cis.upenn.edu \
    --cc=ptxlinh@gmail.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=xen-devel@lists.xen.org \
    --cc=xisisu@gmail.com \
    --cc=xumengpanda@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).