public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [Patch 0/1] HW-BKPT: Allow per-cpu kernel-space Hardware Breakpoint requests
@ 2009-08-17 12:46 K.Prasad
  2009-08-19 16:11 ` K.Prasad
  0 siblings, 1 reply; 15+ messages in thread
From: K.Prasad @ 2009-08-17 12:46 UTC (permalink / raw)
  To: LKML
  Cc: Frederic Weisbecker, Ingo Molnar, Peter Zijlstra, Lai Jiangshan,
	Steven Rostedt, Mathieu Desnoyers, Alan Stern

Hi All,
	Please find a patch that enables kernel-space breakpoints to be
requested for a subset of the available CPUs in the system. This allows
per-CPU breakpoints and comes with the associated benefit of reduced
overhead during (un)registration.

This enhancement allows exploitation of hardware breakpoint registers by
'perf' which produces a CPU-wise information.

Design changes
--------------
- Every breakpoint request 'consumes' the first available debug register
  (starting from HBP_NUM) in each CPU represented by 'cpumask' field in
  'struct hw_breakpoint'.

- 'hbp_kernel_pos' (that separates kernel-space breakpoints from the
  free/user-space breakpoints) now points to the maximum of debug
  registers consumed on any given CPU.
  -- 'hbp_kernel_pos' is decremented (one-at-a-time) to allow a new-slot
     for kernel-space requests iff all debug registers on the given CPU
     (from HBP_NUM - 1 to 'hbp_kernel_pos' are already consumed.
  -- 'hbp_kernel_pos' is incremented (one-at-a-time) to free a slot iff
     a removal request results in the release of a bkpt request that
     consumed maximum debug registers for kernel-space.

- Every removal request results in compaction of breakpoint registers
  (on a per-cpu basis) to occupy the vacant debug register.
 
The patch is based on commit b6c720b811aed0eeda89f277f13c1bd1bdf721fd of
-tip tree and has been tested to work fine on an x86 machine for both
cases (i.e. system-wide kernel breakpoints and bkpts for a subset of CPUs).

Please let me know your comments on the same.

Thanks,
K.Prasad


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2009-09-03 19:23 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-17 12:46 [Patch 0/1] HW-BKPT: Allow per-cpu kernel-space Hardware Breakpoint requests K.Prasad
2009-08-19 16:11 ` K.Prasad
2009-08-19 17:33   ` Frederic Weisbecker
2009-08-20 17:27     ` K.Prasad
2009-08-21 14:28       ` Ingo Molnar
2009-08-26  3:36         ` Frederic Weisbecker
2009-08-26  9:16           ` Ingo Molnar
2009-08-26 11:49             ` Frederic Weisbecker
2009-08-26 18:02               ` K.Prasad
2009-08-29 13:41                 ` Ingo Molnar
2009-09-01  6:38                   ` K.Prasad
2009-09-01 23:51                     ` Frederic Weisbecker
2009-09-03 18:28                       ` K.Prasad
2009-09-03 19:22                         ` Ingo Molnar
2009-08-25 20:33       ` K.Prasad

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox