From: Peter Zijlstra <peterz@infradead.org>
To: Cody P Schafer <cody@linux.vnet.ibm.com>
Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>,
Paul Mackerras <paulus@samba.org>, Ingo Molnar <mingo@redhat.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/3] perf: comment on usage of perf_invalid_context
Date: Fri, 10 Jan 2014 10:34:58 +0100 [thread overview]
Message-ID: <20140110093458.GH31570@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <1389311492-5059-2-git-send-email-cody@linux.vnet.ibm.com>
On Thu, Jan 09, 2014 at 03:51:30PM -0800, Cody P Schafer wrote:
> Context numbers less than 0 are treated specially within the events
> code, add a comment to document this.
>
> Signed-off-by: Cody P Schafer <cody@linux.vnet.ibm.com>
> ---
> include/linux/sched.h | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/include/linux/sched.h b/include/linux/sched.h
> index 53f97eb..f574820 100644
> --- a/include/linux/sched.h
> +++ b/include/linux/sched.h
> @@ -1033,6 +1033,10 @@ struct sched_rt_entity {
> struct rcu_node;
>
> enum perf_event_task_context {
> + /*
> + * When <0, allocate a pmu local pmu->pmu_cpu_context (instead
> + * of sharing among pmus in the same context) and forbid task tracking.
> + */
Please explain things in terms of the existing enum names; we don't want
people to start using randon negative values instead of
'perf_invalid_context'.
> perf_invalid_context = -1,
> perf_hw_context = 0,
> perf_sw_context,
> --
> 1.8.5.2
>
next prev parent reply other threads:[~2014-01-10 9:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-09 23:51 [PATCH 0/3] perf: note task_ctx_nr < 0 and sw event merging behavior Cody P Schafer
2014-01-09 23:51 ` [PATCH 1/3] perf: comment on usage of perf_invalid_context Cody P Schafer
2014-01-10 9:34 ` Peter Zijlstra [this message]
2014-01-09 23:51 ` [PATCH 2/3] perf: clarify comment regarding event merging Cody P Schafer
2014-01-10 9:36 ` Peter Zijlstra
2014-01-13 21:21 ` Cody P Schafer
2014-01-09 23:51 ` [PATCH 3/3] perf: clarify comment regarding perf_pmu_contexts Cody P Schafer
2014-01-10 9:37 ` Peter Zijlstra
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=20140110093458.GH31570@twins.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=acme@ghostprotocols.net \
--cc=cody@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=paulus@samba.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.