From: Juergen Gross <jgross@suse.com>
To: Dario Faggioli <dario.faggioli@citrix.com>,
xen-devel@lists.xenproject.org
Cc: George Dunlap <george.dunlap@eu.citrix.com>
Subject: Re: [PATCH 1/4] xen: sched: avoid dumping duplicate information
Date: Fri, 26 Jun 2015 15:43:24 +0200 [thread overview]
Message-ID: <558D56FC.3050204@suse.com> (raw)
In-Reply-To: <20150625121512.3353.50905.stgit@Solace.station>
On 06/25/2015 02:15 PM, Dario Faggioli wrote:
> When dumping scheduling information (debug key 'r'), what
> we print as 'Idle cpupool' is pretty much the same of what
> we print immediately after as 'Cpupool0'. In fact, if there
> are no pCPUs outside of any cpupools, it is exactly the
> same.
>
> If there are free pCPUs, there is some valuable information,
> but still a lot of duplication:
>
> (XEN) Online Cpus: 0-15
> (XEN) Free Cpus: 8
> (XEN) Idle cpupool:
> (XEN) Scheduler: SMP Credit Scheduler (credit)
> (XEN) info:
> (XEN) ncpus = 13
> (XEN) master = 0
> (XEN) credit = 3900
> (XEN) credit balance = 45
> (XEN) weight = 1280
> (XEN) runq_sort = 11820
> (XEN) default-weight = 256
> (XEN) tslice = 30ms
> (XEN) ratelimit = 1000us
> (XEN) credits per msec = 10
> (XEN) ticks per tslice = 3
> (XEN) migration delay = 0us
> (XEN) idlers: 00000000,00006d29
> (XEN) active vcpus:
> (XEN) 1: [1.7] pri=-1 flags=0 cpu=15 credit=-116 [w=256,cap=0] (84+300) {a/i=22/21 m=18+5 (k=0)}
> (XEN) 2: [1.3] pri=0 flags=0 cpu=1 credit=-113 [w=256,cap=0] (87+300) {a/i=37/36 m=11+544 (k=0)}
> (XEN) 3: [0.15] pri=-1 flags=0 cpu=4 credit=95 [w=256,cap=0] (210+300) {a/i=127/126 m=108+9 (k=0)}
> (XEN) 4: [0.10] pri=-2 flags=0 cpu=12 credit=-287 [w=256,cap=0] (-84+300) {a/i=163/162 m=36+568 (k=0)}
> (XEN) 5: [0.7] pri=-2 flags=0 cpu=2 credit=-242 [w=256,cap=0] (-42+300) {a/i=129/128 m=16+50 (k=0)}
> (XEN) CPU[08] sort=5791, sibling=00000000,00000300, core=00000000,0000ff00
> (XEN) run: [32767.8] pri=-64 flags=0 cpu=8
> (XEN) Cpupool 0:
> (XEN) Cpus: 0-5,10-15
> (XEN) Scheduler: SMP Credit Scheduler (credit)
> (XEN) info:
> (XEN) ncpus = 13
> (XEN) master = 0
> (XEN) credit = 3900
> (XEN) credit balance = 45
> (XEN) weight = 1280
> (XEN) runq_sort = 11820
> (XEN) default-weight = 256
> (XEN) tslice = 30ms
> (XEN) ratelimit = 1000us
> (XEN) credits per msec = 10
> (XEN) ticks per tslice = 3
> (XEN) migration delay = 0us
> (XEN) idlers: 00000000,00006d29
> (XEN) active vcpus:
> (XEN) 1: [1.7] pri=-1 flags=0 cpu=15 credit=-116 [w=256,cap=0] (84+300) {a/i=22/21 m=18+5 (k=0)}
> (XEN) 2: [1.3] pri=0 flags=0 cpu=1 credit=-113 [w=256,cap=0] (87+300) {a/i=37/36 m=11+544 (k=0)}
> (XEN) 3: [0.15] pri=-1 flags=0 cpu=4 credit=95 [w=256,cap=0] (210+300) {a/i=127/126 m=108+9 (k=0)}
> (XEN) 4: [0.10] pri=-2 flags=0 cpu=12 credit=-287 [w=256,cap=0] (-84+300) {a/i=163/162 m=36+568 (k=0)}
> (XEN) 5: [0.7] pri=-2 flags=0 cpu=2 credit=-242 [w=256,cap=0] (-42+300) {a/i=129/128 m=16+50 (k=0)}
> (XEN) CPU[00] sort=11801, sibling=00000000,00000003, core=00000000,000000ff
> (XEN) run: [32767.0] pri=-64 flags=0 cpu=0
> ... ... ...
> (XEN) CPU[15] sort=11820, sibling=00000000,0000c000, core=00000000,0000ff00
> (XEN) run: [1.7] pri=-1 flags=0 cpu=15 credit=-116 [w=256,cap=0] (84+300) {a/i=22/21 m=18+5 (k=0)}
> (XEN) 1: [32767.15] pri=-64 flags=0 cpu=15
> (XEN) Cpupool 1:
> (XEN) Cpus: 6-7,9
> (XEN) Scheduler: SMP RTDS Scheduler (rtds)
> (XEN) CPU[06]
> (XEN) CPU[07]
> (XEN) CPU[09]
>
> With this change, we get rid of the redundancy, and retain
> only the information about the free pCPUs.
>
> (While there, turn a loop index variable from `int' to
> `unsigned int' in schedule_dump().)
>
> Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
Acked-by: Juergen Gross <jgross@suse.com>
> ---
> Cc: Juergen Gross <jgross@suse.com>
> Cc: George Dunlap <george.dunlap@eu.citrix.com>
> ---
> xen/common/cpupool.c | 6 +++---
> xen/common/schedule.c | 18 +++++++++++++-----
> 2 files changed, 16 insertions(+), 8 deletions(-)
>
> diff --git a/xen/common/cpupool.c b/xen/common/cpupool.c
> index 563864d..5471f93 100644
> --- a/xen/common/cpupool.c
> +++ b/xen/common/cpupool.c
> @@ -728,10 +728,10 @@ void dump_runq(unsigned char key)
>
> print_cpumap("Online Cpus", &cpu_online_map);
> if ( !cpumask_empty(&cpupool_free_cpus) )
> + {
> print_cpumap("Free Cpus", &cpupool_free_cpus);
> -
> - printk("Idle cpupool:\n");
> - schedule_dump(NULL);
> + schedule_dump(NULL);
> + }
>
> for_each_cpupool(c)
> {
> diff --git a/xen/common/schedule.c b/xen/common/schedule.c
> index ecf1545..4ffcd98 100644
> --- a/xen/common/schedule.c
> +++ b/xen/common/schedule.c
> @@ -1473,16 +1473,24 @@ void scheduler_free(struct scheduler *sched)
>
> void schedule_dump(struct cpupool *c)
> {
> - int i;
> + unsigned int i;
> struct scheduler *sched;
> cpumask_t *cpus;
>
> /* Locking, if necessary, must be handled withing each scheduler */
>
> - sched = (c == NULL) ? &ops : c->sched;
> - cpus = cpupool_scheduler_cpumask(c);
> - printk("Scheduler: %s (%s)\n", sched->name, sched->opt_name);
> - SCHED_OP(sched, dump_settings);
> + if ( c != NULL )
> + {
> + sched = c->sched;
> + cpus = c->cpu_valid;
> + printk("Scheduler: %s (%s)\n", sched->name, sched->opt_name);
> + SCHED_OP(sched, dump_settings);
> + }
> + else
> + {
> + sched = &ops;
> + cpus = &cpupool_free_cpus;
> + }
>
> for_each_cpu (i, cpus)
> {
>
>
next prev parent reply other threads:[~2015-06-26 13:43 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-25 12:15 [PATCH 0/4] xen: sched / cpupool: fixes and improvements, mostly for when suspend/resume is involved Dario Faggioli
2015-06-25 12:15 ` [PATCH 1/4] xen: sched: avoid dumping duplicate information Dario Faggioli
2015-06-26 13:43 ` Juergen Gross [this message]
2015-07-02 11:18 ` George Dunlap
2015-06-25 12:15 ` [PATCH 2/4] xen: x86 / cpupool: clear the proper cpu_valid bit on pCPU teardown Dario Faggioli
2015-06-25 14:20 ` Andrew Cooper
2015-06-25 15:04 ` Dario Faggioli
2015-06-25 15:52 ` Andrew Cooper
2015-06-25 16:13 ` Dario Faggioli
2015-06-25 16:39 ` Andrew Cooper
2015-06-26 13:54 ` Juergen Gross
2015-06-25 12:15 ` [PATCH 3/4] xen: credit1: properly deal with pCPUs not in any cpupool Dario Faggioli
2015-06-26 14:05 ` Juergen Gross
2015-07-02 15:24 ` George Dunlap
2015-07-02 16:01 ` Dario Faggioli
2015-07-02 16:14 ` George Dunlap
2015-06-25 12:15 ` [PATCH 4/4] xen: sched: get rid of cpupool_scheduler_cpumask() Dario Faggioli
2015-06-26 14:08 ` Juergen Gross
2015-06-26 14:57 ` Joshua Whitehead
2015-06-27 19:21 ` Meng Xu
2015-07-02 15:39 ` George Dunlap
2015-07-03 7:48 ` 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=558D56FC.3050204@suse.com \
--to=jgross@suse.com \
--cc=dario.faggioli@citrix.com \
--cc=george.dunlap@eu.citrix.com \
--cc=xen-devel@lists.xenproject.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 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.