From: Dario Faggioli <dario.faggioli@citrix.com>
To: Meng Xu <mengxu@cis.upenn.edu>, xen-devel@lists.xen.org
Cc: george.dunlap@eu.citrix.com, xumengpanda@gmail.com,
Haoran Li <naroahlee@gmail.com>
Subject: Re: [PATCH v4] xen: rtds: only tickle non-already tickled CPUs
Date: Wed, 2 Aug 2017 18:08:06 +0200 [thread overview]
Message-ID: <1501690086.19956.7.camel@citrix.com> (raw)
In-Reply-To: <1501615476-3059-1-git-send-email-mengxu@cis.upenn.edu>
[-- Attachment #1.1: Type: text/plain, Size: 3213 bytes --]
On Tue, 2017-08-01 at 15:24 -0400, Meng Xu wrote:
> The initial discussion of this patch can be found at
> https://lists.xenproject.org/archives/html/xen-devel/2017-02/msg02857
> .html
>
> Changes in v4:
> 1) Take Dario's suggestions:
> Search the new->cpu first for the cpu to tickle.
> This get rid of the if statement in previous versions.
> 2) Reword the comments and commit messages.
> 3) Rebased on staging branch.
>
> Issues in v2 and v3:
> Did not rebase on the latest staging branch.
> Did not solve the comments/issues in v1.
> Please ignore the v2 and v3.
>
Ok, thanks for taking care of this.
I've only have two more minor comments.
> diff --git a/xen/common/sched_rt.c b/xen/common/sched_rt.c
> index 39f6bee..5fec95f 100644
> --- a/xen/common/sched_rt.c
> +++ b/xen/common/sched_rt.c
> @@ -1147,9 +1147,9 @@ rt_vcpu_sleep(const struct scheduler *ops,
> struct vcpu *vc)
> * Called by wake() and context_saved()
> * We have a running candidate here, the kick logic is:
> * Among all the cpus that are within the cpu affinity
> - * 1) if the new->cpu is idle, kick it. This could benefit cache hit
> - * 2) if there are any idle vcpu, kick it.
> - * 3) now all pcpus are busy;
> + * 1) if there are any idle vcpu, kick it.
>
Either:
"if there is an ile CPU, kick it."
Or
"if there are any idle CPUs, kick one."
Feel both more accurate (it's a CPU that is idle, not a vCPU, although,
yes, vcpus of the idle domain do exist, I know), and better in English.
This applies to both here and below, where this line is repeated.
> + For cache benefit,we first search new->cpu.
> + * 2) now all pcpus are busy;
> * among all the running vcpus, pick lowest priority one
> * if snext has higher priority, kick it.
> *
> @@ -1177,17 +1177,13 @@ runq_tickle(const struct scheduler *ops,
> struct rt_vcpu *new)
> cpumask_and(¬_tickled, online, new->vcpu->cpu_hard_affinity);
> cpumask_andnot(¬_tickled, ¬_tickled, &prv->tickled);
>
> - /* 1) if new's previous cpu is idle, kick it for cache benefit
> */
> - if ( is_idle_vcpu(curr_on_cpu(new->vcpu->processor)) )
> - {
> - SCHED_STAT_CRANK(tickled_idle_cpu);
> - cpu_to_tickle = new->vcpu->processor;
> - goto out;
> - }
> -
> - /* 2) if there are any idle pcpu, kick it */
> - /* The same loop also find the one with lowest priority */
> - for_each_cpu(cpu, ¬_tickled)
> + /*
> + * 1) If there are any idle vcpu, kick it.
> + * For cache benefit,we first search new->cpu.
>
"we check new->cpu for first" (or "as first", I think they both can be
used but I'm no native speaker).
With these two adjustments, you can have my:
Reviewed-by: Dario Faggioli <dario.faggioli@citrix.com>
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:[~2017-08-02 16:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-01 19:24 [PATCH v4] xen: rtds: only tickle non-already tickled CPUs Meng Xu
2017-08-02 16:08 ` 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=1501690086.19956.7.camel@citrix.com \
--to=dario.faggioli@citrix.com \
--cc=george.dunlap@eu.citrix.com \
--cc=mengxu@cis.upenn.edu \
--cc=naroahlee@gmail.com \
--cc=xen-devel@lists.xen.org \
--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 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.