lkml.org 
[lkml]   [2014]   [Jan]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/3] perf: comment on usage of perf_invalid_context
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
>


\
 
 \ /
  Last update: 2014-01-10 11:21    [W:0.537 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site