From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Dario Faggioli <dario.faggioli@citrix.com>
Cc: xen-devel@lists.xenproject.org, Olaf Hering <olaf@aepfle.de>,
Tianyang Chen <tiche@seas.upenn.edu>,
Meng Xu <xumengpanda@gmail.com>,
George Dunlap <george.dunlap@citrix.com>
Subject: Re: [PATCH 05/14] xen: RTDS: pack trace data better for xentrace_format
Date: Mon, 15 Feb 2016 11:31:13 -0500 [thread overview]
Message-ID: <20160215163113.GE4697@char.us.oracle.com> (raw)
In-Reply-To: <20160205183405.4543.28487.stgit@Solace.station>
On Fri, Feb 05, 2016 at 07:34:05PM +0100, Dario Faggioli wrote:
> when tracing runstate changes, the vcpu and domain IDs
> are encoded in the lower and higher, respectively, parts
> of a 32 bits integer. When decoding a trace with
> xentrace_format, this makes it possible to display
> such events like this:
>
> CPU0 833435853624 (+ 768) running_to_runnable [ dom:vcpu = 0x7fff0000 ]
> CPU0 833435854416 (+ 792) runnable_to_running [ dom:vcpu = 0x00000007 ]
>
> For consistency, we should do the same when displaying
> the events coming from the RTDS scheduler (when using
> the same tool), and to do that, we need to invert the
> order in which the fields are being put in the trace
> struct right now.
>
> While there, we also:
> - fix the use of TRC_RTDS_SCHED_TASKLET (it should
> only be involved when a tasklet is scheduled, not
> _every_ time rt_schedule() is invoked!);
> - remove a very chatty and useless (nothing has been
> picked!) use of TRC_RTDS_RUNQ_PICK.
>
I would add: "One can observe the case where nothing has been
picked by looking at when the cpu_idle is invoked - which is
the same mechanism on credit1,2 where we can see if the
scheduler hadn't picked anything from the runqueue."
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
> ---
> Cc: George Dunlap <george.dunlap@citrix.com>
> Cc: Meng Xu <xumengpanda@gmail.com>
> Cc: Tianyang Chen <tiche@seas.upenn.edu>
> Cc: Olaf Hering <olaf@aepfle.de>
> ---
> xen/common/sched_rt.c | 27 ++++-----------------------
> 1 file changed, 4 insertions(+), 23 deletions(-)
>
> diff --git a/xen/common/sched_rt.c b/xen/common/sched_rt.c
> index 2e5430f..53de6d6 100644
> --- a/xen/common/sched_rt.c
> +++ b/xen/common/sched_rt.c
> @@ -362,7 +362,7 @@ rt_update_deadline(s_time_t now, struct rt_vcpu *svc)
> /* TRACE */
> {
> struct {
> - unsigned dom:16,vcpu:16;
> + unsigned vcpu:16, dom:16;
> unsigned cur_deadline_lo, cur_deadline_hi;
> unsigned cur_budget_lo, cur_budget_hi;
> } d;
> @@ -711,7 +711,7 @@ burn_budget(const struct scheduler *ops, struct rt_vcpu *svc, s_time_t now)
> /* TRACE */
> {
> struct {
> - unsigned dom:16, vcpu:16;
> + unsigned vcpu:16, dom:16;
> unsigned cur_budget_lo;
> unsigned cur_budget_hi;
> int delta;
> @@ -763,7 +763,7 @@ __runq_pick(const struct scheduler *ops, const cpumask_t *mask)
> if( svc != NULL )
> {
> struct {
> - unsigned dom:16, vcpu:16;
> + unsigned vcpu:16, dom:16;
> unsigned cur_deadline_lo, cur_deadline_hi;
> unsigned cur_budget_lo, cur_budget_hi;
> } d;
> @@ -777,8 +777,6 @@ __runq_pick(const struct scheduler *ops, const cpumask_t *mask)
> sizeof(d),
> (unsigned char *) &d);
> }
> - else
> - trace_var(TRC_RTDS_RUNQ_PICK, 1, 0, NULL);
> }
>
> return svc;
> @@ -845,6 +843,7 @@ rt_schedule(const struct scheduler *ops, s_time_t now, bool_t tasklet_work_sched
>
> if ( tasklet_work_scheduled )
> {
> + trace_var(TRC_RTDS_SCHED_TASKLET, 1, 0, NULL);
> snext = rt_vcpu(idle_vcpu[cpu]);
> }
> else
> @@ -885,24 +884,6 @@ rt_schedule(const struct scheduler *ops, s_time_t now, bool_t tasklet_work_sched
> ret.time = MIN(snext->budget, MAX_SCHEDULE); /* sched quantum */
> ret.task = snext->vcpu;
>
> - /* TRACE */
> - {
> - struct {
> - unsigned dom:16,vcpu:16;
> - unsigned cur_deadline_lo, cur_deadline_hi;
> - unsigned cur_budget_lo, cur_budget_hi;
> - } d;
> - d.dom = snext->vcpu->domain->domain_id;
> - d.vcpu = snext->vcpu->vcpu_id;
> - d.cur_deadline_lo = (unsigned) snext->cur_deadline;
> - d.cur_deadline_hi = (unsigned) (snext->cur_deadline >> 32);
> - d.cur_budget_lo = (unsigned) snext->cur_budget;
> - d.cur_budget_hi = (unsigned) (snext->cur_budget >> 32);
> - trace_var(TRC_RTDS_SCHED_TASKLET, 1,
> - sizeof(d),
> - (unsigned char *)&d);
> - }
> -
> return ret;
> }
>
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-02-15 16:31 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-05 18:33 [PATCH 00/14] Scheduling related tracing improvements Dario Faggioli
2016-02-05 18:33 ` [PATCH 01/14] xen: sched: __runq_tickle takes a useless cpu parameter Dario Faggioli
2016-02-15 16:14 ` Konrad Rzeszutek Wilk
2016-02-15 16:29 ` Dario Faggioli
2016-02-05 18:33 ` [PATCH 02/14] xen: sched: move up the trace record for vcpu_wake and vcpu_sleep Dario Faggioli
2016-02-15 16:18 ` Konrad Rzeszutek Wilk
2016-02-05 18:33 ` [PATCH 03/14] xen: sched: fi position of TRC_SCHED_DOM_{ADD, REM} Dario Faggioli
2016-02-15 16:22 ` Konrad Rzeszutek Wilk
2016-02-15 16:37 ` Dario Faggioli
2016-02-15 16:41 ` Konrad Rzeszutek Wilk
2016-02-05 18:33 ` [PATCH 04/14] xen: credit2: pack trace data better for xentrace_format Dario Faggioli
2016-02-15 16:29 ` Konrad Rzeszutek Wilk
2016-02-05 18:34 ` [PATCH 05/14] xen: RTDS: " Dario Faggioli
2016-02-15 16:31 ` Konrad Rzeszutek Wilk [this message]
2016-02-05 18:34 ` [PATCH 06/14] xen: sched: tracing: enable TSC tracing for all events Dario Faggioli
2016-02-15 16:32 ` Konrad Rzeszutek Wilk
2016-02-15 17:00 ` Dario Faggioli
2016-02-05 18:34 ` [PATCH 07/14] xentrace: formats: update format of scheduling events Dario Faggioli
2016-02-15 16:38 ` Konrad Rzeszutek Wilk
2016-02-15 16:42 ` Dario Faggioli
2016-02-05 18:34 ` [PATCH 08/14] xentrace: formats: add events from Credit scheduler Dario Faggioli
2016-02-15 16:40 ` Konrad Rzeszutek Wilk
2016-02-05 18:34 ` [PATCH 09/14] xentrace: formats: add events from Credit2 scheduler Dario Faggioli
2016-02-15 16:44 ` Konrad Rzeszutek Wilk
2016-02-05 18:35 ` [PATCH 10/14] xentrace: formats: add events from RTDS scheduler Dario Faggioli
2016-02-05 18:35 ` [PATCH 11/14] xenalyze: handle scheduling events Dario Faggioli
2016-02-15 16:51 ` Konrad Rzeszutek Wilk
2016-02-15 17:03 ` Dario Faggioli
2016-02-05 18:35 ` [PATCH 12/14] xenalyze: handle Credit1 scheduler events Dario Faggioli
2016-02-05 18:35 ` [PATCH 13/14] xenalyze: handle Credit2 " Dario Faggioli
2016-02-05 18:35 ` [PATCH 14/14] xenalyze: handle RTDS " 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=20160215163113.GE4697@char.us.oracle.com \
--to=konrad.wilk@oracle.com \
--cc=dario.faggioli@citrix.com \
--cc=george.dunlap@citrix.com \
--cc=olaf@aepfle.de \
--cc=tiche@seas.upenn.edu \
--cc=xen-devel@lists.xenproject.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 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).