All of lore.kernel.org
 help / color / mirror / Atom feed
From: George Dunlap <george.dunlap@citrix.com>
To: Dario Faggioli <dario.faggioli@citrix.com>,
	xen-devel@lists.xenproject.org
Cc: George Dunlap <george.dunlap@eu.citrix.com>,
	Ian Campbell <ian.campbell@citrix.com>,
	Jan Beulich <JBeulich@suse.com>
Subject: Re: [PATCH v2 03/16] xen: sched: improve domain creation tracing
Date: Thu, 18 Feb 2016 11:04:49 +0000	[thread overview]
Message-ID: <56C5A551.4050303@citrix.com> (raw)
In-Reply-To: <20160216181129.27876.21579.stgit@Solace.station>

On 16/02/16 18:11, Dario Faggioli wrote:
> by doing the following two things:
> 
>  - move TRC_SCHED_DOM_{ADD,REM}, into the functions
>    that do the actual scheduling-related domain
>    initialization;
> 
>  - add two 'generic' DOM_{ADD,REM} events. They're
>    made part of the TRC_DOM0 tracing class, as Dom0
>    is, usually, from where domains are created and
>    destroyed.
> 
> Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>

Reviewed-by: George Dunlap <george.dunlap@citrix.com>

Since this changes domain.c, I guess this would need an ack from "The
Rest" -- probably either from Jan or Ian, since they're somewhat
familiar with this code...?

 -George

> ---
> Cc: George Dunlap <george.dunlap@eu.citrix.com>
> Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> ---
> Changes from v1:
>  * added generic domain creation and destruction events, as
>    suggested during review.
> ---
>  xen/common/domain.c        |    5 ++++-
>  xen/common/schedule.c      |    4 ++--
>  xen/include/public/trace.h |    6 ++++++
>  3 files changed, 12 insertions(+), 3 deletions(-)
> 
> diff --git a/xen/common/domain.c b/xen/common/domain.c
> index 425767c..45273d4 100644
> --- a/xen/common/domain.c
> +++ b/xen/common/domain.c
> @@ -270,6 +270,8 @@ struct domain *domain_create(domid_t domid, unsigned int domcr_flags,
>  
>      d->domain_id = domid;
>  
> +    TRACE_1D(TRC_DOM0_DOM_ADD, d->domain_id);
> +
>      lock_profile_register_struct(LOCKPROF_TYPE_PERDOM, d, domid, "Domain");
>  
>      if ( (err = xsm_alloc_security_domain(d)) != 0 )
> @@ -864,10 +866,11 @@ void domain_destroy(struct domain *d)
>      if ( atomic_cmpxchg(&d->refcnt, 0, DOMAIN_DESTROYED) != 0 )
>          return;
>  
> +    TRACE_1D(TRC_DOM0_DOM_REM, d->domain_id);
> +
>      cpupool_rm_domain(d);
>  
>      /* Delete from task list and task hashtable. */
> -    TRACE_1D(TRC_SCHED_DOM_REM, d->domain_id);
>      spin_lock(&domlist_update_lock);
>      pd = &domain_list;
>      while ( *pd != d ) 
> diff --git a/xen/common/schedule.c b/xen/common/schedule.c
> index c87922f..27695e3 100644
> --- a/xen/common/schedule.c
> +++ b/xen/common/schedule.c
> @@ -241,8 +241,6 @@ int sched_init_vcpu(struct vcpu *v, unsigned int processor)
>      if ( v->sched_priv == NULL )
>          return 1;
>  
> -    TRACE_2D(TRC_SCHED_DOM_ADD, v->domain->domain_id, v->vcpu_id);
> -
>      /* Idle VCPUs are scheduled immediately, so don't put them in runqueue. */
>      if ( is_idle_domain(d) )
>      {
> @@ -369,12 +367,14 @@ void sched_destroy_vcpu(struct vcpu *v)
>  int sched_init_domain(struct domain *d)
>  {
>      SCHED_STAT_CRANK(dom_init);
> +    TRACE_1D(TRC_SCHED_DOM_ADD, d->domain_id);
>      return SCHED_OP(DOM2OP(d), init_domain, d);
>  }
>  
>  void sched_destroy_domain(struct domain *d)
>  {
>      SCHED_STAT_CRANK(dom_destroy);
> +    TRACE_1D(TRC_SCHED_DOM_REM, d->domain_id);
>      SCHED_OP(DOM2OP(d), destroy_domain, d);
>  }
>  
> diff --git a/xen/include/public/trace.h b/xen/include/public/trace.h
> index 274f8f6..5ef9c37 100644
> --- a/xen/include/public/trace.h
> +++ b/xen/include/public/trace.h
> @@ -85,6 +85,9 @@
>        ((TRC_SCHED_##_c << TRC_SCHED_ID_SHIFT) & TRC_SCHED_ID_MASK) ) + \
>      (_e & TRC_SCHED_EVT_MASK) )
>  
> +/* Trace classes for DOM0 operations */
> +#define TRC_DOM0_DOMOPS     0x00041000   /* Domains manipulations */
> +
>  /* Trace classes for Hardware */
>  #define TRC_HW_PM           0x00801000   /* Power management traces */
>  #define TRC_HW_IRQ          0x00802000   /* Traces relating to the handling of IRQs */
> @@ -113,6 +116,9 @@
>  #define TRC_SCHED_SWITCH_INFNEXT (TRC_SCHED_VERBOSE + 15)
>  #define TRC_SCHED_SHUTDOWN_CODE  (TRC_SCHED_VERBOSE + 16)
>  
> +#define TRC_DOM0_DOM_ADD         (TRC_DOM0_DOMOPS + 1)
> +#define TRC_DOM0_DOM_REM         (TRC_DOM0_DOMOPS + 2)
> +
>  #define TRC_MEM_PAGE_GRANT_MAP      (TRC_MEM + 1)
>  #define TRC_MEM_PAGE_GRANT_UNMAP    (TRC_MEM + 2)
>  #define TRC_MEM_PAGE_GRANT_TRANSFER (TRC_MEM + 3)
> 

  reply	other threads:[~2016-02-18 11:04 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-16 18:11 [PATCH v2 00/16] Scheduling related tracing improvements Dario Faggioli
2016-02-16 18:11 ` [PATCH v2 01/16] xen: sched: __runq_tickle takes a useless cpu parameter Dario Faggioli
2016-02-18 10:33   ` George Dunlap
2016-02-16 18:11 ` [PATCH v2 02/16] xen: sched: move up the trace record for vcpu_wake and vcpu_sleep Dario Faggioli
2016-02-18 10:34   ` George Dunlap
2016-02-16 18:11 ` [PATCH v2 03/16] xen: sched: improve domain creation tracing Dario Faggioli
2016-02-18 11:04   ` George Dunlap [this message]
2016-02-24 11:21     ` Dario Faggioli
2016-02-24 11:52       ` Jan Beulich
2016-02-24 13:20         ` Dario Faggioli
2016-02-16 18:11 ` [PATCH v2 04/16] xen: credit2: pack trace data better for xentrace_format Dario Faggioli
2016-02-18 11:10   ` George Dunlap
2016-02-18 13:42     ` Dario Faggioli
2016-02-16 18:11 ` [PATCH v2 05/16] xen: RTDS: " Dario Faggioli
2016-02-18 11:12   ` George Dunlap
2016-02-18 14:43   ` Meng Xu
2016-02-16 18:11 ` [PATCH v2 06/16] xen: sched: tracing: enable TSC tracing for all events Dario Faggioli
2016-02-16 18:21   ` Meng Xu
2016-02-17  9:52     ` Dario Faggioli
2016-02-17 15:26       ` Meng Xu
2016-02-18 11:43       ` George Dunlap
2016-02-18 16:52         ` Dario Faggioli
2016-02-22 11:02           ` George Dunlap
2016-02-16 18:12 ` [PATCH v2 07/16] xentrace: formats: update format of scheduling events Dario Faggioli
2016-02-18 12:28   ` George Dunlap
2016-02-16 18:12 ` [PATCH v2 08/16] xentrace: formats: add events from Credit scheduler Dario Faggioli
2016-02-16 18:12 ` [PATCH v2 09/16] xentrace: formats: add events from Credit2 scheduler Dario Faggioli
2016-02-16 18:12 ` [PATCH v2 10/16] xentrace: formats: add events from RTDS scheduler Dario Faggioli
2016-02-16 18:12 ` [PATCH v2 11/16] xentrace: formats: add domain create and destroy events Dario Faggioli
2016-02-16 18:12 ` [PATCH v2 12/16] xenalyze: handle scheduling events Dario Faggioli
2016-02-18 15:18   ` George Dunlap
2016-02-16 18:12 ` [PATCH v2 13/16] xenalyze: handle Credit1 scheduler events Dario Faggioli
2016-02-18 15:28   ` George Dunlap
2016-02-18 15:31   ` George Dunlap
2016-02-18 16:58     ` Dario Faggioli
2016-02-16 18:13 ` [PATCH v2 14/16] xenalyze: handle Credit2 " Dario Faggioli
2016-02-18 15:17   ` George Dunlap
2016-02-16 18:13 ` [PATCH v2 15/16] xenalyze: handle RTDS " Dario Faggioli
2016-02-18 15:28   ` George Dunlap
2016-02-18 17:02     ` Dario Faggioli
2016-02-18 17:06       ` George Dunlap
2016-02-18 17:10         ` Dario Faggioli
2016-02-16 18:13 ` [PATCH v2 16/16] xenalyze: handle DOM0 operaions events Dario Faggioli
2016-03-04 18:25 ` [PATCH v2 00/16] Scheduling related tracing improvements Dario Faggioli
2016-03-04 19:52   ` Konrad Rzeszutek Wilk
2016-03-07 10:50   ` Jan Beulich
2016-03-07 10:54     ` Wei Liu
2016-03-07 11:21       ` Jan Beulich
2016-03-07 11:27         ` Wei Liu
2016-03-07 14:21           ` Dario Faggioli
2016-03-07 15:36             ` Konrad Rzeszutek Wilk

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=56C5A551.4050303@citrix.com \
    --to=george.dunlap@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=dario.faggioli@citrix.com \
    --cc=george.dunlap@eu.citrix.com \
    --cc=ian.campbell@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.