[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1253617951.7695.24.camel@twins>
Date: Tue, 22 Sep 2009 13:12:31 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Xiao Guangrong <xiaoguangrong@...fujitsu.com>
Cc: Ingo Molnar <mingo@...e.hu>, Paul Mackerras <paulus@...ba.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] perf_counter: cleanup for __perf_event_sched_in()
On Tue, 2009-09-22 at 16:47 +0800, Xiao Guangrong wrote:
> It must be a group leader if event->attr.pinned is "1"
Since we already enforce that on counter creation, this seems OK.
Thanks
> Signed-off-by: Xiao Guangrong <xiaoguangrong@...fujitsu.com>
> ---
> kernel/perf_event.c | 11 +++++------
> 1 files changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/kernel/perf_event.c b/kernel/perf_event.c
> index 76ac4db..fdd9c94 100644
> --- a/kernel/perf_event.c
> +++ b/kernel/perf_event.c
> @@ -1258,12 +1258,11 @@ __perf_event_sched_in(struct perf_event_context *ctx,
> if (event->cpu != -1 && event->cpu != cpu)
> continue;
>
> - if (event != event->group_leader)
> - event_sched_in(event, cpuctx, ctx, cpu);
> - else {
> - if (group_can_go_on(event, cpuctx, 1))
> - group_sched_in(event, cpuctx, ctx, cpu);
> - }
> + /* Only a group leader can be pinned */
> + BUG_ON(event != event->group_leader);
> +
> + if (group_can_go_on(event, cpuctx, 1))
> + group_sched_in(event, cpuctx, ctx, cpu);
>
> /*
> * If this pinned group hasn't been scheduled,
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists