kernel-fxtec-pro1x/drivers/oprofile
Davidlohr Bueso 11163348a2 oprofile: reduce mmap_sem hold for mm->exe_file
sync_buffer() needs the mmap_sem for two distinct operations, both only
occurring upon user context switch handling:

 1) Dealing with the exe_file.

 2) Adding the dcookie data as we need to lookup the vma that
   backs it. This is done via add_sample() and add_data().

This patch isolates 1), for it will no longer need the mmap_sem for
serialization.  However, for now, make of the more standard
get_mm_exe_file(), requiring only holding the mmap_sem to read the value,
and relying on reference counting to make sure that the exe file won't
dissappear underneath us while doing the get dcookie.

As a consequence, for 2) we move the mmap_sem locking into where we really
need it, in lookup_dcookie().  The benefits are twofold: reduce mmap_sem
hold times, and cleaner code.

[akpm@linux-foundation.org: export get_mm_exe_file for arch/x86/oprofile/oprofile.ko]
Signed-off-by: Davidlohr Bueso <dbueso@suse.de>
Cc: Robert Richter <rric@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-04-17 09:04:11 -04:00
..
buffer_sync.c oprofile: reduce mmap_sem hold for mm->exe_file 2015-04-17 09:04:11 -04:00
buffer_sync.h cpumask: modifiy oprofile initialization 2009-01-22 14:37:06 +01:00
cpu_buffer.c drivers/oprofile: Replace __get_cpu_var uses for address calculation 2014-08-26 13:45:46 -04:00
cpu_buffer.h oprofile: Remove deprecated use of flush_scheduled_work() 2010-10-29 11:54:18 +02:00
event_buffer.c locking, oprofile: Annotate oprofilefs lock as raw 2011-09-13 11:12:05 +02:00
event_buffer.h oprofile: Use linux/mutex.h 2011-05-24 12:45:59 +02:00
nmi_timer_int.c oprofile, nmi-timer: Fix CPU hotplug callback registration 2014-03-20 13:43:46 +01:00
oprof.c oprofile, x86: Reimplement nmi timer mode using perf event 2011-11-04 16:27:18 +01:00
oprof.h oprofile: get rid of pointless forward declarations of struct super_block 2013-09-03 22:52:48 -04:00
oprofile_files.c oprofilefs_create_...() do not need superblock argument 2013-09-03 22:52:48 -04:00
oprofile_perf.c oprofilefs_create_...() do not need superblock argument 2013-09-03 22:52:48 -04:00
oprofile_stats.c oprofilefs_create_...() do not need superblock argument 2013-09-03 22:52:48 -04:00
oprofile_stats.h oprofile: get rid of pointless forward declarations of struct super_block 2013-09-03 22:52:48 -04:00
oprofilefs.c oprofilefs_create_...() do not need superblock argument 2013-09-03 22:52:48 -04:00
timer_int.c drivers/oprofile: Replace __get_cpu_var uses for address calculation 2014-08-26 13:45:46 -04:00