lkml.org 
[lkml]   [2012]   [May]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/9] perf: Allow pmu to choose cpu on which to install event
On Wednesday 02 May 2012 07:37 AM, Yan, Zheng wrote:

> From: "Yan, Zheng" <zheng.z.yan@intel.com>
>
> Allow the pmu->event_init callback to change event->cpu, so pmu can
> choose cpu on which to install event.
>
> Signed-off-by: Zheng Yan <zheng.z.yan@intel.com>
> ---
> kernel/events/core.c | 13 +++++++++----
> 1 files changed, 9 insertions(+), 4 deletions(-)
>
> diff --git a/kernel/events/core.c b/kernel/events/core.c
> index 32cfc76..84911de 100644
> --- a/kernel/events/core.c
> +++ b/kernel/events/core.c
> @@ -6250,6 +6250,8 @@ SYSCALL_DEFINE5(perf_event_open,
> }
> }
>
> + get_online_cpus();

Why this protection against cpu hotplug operation ? Is this because PMU now can change event->cpu
during event initialization (specific to uncore PMU events) or this protection has always been required
for normal on-cpu HW PMU events also and we added it right now ?



\
 
 \ /
  Last update: 2012-05-09 09:21    [W:1.391 / U:0.272 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site