lkml.org 
[lkml]   [2010]   [Jan]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 5/6] perf: Don't rotate pinned groups
Date
We round-robin pinned groups, which means we make them behaving
just like non-pinned groups. Currently, and in practice, the almost
only difference between pinned and non-pinned events is that the
formers are scheduled before the latters. And the latters also
stop scheduling non-software-only groups once one couldn't make
it.

Anyway, pinned groups don't need to be round-robined because if
a pinned group can't be scheduled, it is going to be put in an
error state, following the pinned logic: it is always or never
scheduled in a context.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
---
kernel/perf_event.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/kernel/perf_event.c b/kernel/perf_event.c
index 7d00676..584e854 100644
--- a/kernel/perf_event.c
+++ b/kernel/perf_event.c
@@ -1451,11 +1451,10 @@ static void rotate_ctx(struct perf_event_context *ctx)

raw_spin_lock(&ctx->lock);
/*
- * Rotate the first entry last (works just fine for group events too):
+ * Rotate the first entry last of non-pinned groups
*/
perf_disable();

- list_rotate_left(&ctx->pinned_groups);
list_rotate_left(&ctx->flexible_groups);

perf_enable();
--
1.6.2.3


\
 
 \ /
  Last update: 2010-01-10 02:41    [W:0.092 / U:1.672 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site