]> git.baikalelectronics.ru Git - kernel.git/commit
perf/x86/intel/pt: Untangle pt_buffer_reset_markers()
authorAlexander Shishkin <alexander.shishkin@linux.intel.com>
Fri, 22 May 2015 15:30:22 +0000 (18:30 +0300)
committerIngo Molnar <mingo@kernel.org>
Wed, 27 May 2015 07:16:20 +0000 (09:16 +0200)
commitc119a3e636ba27f5a5acf4b19383fe8919ad23f4
tree22b8ce22d244c0eed554cb09777661699d85fa33
parent6ec6f0cfa453b956752a77d1ba224bbbb4bc1e1b
perf/x86/intel/pt: Untangle pt_buffer_reset_markers()

Currently, pt_buffer_reset_markers() is a difficult to read knot of
arithmetics with a redundant check for multiple-entry TOPA capability,
a commented out wakeup marker placement and a logical error wrt to
stop marker placement. The latter happens when write head is not page
aligned and results in stop marker being placed one page earlier than
it actually should.

All these problems only affect PT implementations that support
multiple-entry TOPA tables (read: proper scatter-gather).

For single-entry TOPA implementations, there is no functional impact.

This patch deals with all of the above. Tested on both single-entry
and multiple-entry TOPA PT implementations.

Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: acme@infradead.org
Cc: adrian.hunter@intel.com
Cc: hpa@zytor.com
Link: http://lkml.kernel.org/r/1432308626-18845-4-git-send-email-alexander.shishkin@linux.intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/kernel/cpu/perf_event_intel_pt.c