diff options
Diffstat (limited to 'kernel/perf_event.c')
-rw-r--r-- | kernel/perf_event.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/perf_event.c b/kernel/perf_event.c index 52c69a34d697..3853d49c7d56 100644 --- a/kernel/perf_event.c +++ b/kernel/perf_event.c | |||
@@ -1368,6 +1368,8 @@ void perf_event_task_sched_in(struct task_struct *task) | |||
1368 | if (cpuctx->task_ctx == ctx) | 1368 | if (cpuctx->task_ctx == ctx) |
1369 | return; | 1369 | return; |
1370 | 1370 | ||
1371 | perf_disable(); | ||
1372 | |||
1371 | /* | 1373 | /* |
1372 | * We want to keep the following priority order: | 1374 | * We want to keep the following priority order: |
1373 | * cpu pinned (that don't need to move), task pinned, | 1375 | * cpu pinned (that don't need to move), task pinned, |
@@ -1380,6 +1382,8 @@ void perf_event_task_sched_in(struct task_struct *task) | |||
1380 | ctx_sched_in(ctx, cpuctx, EVENT_FLEXIBLE); | 1382 | ctx_sched_in(ctx, cpuctx, EVENT_FLEXIBLE); |
1381 | 1383 | ||
1382 | cpuctx->task_ctx = ctx; | 1384 | cpuctx->task_ctx = ctx; |
1385 | |||
1386 | perf_enable(); | ||
1383 | } | 1387 | } |
1384 | 1388 | ||
1385 | #define MAX_INTERRUPTS (~0ULL) | 1389 | #define MAX_INTERRUPTS (~0ULL) |