* [PATCH v2 0/4] xen: sched: rework and add performance counters
@ 2015-02-27 16:50 Dario Faggioli
2015-02-27 16:50 ` [PATCH v2 1/4] xen: sched: honour generic perf conuters in the RTDS scheduler Dario Faggioli
` (4 more replies)
0 siblings, 5 replies; 13+ messages in thread
From: Dario Faggioli @ 2015-02-27 16:50 UTC (permalink / raw)
To: Xen-devel; +Cc: George Dunlap, Keir Fraser, Meng Xu, Jan Beulich
Take 2 of this:
http://lists.xen.org/archives/html/xen-devel/2015-02/msg03249.html
I've made all the changes suggested during v1.
The series has Meng's Reviewed-by for the changes to sched_rt.c, and Jan's Ack
for the non-strictly scheduling related part (1 file! :-D), so I think what is
missing is George's view/Ack.
Thanks and Regards,
Dario
---
Dario Faggioli (4):
xen: sched: honour generic perf conuters in the RTDS scheduler
xen: sched: make counters for vCPU sleep and wakeup generic
xen: sched: make counters for vCPU tickling generic
xen: credit2: add a few performance counters
xen/common/sched_credit2.c | 39 +++++++++++++++++++++++++++++++++++----
xen/common/sched_rt.c | 18 ++++++++++++++++++
xen/include/xen/perfc_defn.h | 29 +++++++++++++++++++++--------
3 files changed, 74 insertions(+), 12 deletions(-)
--
<<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)
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH v2 1/4] xen: sched: honour generic perf conuters in the RTDS scheduler
2015-02-27 16:50 [PATCH v2 0/4] xen: sched: rework and add performance counters Dario Faggioli
@ 2015-02-27 16:50 ` Dario Faggioli
2015-03-16 17:01 ` George Dunlap
2015-02-27 16:51 ` [PATCH v2 2/4] xen: sched: make counters for vCPU sleep and wakeup generic Dario Faggioli
` (3 subsequent siblings)
4 siblings, 1 reply; 13+ messages in thread
From: Dario Faggioli @ 2015-02-27 16:50 UTC (permalink / raw)
To: Xen-devel; +Cc: George Dunlap, Keir Fraser, Meng Xu, Meng Xu, Jan Beulich
more specifically, about vCPU initialization and destruction events,
in line with adb26c09f26e ("xen: sched: introduce a couple of counters
in credit2 and SEDF").
Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
Cc: George Dunlap <george.dunlap@eu.citrix.com>
Cc: Meng Xu <xumengpanda@gmail.com>
Cc: Jan Beulich <JBeulich@suse.com>
Cc: Keir Fraser <keir@xen.org>
Reviewed-by: Meng Xu <mengxu@cis.upenn.edu>
---
xen/common/sched_rt.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/xen/common/sched_rt.c b/xen/common/sched_rt.c
index df4adac..58dd646 100644
--- a/xen/common/sched_rt.c
+++ b/xen/common/sched_rt.c
@@ -525,6 +525,8 @@ rt_alloc_vdata(const struct scheduler *ops, struct vcpu *vc, void *dd)
if ( !is_idle_vcpu(vc) )
svc->budget = RTDS_DEFAULT_BUDGET;
+ SCHED_STAT_CRANK(vcpu_init);
+
return svc;
}
@@ -574,6 +576,8 @@ rt_vcpu_remove(const struct scheduler *ops, struct vcpu *vc)
struct rt_dom * const sdom = svc->sdom;
spinlock_t *lock;
+ SCHED_STAT_CRANK(vcpu_destroy);
+
BUG_ON( sdom == NULL );
lock = vcpu_schedule_lock_irq(vc);
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH v2 2/4] xen: sched: make counters for vCPU sleep and wakeup generic
2015-02-27 16:50 [PATCH v2 0/4] xen: sched: rework and add performance counters Dario Faggioli
2015-02-27 16:50 ` [PATCH v2 1/4] xen: sched: honour generic perf conuters in the RTDS scheduler Dario Faggioli
@ 2015-02-27 16:51 ` Dario Faggioli
2015-03-16 17:18 ` George Dunlap
2015-02-27 16:51 ` [PATCH v2 3/4] xen: sched: make counters for vCPU tickling generic Dario Faggioli
` (2 subsequent siblings)
4 siblings, 1 reply; 13+ messages in thread
From: Dario Faggioli @ 2015-02-27 16:51 UTC (permalink / raw)
To: Xen-devel; +Cc: George Dunlap, Keir Fraser, Meng Xu, Jan Beulich
and update them from Credit2 and RTDS. In Credit2, while there,
remove some stale comments too.
Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
Cc: George Dunlap <george.dunlap@eu.citrix.com>
Cc: Meng Xu <mengxu@cis.upenn.edu>
Cc: Jan Beulich <JBeulich@suse.com>
Cc: Keir Fraser <keir@xen.org>
Reviewed-by: Meng Xu <mengxu@cis.upenn.edu>
Acked-by: Jan Beulich <jbeulich@suse.com>
---
xen/common/sched_credit2.c | 12 ++++++++----
xen/common/sched_rt.c | 12 ++++++++++++
xen/include/xen/perfc_defn.h | 10 +++++-----
3 files changed, 25 insertions(+), 9 deletions(-)
diff --git a/xen/common/sched_credit2.c b/xen/common/sched_credit2.c
index ad0a5d4..2b852cc 100644
--- a/xen/common/sched_credit2.c
+++ b/xen/common/sched_credit2.c
@@ -931,6 +931,7 @@ csched2_vcpu_sleep(const struct scheduler *ops, struct vcpu *vc)
struct csched2_vcpu * const svc = CSCHED2_VCPU(vc);
BUG_ON( is_idle_vcpu(vc) );
+ SCHED_STAT_CRANK(vcpu_sleep);
if ( per_cpu(schedule_data, vc->processor).curr == vc )
cpu_raise_softirq(vc->processor, SCHEDULE_SOFTIRQ);
@@ -956,19 +957,22 @@ csched2_vcpu_wake(const struct scheduler *ops, struct vcpu *vc)
BUG_ON( is_idle_vcpu(vc) );
- /* Make sure svc priority mod happens before runq check */
if ( unlikely(per_cpu(schedule_data, vc->processor).curr == vc) )
{
+ SCHED_STAT_CRANK(vcpu_wake_running);
goto out;
}
-
if ( unlikely(__vcpu_on_runq(svc)) )
{
- /* If we've boosted someone that's already on a runqueue, prioritize
- * it and inform the cpu in question. */
+ SCHED_STAT_CRANK(vcpu_wake_onrunq);
goto out;
}
+ if ( likely(vcpu_runnable(vc)) )
+ SCHED_STAT_CRANK(vcpu_wake_runnable);
+ else
+ SCHED_STAT_CRANK(vcpu_wake_not_runnable);
+
/* If the context hasn't been saved for this vcpu yet, we can't put it on
* another runqueue. Instead, we set a flag so that it will be put on the runqueue
* after the context has been saved. */
diff --git a/xen/common/sched_rt.c b/xen/common/sched_rt.c
index 58dd646..49d1b83 100644
--- a/xen/common/sched_rt.c
+++ b/xen/common/sched_rt.c
@@ -851,6 +851,7 @@ rt_vcpu_sleep(const struct scheduler *ops, struct vcpu *vc)
struct rt_vcpu * const svc = rt_vcpu(vc);
BUG_ON( is_idle_vcpu(vc) );
+ SCHED_STAT_CRANK(vcpu_sleep);
if ( curr_on_cpu(vc->processor) == vc )
cpu_raise_softirq(vc->processor, SCHEDULE_SOFTIRQ);
@@ -966,11 +967,22 @@ rt_vcpu_wake(const struct scheduler *ops, struct vcpu *vc)
BUG_ON( is_idle_vcpu(vc) );
if ( unlikely(curr_on_cpu(vc->processor) == vc) )
+ {
+ SCHED_STAT_CRANK(vcpu_wake_running);
return;
+ }
/* on RunQ/DepletedQ, just update info is ok */
if ( unlikely(__vcpu_on_q(svc)) )
+ {
+ SCHED_STAT_CRANK(vcpu_wake_onrunq);
return;
+ }
+
+ if ( likely(vcpu_runnable(vc)) )
+ SCHED_STAT_CRANK(vcpu_wake_runnable);
+ else
+ SCHED_STAT_CRANK(vcpu_wake_not_runnable);
/* If context hasn't been saved for this vcpu yet, we can't put it on
* the Runqueue/DepletedQ. Instead, we set a flag so that it will be
diff --git a/xen/include/xen/perfc_defn.h b/xen/include/xen/perfc_defn.h
index 3ac7b45..2dc78fe 100644
--- a/xen/include/xen/perfc_defn.h
+++ b/xen/include/xen/perfc_defn.h
@@ -21,6 +21,11 @@ PERFCOUNTER(dom_init, "sched: dom_init")
PERFCOUNTER(dom_destroy, "sched: dom_destroy")
PERFCOUNTER(vcpu_init, "sched: vcpu_init")
PERFCOUNTER(vcpu_destroy, "sched: vcpu_destroy")
+PERFCOUNTER(vcpu_sleep, "sched: vcpu_sleep")
+PERFCOUNTER(vcpu_wake_running, "sched: vcpu_wake_running")
+PERFCOUNTER(vcpu_wake_onrunq, "sched: vcpu_wake_onrunq")
+PERFCOUNTER(vcpu_wake_runnable, "sched: vcpu_wake_runnable")
+PERFCOUNTER(vcpu_wake_not_runnable, "sched: vcpu_wake_not_runnable")
/* credit specific counters */
PERFCOUNTER(delay_ms, "csched: delay")
@@ -32,11 +37,6 @@ PERFCOUNTER(acct_reorder, "csched: acct_reorder")
PERFCOUNTER(acct_min_credit, "csched: acct_min_credit")
PERFCOUNTER(acct_vcpu_active, "csched: acct_vcpu_active")
PERFCOUNTER(acct_vcpu_idle, "csched: acct_vcpu_idle")
-PERFCOUNTER(vcpu_sleep, "csched: vcpu_sleep")
-PERFCOUNTER(vcpu_wake_running, "csched: vcpu_wake_running")
-PERFCOUNTER(vcpu_wake_onrunq, "csched: vcpu_wake_onrunq")
-PERFCOUNTER(vcpu_wake_runnable, "csched: vcpu_wake_runnable")
-PERFCOUNTER(vcpu_wake_not_runnable, "csched: vcpu_wake_not_runnable")
PERFCOUNTER(vcpu_park, "csched: vcpu_park")
PERFCOUNTER(vcpu_unpark, "csched: vcpu_unpark")
PERFCOUNTER(tickle_idlers_none, "csched: tickle_idlers_none")
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH v2 3/4] xen: sched: make counters for vCPU tickling generic
2015-02-27 16:50 [PATCH v2 0/4] xen: sched: rework and add performance counters Dario Faggioli
2015-02-27 16:50 ` [PATCH v2 1/4] xen: sched: honour generic perf conuters in the RTDS scheduler Dario Faggioli
2015-02-27 16:51 ` [PATCH v2 2/4] xen: sched: make counters for vCPU sleep and wakeup generic Dario Faggioli
@ 2015-02-27 16:51 ` Dario Faggioli
2015-03-16 17:19 ` George Dunlap
2015-02-27 16:51 ` [PATCH v2 4/4] xen: credit2: add a few performance counters Dario Faggioli
2015-03-12 12:51 ` [PATCH v2 0/4] xen: sched: rework and add " Dario Faggioli
4 siblings, 1 reply; 13+ messages in thread
From: Dario Faggioli @ 2015-02-27 16:51 UTC (permalink / raw)
To: Xen-devel; +Cc: George Dunlap, Meng Xu, Keir Fraser, Meng Xu, Jan Beulich
and update them from Credit2 and RTDS schedulers.
Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
Cc: Meng Xu <xumengpanda@gmail.com>
Cc: George Dunlap <george.dunlap@eu.citrix.com>
Cc: Jan Beulich <JBeulich@suse.com>
Cc: Keir Fraser <keir@xen.org>
Reviewed-by: Meng Xu <mengxu@cis.upenn.edu>
Acked-by: Jan Beulich <jbeulich@suse.com>
---
Changes from v1:
* fixed the 'no_tickle' case, in Credit2, as requested
during review
---
xen/common/sched_credit2.c | 4 ++++
xen/common/sched_rt.c | 2 ++
xen/include/xen/perfc_defn.h | 4 ++--
3 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/xen/common/sched_credit2.c b/xen/common/sched_credit2.c
index 2b852cc..c0f7452 100644
--- a/xen/common/sched_credit2.c
+++ b/xen/common/sched_credit2.c
@@ -556,7 +556,10 @@ runq_tickle(const struct scheduler *ops, unsigned int cpu, struct csched2_vcpu *
/* Only switch to another processor if the credit difference is greater
* than the migrate resistance */
if ( ipid == -1 || lowest + CSCHED2_MIGRATE_RESIST > new->credit )
+ {
+ SCHED_STAT_CRANK(tickle_idlers_none);
goto no_tickle;
+ }
tickle:
BUG_ON(ipid == -1);
@@ -571,6 +574,7 @@ tickle:
(unsigned char *)&d);
}
cpumask_set_cpu(ipid, &rqd->tickled);
+ SCHED_STAT_CRANK(tickle_idlers_some);
cpu_raise_softirq(ipid, SCHEDULE_SOFTIRQ);
no_tickle:
diff --git a/xen/common/sched_rt.c b/xen/common/sched_rt.c
index 49d1b83..2ad0c68 100644
--- a/xen/common/sched_rt.c
+++ b/xen/common/sched_rt.c
@@ -929,6 +929,7 @@ runq_tickle(const struct scheduler *ops, struct rt_vcpu *new)
}
/* didn't tickle any cpu */
+ SCHED_STAT_CRANK(tickle_idlers_none);
return;
out:
/* TRACE */
@@ -944,6 +945,7 @@ out:
}
cpumask_set_cpu(cpu_to_tickle, &prv->tickled);
+ SCHED_STAT_CRANK(tickle_idlers_some);
cpu_raise_softirq(cpu_to_tickle, SCHEDULE_SOFTIRQ);
return;
}
diff --git a/xen/include/xen/perfc_defn.h b/xen/include/xen/perfc_defn.h
index 2dc78fe..f754331 100644
--- a/xen/include/xen/perfc_defn.h
+++ b/xen/include/xen/perfc_defn.h
@@ -26,6 +26,8 @@ PERFCOUNTER(vcpu_wake_running, "sched: vcpu_wake_running")
PERFCOUNTER(vcpu_wake_onrunq, "sched: vcpu_wake_onrunq")
PERFCOUNTER(vcpu_wake_runnable, "sched: vcpu_wake_runnable")
PERFCOUNTER(vcpu_wake_not_runnable, "sched: vcpu_wake_not_runnable")
+PERFCOUNTER(tickle_idlers_none, "sched: tickle_idlers_none")
+PERFCOUNTER(tickle_idlers_some, "sched: tickle_idlers_some")
/* credit specific counters */
PERFCOUNTER(delay_ms, "csched: delay")
@@ -39,8 +41,6 @@ PERFCOUNTER(acct_vcpu_active, "csched: acct_vcpu_active")
PERFCOUNTER(acct_vcpu_idle, "csched: acct_vcpu_idle")
PERFCOUNTER(vcpu_park, "csched: vcpu_park")
PERFCOUNTER(vcpu_unpark, "csched: vcpu_unpark")
-PERFCOUNTER(tickle_idlers_none, "csched: tickle_idlers_none")
-PERFCOUNTER(tickle_idlers_some, "csched: tickle_idlers_some")
PERFCOUNTER(load_balance_idle, "csched: load_balance_idle")
PERFCOUNTER(load_balance_over, "csched: load_balance_over")
PERFCOUNTER(load_balance_other, "csched: load_balance_other")
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH v2 4/4] xen: credit2: add a few performance counters
2015-02-27 16:50 [PATCH v2 0/4] xen: sched: rework and add performance counters Dario Faggioli
` (2 preceding siblings ...)
2015-02-27 16:51 ` [PATCH v2 3/4] xen: sched: make counters for vCPU tickling generic Dario Faggioli
@ 2015-02-27 16:51 ` Dario Faggioli
2015-03-16 17:30 ` George Dunlap
2015-03-12 12:51 ` [PATCH v2 0/4] xen: sched: rework and add " Dario Faggioli
4 siblings, 1 reply; 13+ messages in thread
From: Dario Faggioli @ 2015-02-27 16:51 UTC (permalink / raw)
To: Xen-devel; +Cc: George Dunlap, Keir Fraser, Jan Beulich
for events that are specific to Credit2 (as it happens
for Credit1 already).
Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
Cc: George Dunlap <george.dunlap@eu.citrix.com>
Cc: Jan Beulich <JBeulich@suse.com>
Cc: Keir Fraser <keir@xen.org>
Acked-by: Jan Beulich <jbeulich@suse.com>
---
Changes from v1:
* fixed the repeated typo in perfc_defn.h, as requested
during review.
---
xen/common/sched_credit2.c | 23 +++++++++++++++++++++++
xen/include/xen/perfc_defn.h | 15 ++++++++++++++-
2 files changed, 37 insertions(+), 1 deletion(-)
diff --git a/xen/common/sched_credit2.c b/xen/common/sched_credit2.c
index c0f7452..bf0d651 100644
--- a/xen/common/sched_credit2.c
+++ b/xen/common/sched_credit2.c
@@ -654,6 +654,8 @@ static void reset_credit(const struct scheduler *ops, int cpu, s_time_t now,
}
}
+ SCHED_STAT_CRANK(credit_reset);
+
/* No need to resort runqueue, as everyone's order should be the same. */
}
@@ -673,6 +675,7 @@ void burn_credits(struct csched2_runqueue_data *rqd, struct csched2_vcpu *svc, s
delta = now - svc->start_time;
if ( delta > 0 ) {
+ SCHED_STAT_CRANK(burn_credits_t2c);
t2c_update(rqd, delta, svc);
svc->start_time = now;
@@ -713,6 +716,7 @@ static void update_max_weight(struct csched2_runqueue_data *rqd, int new_weight,
{
rqd->max_weight = new_weight;
d2printk("%s: Runqueue id %d max weight %d\n", __func__, rqd->id, rqd->max_weight);
+ SCHED_STAT_CRANK(upd_max_weight_quick);
}
else if ( old_weight == rqd->max_weight )
{
@@ -729,6 +733,7 @@ static void update_max_weight(struct csched2_runqueue_data *rqd, int new_weight,
rqd->max_weight = max_weight;
d2printk("%s: Runqueue %d max weight %d\n", __func__, rqd->id, rqd->max_weight);
+ SCHED_STAT_CRANK(upd_max_weight_full);
}
}
@@ -750,6 +755,7 @@ __csched2_vcpu_check(struct vcpu *vc)
{
BUG_ON( !is_idle_vcpu(vc) );
}
+ SCHED_STAT_CRANK(vcpu_check);
}
#define CSCHED2_VCPU_CHECK(_vc) (__csched2_vcpu_check(_vc))
#else
@@ -1203,6 +1209,7 @@ static void migrate(const struct scheduler *ops,
svc->migrate_rqd = trqd;
set_bit(_VPF_migrating, &svc->vcpu->pause_flags);
set_bit(__CSFLAG_runq_migrate_request, &svc->flags);
+ SCHED_STAT_CRANK(migrate_requested);
}
else
{
@@ -1223,7 +1230,10 @@ static void migrate(const struct scheduler *ops,
update_load(ops, svc->rqd, svc, 1, now);
runq_insert(ops, svc->vcpu->processor, svc);
runq_tickle(ops, svc->vcpu->processor, svc, now);
+ SCHED_STAT_CRANK(migrate_on_runq);
}
+ else
+ SCHED_STAT_CRANK(migrate_no_runq);
}
}
@@ -1577,7 +1587,10 @@ csched2_runtime(const struct scheduler *ops, int cpu, struct csched2_vcpu *snext
/* The next guy may actually have a higher credit, if we've tried to
* avoid migrating him from a different cpu. DTRT. */
if ( rt_credit <= 0 )
+ {
time = CSCHED2_MIN_TIMER;
+ SCHED_STAT_CRANK(runtime_min_timer);
+ }
else
{
/* FIXME: See if we can eliminate this conversion if we know time
@@ -1588,9 +1601,15 @@ csched2_runtime(const struct scheduler *ops, int cpu, struct csched2_vcpu *snext
/* Check limits */
if ( time < CSCHED2_MIN_TIMER )
+ {
time = CSCHED2_MIN_TIMER;
+ SCHED_STAT_CRANK(runtime_min_timer);
+ }
else if ( time > CSCHED2_MAX_TIMER )
+ {
time = CSCHED2_MAX_TIMER;
+ SCHED_STAT_CRANK(runtime_max_timer);
+ }
}
return time;
@@ -1623,7 +1642,10 @@ runq_candidate(struct csched2_runqueue_data *rqd,
* its credit is at least CSCHED2_MIGRATE_RESIST higher. */
if ( svc->vcpu->processor != cpu
&& snext->credit + CSCHED2_MIGRATE_RESIST > svc->credit )
+ {
+ SCHED_STAT_CRANK(migrate_resisted);
continue;
+ }
/* If the next one on the list has more credit than current
* (or idle, if current is not runnable), choose it. */
@@ -1768,6 +1790,7 @@ csched2_schedule(
{
snext->credit += CSCHED2_MIGRATE_COMPENSATION;
snext->vcpu->processor = cpu;
+ SCHED_STAT_CRANK(migrated);
ret.migrated = 1;
}
}
diff --git a/xen/include/xen/perfc_defn.h b/xen/include/xen/perfc_defn.h
index f754331..526002d 100644
--- a/xen/include/xen/perfc_defn.h
+++ b/xen/include/xen/perfc_defn.h
@@ -28,10 +28,10 @@ PERFCOUNTER(vcpu_wake_runnable, "sched: vcpu_wake_runnable")
PERFCOUNTER(vcpu_wake_not_runnable, "sched: vcpu_wake_not_runnable")
PERFCOUNTER(tickle_idlers_none, "sched: tickle_idlers_none")
PERFCOUNTER(tickle_idlers_some, "sched: tickle_idlers_some")
+PERFCOUNTER(vcpu_check, "sched: vcpu_check")
/* credit specific counters */
PERFCOUNTER(delay_ms, "csched: delay")
-PERFCOUNTER(vcpu_check, "csched: vcpu_check")
PERFCOUNTER(acct_run, "csched: acct_run")
PERFCOUNTER(acct_no_work, "csched: acct_no_work")
PERFCOUNTER(acct_balance, "csched: acct_balance")
@@ -51,6 +51,19 @@ PERFCOUNTER(migrate_running, "csched: migrate_running")
PERFCOUNTER(migrate_kicked_away, "csched: migrate_kicked_away")
PERFCOUNTER(vcpu_hot, "csched: vcpu_hot")
+/* credit2 specific counters */
+PERFCOUNTER(burn_credits_t2c, "csched2: burn_credits_t2c")
+PERFCOUNTER(upd_max_weight_quick, "csched2: update_max_weight_quick")
+PERFCOUNTER(upd_max_weight_full, "csched2: update_max_weight_full")
+PERFCOUNTER(migrate_requested, "csched2: migrate_requested")
+PERFCOUNTER(migrate_on_runq, "csched2: migrate_on_runq")
+PERFCOUNTER(migrate_no_runq, "csched2: migrate_no_runq")
+PERFCOUNTER(runtime_min_timer, "csched2: runtime_min_timer")
+PERFCOUNTER(runtime_max_timer, "csched2: runtime_max_timer")
+PERFCOUNTER(migrated, "csched2: migrated")
+PERFCOUNTER(migrate_resisted, "csched2: migrate_resisted")
+PERFCOUNTER(credit_reset, "csched2: credit_reset")
+
PERFCOUNTER(need_flush_tlb_flush, "PG_need_flush tlb flushes")
/*#endif*/ /* __XEN_PERFC_DEFN_H__ */
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH v2 0/4] xen: sched: rework and add performance counters
2015-02-27 16:50 [PATCH v2 0/4] xen: sched: rework and add performance counters Dario Faggioli
` (3 preceding siblings ...)
2015-02-27 16:51 ` [PATCH v2 4/4] xen: credit2: add a few performance counters Dario Faggioli
@ 2015-03-12 12:51 ` Dario Faggioli
2015-03-12 14:53 ` George Dunlap
4 siblings, 1 reply; 13+ messages in thread
From: Dario Faggioli @ 2015-03-12 12:51 UTC (permalink / raw)
To: George Dunlap; +Cc: Keir Fraser, Meng Xu, Jan Beulich, Xen-devel
[-- Attachment #1.1: Type: text/plain, Size: 561 bytes --]
On Fri, 2015-02-27 at 17:50 +0100, Dario Faggioli wrote:
> Take 2 of this:
>
> http://lists.xen.org/archives/html/xen-devel/2015-02/msg03249.html
>
> I've made all the changes suggested during v1.
>
> The series has Meng's Reviewed-by for the changes to sched_rt.c, and Jan's Ack
> for the non-strictly scheduling related part (1 file! :-D), so I think what is
> missing is George's view/Ack.
>
George, ping
No intention to push, of course... just a remainder in case this failed
to show up on your radar. :-D
Thanks and Regards,
Dario
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 0/4] xen: sched: rework and add performance counters
2015-03-12 12:51 ` [PATCH v2 0/4] xen: sched: rework and add " Dario Faggioli
@ 2015-03-12 14:53 ` George Dunlap
0 siblings, 0 replies; 13+ messages in thread
From: George Dunlap @ 2015-03-12 14:53 UTC (permalink / raw)
To: Dario Faggioli, George Dunlap
Cc: Keir Fraser, Meng Xu, Jan Beulich, Xen-devel
On 03/12/2015 12:51 PM, Dario Faggioli wrote:
> On Fri, 2015-02-27 at 17:50 +0100, Dario Faggioli wrote:
>> Take 2 of this:
>>
>> http://lists.xen.org/archives/html/xen-devel/2015-02/msg03249.html
>>
>> I've made all the changes suggested during v1.
>>
>> The series has Meng's Reviewed-by for the changes to sched_rt.c, and Jan's Ack
>> for the non-strictly scheduling related part (1 file! :-D), so I think what is
>> missing is George's view/Ack.
>>
> George, ping
>
> No intention to push, of course... just a remainder in case this failed
> to show up on your radar. :-D
Yep, it's on my radar... just trying to catch up on stuff... I should
have a chance to look at it next week, I think.
-George
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 1/4] xen: sched: honour generic perf conuters in the RTDS scheduler
2015-02-27 16:50 ` [PATCH v2 1/4] xen: sched: honour generic perf conuters in the RTDS scheduler Dario Faggioli
@ 2015-03-16 17:01 ` George Dunlap
0 siblings, 0 replies; 13+ messages in thread
From: George Dunlap @ 2015-03-16 17:01 UTC (permalink / raw)
To: Dario Faggioli, Xen-devel; +Cc: Keir Fraser, Meng Xu, Meng Xu, Jan Beulich
On 02/27/2015 04:50 PM, Dario Faggioli wrote:
> more specifically, about vCPU initialization and destruction events,
> in line with adb26c09f26e ("xen: sched: introduce a couple of counters
> in credit2 and SEDF").
>
> Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
> Cc: George Dunlap <george.dunlap@eu.citrix.com>
> Cc: Meng Xu <xumengpanda@gmail.com>
> Cc: Jan Beulich <JBeulich@suse.com>
> Cc: Keir Fraser <keir@xen.org>
> Reviewed-by: Meng Xu <mengxu@cis.upenn.edu>
Reviewed-by: George Dunlap <george.dunlap@eu.citrix.com>
> ---
> xen/common/sched_rt.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/xen/common/sched_rt.c b/xen/common/sched_rt.c
> index df4adac..58dd646 100644
> --- a/xen/common/sched_rt.c
> +++ b/xen/common/sched_rt.c
> @@ -525,6 +525,8 @@ rt_alloc_vdata(const struct scheduler *ops, struct vcpu *vc, void *dd)
> if ( !is_idle_vcpu(vc) )
> svc->budget = RTDS_DEFAULT_BUDGET;
>
> + SCHED_STAT_CRANK(vcpu_init);
> +
> return svc;
> }
>
> @@ -574,6 +576,8 @@ rt_vcpu_remove(const struct scheduler *ops, struct vcpu *vc)
> struct rt_dom * const sdom = svc->sdom;
> spinlock_t *lock;
>
> + SCHED_STAT_CRANK(vcpu_destroy);
> +
> BUG_ON( sdom == NULL );
>
> lock = vcpu_schedule_lock_irq(vc);
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 2/4] xen: sched: make counters for vCPU sleep and wakeup generic
2015-02-27 16:51 ` [PATCH v2 2/4] xen: sched: make counters for vCPU sleep and wakeup generic Dario Faggioli
@ 2015-03-16 17:18 ` George Dunlap
2015-03-17 10:48 ` Dario Faggioli
0 siblings, 1 reply; 13+ messages in thread
From: George Dunlap @ 2015-03-16 17:18 UTC (permalink / raw)
To: Dario Faggioli, Xen-devel; +Cc: Keir Fraser, Meng Xu, Jan Beulich
On 02/27/2015 04:51 PM, Dario Faggioli wrote:
> and update them from Credit2 and RTDS. In Credit2, while there,
> remove some stale comments too.
>
> Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
> Cc: George Dunlap <george.dunlap@eu.citrix.com>
> Cc: Meng Xu <mengxu@cis.upenn.edu>
> Cc: Jan Beulich <JBeulich@suse.com>
> Cc: Keir Fraser <keir@xen.org>
> Reviewed-by: Meng Xu <mengxu@cis.upenn.edu>
> Acked-by: Jan Beulich <jbeulich@suse.com>
One comment...
> ---
> xen/common/sched_credit2.c | 12 ++++++++----
> xen/common/sched_rt.c | 12 ++++++++++++
> xen/include/xen/perfc_defn.h | 10 +++++-----
> 3 files changed, 25 insertions(+), 9 deletions(-)
>
> diff --git a/xen/common/sched_credit2.c b/xen/common/sched_credit2.c
> index ad0a5d4..2b852cc 100644
> --- a/xen/common/sched_credit2.c
> +++ b/xen/common/sched_credit2.c
> @@ -931,6 +931,7 @@ csched2_vcpu_sleep(const struct scheduler *ops, struct vcpu *vc)
> struct csched2_vcpu * const svc = CSCHED2_VCPU(vc);
>
> BUG_ON( is_idle_vcpu(vc) );
> + SCHED_STAT_CRANK(vcpu_sleep);
>
> if ( per_cpu(schedule_data, vc->processor).curr == vc )
> cpu_raise_softirq(vc->processor, SCHEDULE_SOFTIRQ);
> @@ -956,19 +957,22 @@ csched2_vcpu_wake(const struct scheduler *ops, struct vcpu *vc)
>
> BUG_ON( is_idle_vcpu(vc) );
>
> - /* Make sure svc priority mod happens before runq check */
> if ( unlikely(per_cpu(schedule_data, vc->processor).curr == vc) )
> {
> + SCHED_STAT_CRANK(vcpu_wake_running);
> goto out;
> }
> -
> if ( unlikely(__vcpu_on_runq(svc)) )
Does this make the 'if' butt right up against the '{'? Is that bad?
Other than that:
Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
However, it doesn't apply cleanly at the moment, so you'll probably need
to send a refresh. (Sorry for taking so long!)
-George
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 3/4] xen: sched: make counters for vCPU tickling generic
2015-02-27 16:51 ` [PATCH v2 3/4] xen: sched: make counters for vCPU tickling generic Dario Faggioli
@ 2015-03-16 17:19 ` George Dunlap
0 siblings, 0 replies; 13+ messages in thread
From: George Dunlap @ 2015-03-16 17:19 UTC (permalink / raw)
To: Dario Faggioli, Xen-devel; +Cc: Meng Xu, Keir Fraser, Meng Xu, Jan Beulich
On 02/27/2015 04:51 PM, Dario Faggioli wrote:
> and update them from Credit2 and RTDS schedulers.
>
> Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
> Cc: Meng Xu <xumengpanda@gmail.com>
> Cc: George Dunlap <george.dunlap@eu.citrix.com>
> Cc: Jan Beulich <JBeulich@suse.com>
> Cc: Keir Fraser <keir@xen.org>
> Reviewed-by: Meng Xu <mengxu@cis.upenn.edu>
> Acked-by: Jan Beulich <jbeulich@suse.com>
Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
> ---
> Changes from v1:
> * fixed the 'no_tickle' case, in Credit2, as requested
> during review
> ---
> xen/common/sched_credit2.c | 4 ++++
> xen/common/sched_rt.c | 2 ++
> xen/include/xen/perfc_defn.h | 4 ++--
> 3 files changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/xen/common/sched_credit2.c b/xen/common/sched_credit2.c
> index 2b852cc..c0f7452 100644
> --- a/xen/common/sched_credit2.c
> +++ b/xen/common/sched_credit2.c
> @@ -556,7 +556,10 @@ runq_tickle(const struct scheduler *ops, unsigned int cpu, struct csched2_vcpu *
> /* Only switch to another processor if the credit difference is greater
> * than the migrate resistance */
> if ( ipid == -1 || lowest + CSCHED2_MIGRATE_RESIST > new->credit )
> + {
> + SCHED_STAT_CRANK(tickle_idlers_none);
> goto no_tickle;
> + }
>
> tickle:
> BUG_ON(ipid == -1);
> @@ -571,6 +574,7 @@ tickle:
> (unsigned char *)&d);
> }
> cpumask_set_cpu(ipid, &rqd->tickled);
> + SCHED_STAT_CRANK(tickle_idlers_some);
> cpu_raise_softirq(ipid, SCHEDULE_SOFTIRQ);
>
> no_tickle:
> diff --git a/xen/common/sched_rt.c b/xen/common/sched_rt.c
> index 49d1b83..2ad0c68 100644
> --- a/xen/common/sched_rt.c
> +++ b/xen/common/sched_rt.c
> @@ -929,6 +929,7 @@ runq_tickle(const struct scheduler *ops, struct rt_vcpu *new)
> }
>
> /* didn't tickle any cpu */
> + SCHED_STAT_CRANK(tickle_idlers_none);
> return;
> out:
> /* TRACE */
> @@ -944,6 +945,7 @@ out:
> }
>
> cpumask_set_cpu(cpu_to_tickle, &prv->tickled);
> + SCHED_STAT_CRANK(tickle_idlers_some);
> cpu_raise_softirq(cpu_to_tickle, SCHEDULE_SOFTIRQ);
> return;
> }
> diff --git a/xen/include/xen/perfc_defn.h b/xen/include/xen/perfc_defn.h
> index 2dc78fe..f754331 100644
> --- a/xen/include/xen/perfc_defn.h
> +++ b/xen/include/xen/perfc_defn.h
> @@ -26,6 +26,8 @@ PERFCOUNTER(vcpu_wake_running, "sched: vcpu_wake_running")
> PERFCOUNTER(vcpu_wake_onrunq, "sched: vcpu_wake_onrunq")
> PERFCOUNTER(vcpu_wake_runnable, "sched: vcpu_wake_runnable")
> PERFCOUNTER(vcpu_wake_not_runnable, "sched: vcpu_wake_not_runnable")
> +PERFCOUNTER(tickle_idlers_none, "sched: tickle_idlers_none")
> +PERFCOUNTER(tickle_idlers_some, "sched: tickle_idlers_some")
>
> /* credit specific counters */
> PERFCOUNTER(delay_ms, "csched: delay")
> @@ -39,8 +41,6 @@ PERFCOUNTER(acct_vcpu_active, "csched: acct_vcpu_active")
> PERFCOUNTER(acct_vcpu_idle, "csched: acct_vcpu_idle")
> PERFCOUNTER(vcpu_park, "csched: vcpu_park")
> PERFCOUNTER(vcpu_unpark, "csched: vcpu_unpark")
> -PERFCOUNTER(tickle_idlers_none, "csched: tickle_idlers_none")
> -PERFCOUNTER(tickle_idlers_some, "csched: tickle_idlers_some")
> PERFCOUNTER(load_balance_idle, "csched: load_balance_idle")
> PERFCOUNTER(load_balance_over, "csched: load_balance_over")
> PERFCOUNTER(load_balance_other, "csched: load_balance_other")
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 4/4] xen: credit2: add a few performance counters
2015-02-27 16:51 ` [PATCH v2 4/4] xen: credit2: add a few performance counters Dario Faggioli
@ 2015-03-16 17:30 ` George Dunlap
0 siblings, 0 replies; 13+ messages in thread
From: George Dunlap @ 2015-03-16 17:30 UTC (permalink / raw)
To: Dario Faggioli, Xen-devel; +Cc: Keir Fraser, Jan Beulich
On 02/27/2015 04:51 PM, Dario Faggioli wrote:
> for events that are specific to Credit2 (as it happens
> for Credit1 already).
>
> Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
> Cc: George Dunlap <george.dunlap@eu.citrix.com>
> Cc: Jan Beulich <JBeulich@suse.com>
> Cc: Keir Fraser <keir@xen.org>
> Acked-by: Jan Beulich <jbeulich@suse.com>
> ---
> Changes from v1:
> * fixed the repeated typo in perfc_defn.h, as requested
> during review.
> ---
> xen/common/sched_credit2.c | 23 +++++++++++++++++++++++
> xen/include/xen/perfc_defn.h | 15 ++++++++++++++-
> 2 files changed, 37 insertions(+), 1 deletion(-)
>
> diff --git a/xen/common/sched_credit2.c b/xen/common/sched_credit2.c
> index c0f7452..bf0d651 100644
> --- a/xen/common/sched_credit2.c
> +++ b/xen/common/sched_credit2.c
> @@ -654,6 +654,8 @@ static void reset_credit(const struct scheduler *ops, int cpu, s_time_t now,
> }
> }
>
> + SCHED_STAT_CRANK(credit_reset);
> +
Is this one actually useful? Anyway, it's the only one I could find
that I had that question for, so not a big deal to leave it in. :-)
One more minor thing:
> diff --git a/xen/include/xen/perfc_defn.h b/xen/include/xen/perfc_defn.h
> index f754331..526002d 100644
> --- a/xen/include/xen/perfc_defn.h
> +++ b/xen/include/xen/perfc_defn.h
> @@ -28,10 +28,10 @@ PERFCOUNTER(vcpu_wake_runnable, "sched: vcpu_wake_runnable")
> PERFCOUNTER(vcpu_wake_not_runnable, "sched: vcpu_wake_not_runnable")
> PERFCOUNTER(tickle_idlers_none, "sched: tickle_idlers_none")
> PERFCOUNTER(tickle_idlers_some, "sched: tickle_idlers_some")
> +PERFCOUNTER(vcpu_check, "sched: vcpu_check")
>
> /* credit specific counters */
> PERFCOUNTER(delay_ms, "csched: delay")
> -PERFCOUNTER(vcpu_check, "csched: vcpu_check")
You forgot to mention making this one generic in your patch description.
But that's probably not worth a re-spin either. :-)
Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
-George
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 2/4] xen: sched: make counters for vCPU sleep and wakeup generic
2015-03-16 17:18 ` George Dunlap
@ 2015-03-17 10:48 ` Dario Faggioli
2015-03-17 11:12 ` George Dunlap
0 siblings, 1 reply; 13+ messages in thread
From: Dario Faggioli @ 2015-03-17 10:48 UTC (permalink / raw)
To: George Dunlap; +Cc: Keir (Xen.org), mengxu, JBeulich, xen-devel
[-- Attachment #1.1: Type: text/plain, Size: 1836 bytes --]
On Mon, 2015-03-16 at 17:18 +0000, George Dunlap wrote:
> On 02/27/2015 04:51 PM, Dario Faggioli wrote:
> > diff --git a/xen/common/sched_credit2.c b/xen/common/sched_credit2.c
> > index ad0a5d4..2b852cc 100644
> > --- a/xen/common/sched_credit2.c
> > +++ b/xen/common/sched_credit2.c
> > @@ -931,6 +931,7 @@ csched2_vcpu_sleep(const struct scheduler *ops, struct vcpu *vc)
> > struct csched2_vcpu * const svc = CSCHED2_VCPU(vc);
> >
> > BUG_ON( is_idle_vcpu(vc) );
> > + SCHED_STAT_CRANK(vcpu_sleep);
> >
> > if ( per_cpu(schedule_data, vc->processor).curr == vc )
> > cpu_raise_softirq(vc->processor, SCHEDULE_SOFTIRQ);
> > @@ -956,19 +957,22 @@ csched2_vcpu_wake(const struct scheduler *ops, struct vcpu *vc)
> >
> > BUG_ON( is_idle_vcpu(vc) );
> >
> > - /* Make sure svc priority mod happens before runq check */
> > if ( unlikely(per_cpu(schedule_data, vc->processor).curr == vc) )
> > {
> > + SCHED_STAT_CRANK(vcpu_wake_running);
> > goto out;
> > }
> > -
> > if ( unlikely(__vcpu_on_runq(svc)) )
>
> Does this make the 'if' butt right up against the '{'? Is that bad?
>
> Other than that:
>
> Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
>
As far as I can see, the series is in:
http://xenbits.xen.org/gitweb/?p=xen.git;a=commit;h=8b0e94da0e23221a6d7ea19bfbd24a407db44de8
and whoever committed it (Jan, probably?), took care of leaving that
blank line in place, which I'm fine with, of course. :-)
> However, it doesn't apply cleanly at the moment, so you'll probably need
> to send a refresh. (Sorry for taking so long!)
>
NP, and thanks for reviewing. I was prepared to refresh and resend, but
as I said, it's been checked-in already, so thanks for that! :-D
Regards,
Dario
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 2/4] xen: sched: make counters for vCPU sleep and wakeup generic
2015-03-17 10:48 ` Dario Faggioli
@ 2015-03-17 11:12 ` George Dunlap
0 siblings, 0 replies; 13+ messages in thread
From: George Dunlap @ 2015-03-17 11:12 UTC (permalink / raw)
To: Dario Faggioli, George Dunlap; +Cc: Keir (Xen.org), mengxu, JBeulich, xen-devel
On 03/17/2015 10:48 AM, Dario Faggioli wrote:
> On Mon, 2015-03-16 at 17:18 +0000, George Dunlap wrote:
>> On 02/27/2015 04:51 PM, Dario Faggioli wrote:
>
>
>>> diff --git a/xen/common/sched_credit2.c b/xen/common/sched_credit2.c
>>> index ad0a5d4..2b852cc 100644
>>> --- a/xen/common/sched_credit2.c
>>> +++ b/xen/common/sched_credit2.c
>>> @@ -931,6 +931,7 @@ csched2_vcpu_sleep(const struct scheduler *ops, struct vcpu *vc)
>>> struct csched2_vcpu * const svc = CSCHED2_VCPU(vc);
>>>
>>> BUG_ON( is_idle_vcpu(vc) );
>>> + SCHED_STAT_CRANK(vcpu_sleep);
>>>
>>> if ( per_cpu(schedule_data, vc->processor).curr == vc )
>>> cpu_raise_softirq(vc->processor, SCHEDULE_SOFTIRQ);
>>> @@ -956,19 +957,22 @@ csched2_vcpu_wake(const struct scheduler *ops, struct vcpu *vc)
>>>
>>> BUG_ON( is_idle_vcpu(vc) );
>>>
>>> - /* Make sure svc priority mod happens before runq check */
>>> if ( unlikely(per_cpu(schedule_data, vc->processor).curr == vc) )
>>> {
>>> + SCHED_STAT_CRANK(vcpu_wake_running);
>>> goto out;
>>> }
>>> -
>>> if ( unlikely(__vcpu_on_runq(svc)) )
>>
>> Does this make the 'if' butt right up against the '{'? Is that bad?
>>
>> Other than that:
>>
>> Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
>>
> As far as I can see, the series is in:
>
> http://xenbits.xen.org/gitweb/?p=xen.git;a=commit;h=8b0e94da0e23221a6d7ea19bfbd24a407db44de8
>
> and whoever committed it (Jan, probably?), took care of leaving that
> blank line in place, which I'm fine with, of course. :-)
Sweet. :-)
-George
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2015-03-17 11:12 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-27 16:50 [PATCH v2 0/4] xen: sched: rework and add performance counters Dario Faggioli
2015-02-27 16:50 ` [PATCH v2 1/4] xen: sched: honour generic perf conuters in the RTDS scheduler Dario Faggioli
2015-03-16 17:01 ` George Dunlap
2015-02-27 16:51 ` [PATCH v2 2/4] xen: sched: make counters for vCPU sleep and wakeup generic Dario Faggioli
2015-03-16 17:18 ` George Dunlap
2015-03-17 10:48 ` Dario Faggioli
2015-03-17 11:12 ` George Dunlap
2015-02-27 16:51 ` [PATCH v2 3/4] xen: sched: make counters for vCPU tickling generic Dario Faggioli
2015-03-16 17:19 ` George Dunlap
2015-02-27 16:51 ` [PATCH v2 4/4] xen: credit2: add a few performance counters Dario Faggioli
2015-03-16 17:30 ` George Dunlap
2015-03-12 12:51 ` [PATCH v2 0/4] xen: sched: rework and add " Dario Faggioli
2015-03-12 14:53 ` George Dunlap
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.