From: Dario Faggioli <dario.faggioli@citrix.com>
To: anshul makkar <anshul.makkar@citrix.com>, xen-devel@lists.xen.org
Cc: george.dunlap@eu.citrix.com
Subject: Re: [PATCH v2 1/1] ratelimit: Implement rate limit for credit2 scheduler Rate limit assures that a vcpu will execute for a minimum amount of time before being put at the back of a queue or being preempted by higher priority thread.
Date: Tue, 26 Jul 2016 12:50:48 +0200 [thread overview]
Message-ID: <1469530248.32102.37.camel@citrix.com> (raw)
In-Reply-To: <579623E8.50100@citrix.com>
[-- Attachment #1.1: Type: text/plain, Size: 3216 bytes --]
On Mon, 2016-07-25 at 15:36 +0100, anshul makkar wrote:
> On 22/07/16 11:36, Dario Faggioli wrote:
> >
> > This version is an improvement, but it looks to me that you've
> > missed a
> > few of the review comments to v1.
>
> Sorry about that. !!
>
NP. It's indeed something quite important... but it happens from time
to time. :-)
> @@ -1775,9 +1829,13 @@ runq_candidate(struct
> > > csched2_runqueue_data
> > > *rqd,
> > > }
> > >
> > > /* If the next one on the list has more credit than
> > > current
> > > - * (or idle, if current is not runnable), choose it. */
> > > + * (or idle, if current is not runnable) and current one
> > > has
> > > already
> > > + * executed for more than ratelimit. choose it.
> > > + * Control has reached here means that current vcpu has
> > > executed >
> > > + * ratelimit_us or ratelimit is off, so chose the next
> > > one.
> > > + */
> > > if ( svc->credit > snext->credit )
> > > - snext = svc;
> > > + snext = svc;
> > >
> > Both me and George agreed that changing the comment like this is
> > not
> > helping much and should not be done.
> Though, I find the extended comment useful, but if you don't agree I
> will remove it v3.
>
So, I just wanted to reply to this, then I'll go looking at v3.
Things like this are, up to a rather high extent, a matter of taste.
And I see why you think you're adding useful information, and I'm not
saying that is completely untrue.
So, I'm explaining why I'm asking you to remove this, and then I'll go
looking at v3. :-) As said, it's not that what you add is completely
useless. But that particular piece of code the comment is referring to
has nothing to do with ratelimiting, and I thus just don't think it is
useful to have its comment talking about ratelimit.
Actually, it may be confusing. In fact, if I'm reading the code trying
to focus on something that is not ratelimit, a comment like this risks
driving my focus away, and forcing me to think what ratelimiting has to
do with this.
In fact, there are two other possible reasons why we may not get to
this point of the loop, and each of them:
- has its own comment where it is actually checked for/enforced;
- does not have its own comment repeated here (e.g., like, for
affinity, "Control has reached here means that svc can run on this
cpu.").
So, the ratelimit related aspects should be put in a comment close to
the code that checks and enforces ratelimiting, which is there already,
in your patch, where they will be:
1. helpful to people trying to understand rateliminting;
2. out of the way of people reasoning on anything else than
ratelimiting.
Thanks and Regards,
Dario
--
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
[-- Attachment #2: Type: text/plain, Size: 127 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
prev parent reply other threads:[~2016-07-26 10:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-18 12:22 [PATCH v2 1/1] ratelimit: Implement rate limit for credit2 scheduler Rate limit assures that a vcpu will execute for a minimum amount of time before being put at the back of a queue or being preempted by higher priority thread Anshul Makkar
2016-07-22 10:36 ` Dario Faggioli
2016-07-25 14:36 ` anshul makkar
2016-07-26 10:50 ` Dario Faggioli [this message]
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=1469530248.32102.37.camel@citrix.com \
--to=dario.faggioli@citrix.com \
--cc=anshul.makkar@citrix.com \
--cc=george.dunlap@eu.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).