summaryrefslogtreecommitdiff
path: root/include/linux/errqueue.h
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2011-03-31 10:29:26 +0200
committerIngo Molnar <mingo@elte.hu>2011-03-31 13:02:55 +0200
commitab711fe08297de1485fff0a366e6db8828cafd6a (patch)
treee8a823c44d8b6bf132556f9d8aa09ec4a506c299 /include/linux/errqueue.h
parent800cd25c12981c99e5401c3551ffffd99f1c6c85 (diff)
downloadkernel-ab711fe08297de1485fff0a366e6db8828cafd6a.tar.gz
perf: Fix task context scheduling
Jiri reported: | | - once an event is created by sys_perf_event_open, task context | is created and it stays even if the event is closed, until the | task is finished ... thats what I see in code and I assume it's | correct | | - when the task opens event, perf_sched_events jump label is | incremented and following callbacks are started from scheduler | | __perf_event_task_sched_in | __perf_event_task_sched_out | | These callback *in/out set/unset cpuctx->task_ctx value to the | task context. | | - close is called on event on CPU 0: | - the task is scheduled on CPU 0 | - __perf_event_task_sched_in is called | - cpuctx->task_ctx is set | - perf_sched_events jump label is decremented and == 0 | - __perf_event_task_sched_out is not called | - cpuctx->task_ctx on CPU 0 stays set | | - exit is called on CPU 1: | - the task is scheduled on CPU 1 | - perf_event_exit_task is called | - task_ctx_sched_out unsets cpuctx->task_ctx on CPU 1 | - put_ctx destroys the context | | - another call of perf_rotate_context on CPU 0 will use invalid | task_ctx pointer, and eventualy panic. | Cure this the simplest possibly way by partially reverting the jump_label optimization for the sched_out case. Reported-and-tested-by: Jiri Olsa <jolsa@redhat.com> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Oleg Nesterov <oleg@redhat.com> Cc: <stable@kernel.org> # .37+ LKML-Reference: <1301520405.4859.213.camel@twins> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/errqueue.h')
0 files changed, 0 insertions, 0 deletions
sAlan Cox 2007-10-17SELinux: Improve read/write performanceYuichi Nakamura 2007-07-31VFS: fix a race in lease-breaking during truncatedavid m. richter 2007-07-24fallocate syscall interface deficiencyUlrich Drepper 2007-07-17sys_fallocate() implementation on i386, x86_64 and powerpcAmit Arora 2007-07-16O_CLOEXEC for SCM_RIGHTSUlrich Drepper 2007-07-16Introduce O_CLOEXECUlrich Drepper 2007-05-08Remove suid/sgid bits on [f]truncate()Linus Torvalds 2007-05-08header cleaning: don't include smp_lock.h when not usedRandy Dunlap 2006-12-10[PATCH] fdtable: Make fdarray and fdsets equal in sizeVadim Lobanov 2006-12-08[PATCH] VFS: change struct file to use struct pathJosef "Jeff" Sipek 2006-12-08[PATCH] tty: ->signal->tty lockingPeter Zijlstra 2006-10-01[PATCH] r/o bind mounts: prepare for write access checks: collapse if()Dave Hansen 2006-10-01[PATCH] Create fs/utimes.cAlexey Dobriyan 2006-09-29[PATCH] fix wrong error code on interrupted close syscallsErnie Petrides 2006-09-29[PATCH] vfs: define new lookup flag for chdirMiklos Szeredi 2006-06-25[PATCH] ftruncate does not always update m/ctimePeter Staubach 2006-06-23[PATCH] vfs: add lock owner argument to flush operationMiklos Szeredi 2006-06-23[PATCH] VFS: Permit filesystem to perform statfs with a known root dentryDavid Howells 2006-06-20[PATCH] log more info for directory entry change eventsAmy Griffis 2006-05-15[PATCH] fs/open.c: unexport sys_openatAdrian Bunk 2006-04-18x86: be careful about tailcall breakage for sys_open[at] tooLinus Torvalds 2006-04-18x86: don't allow tail-calls in sys_ftruncate[64]()Linus Torvalds 2006-03-25Merge branch 'audit.b3' of git://git.kernel.org/pub/scm/linux/kernel/git/viro...Linus Torvalds 2006-03-25[PATCH] Add lookup_instantiate_filp usage warningOleg Drokin 2006-03-23[PATCH] Shrinks sizeof(files_struct) and better layoutEric Dumazet 2006-03-20[PATCH] Collect more inode information during syscall processing.Amy Griffis