Re: [PATCH 1/2] hw_breakpoint: Simplify *register_wide_hw_breakpoint()

2013-06-17 Thread Frederic Weisbecker
On Sun, Jun 02, 2013 at 09:50:11PM +0200, Oleg Nesterov wrote: > 1. register_wide_hw_breakpoint() can use unregister_ if failure, >no need to duplicate the code. > > 2. "struct perf_event **pevent" adds the unnecesary lever of >indirection and complication, use per_cpu(*cpu_events, cpu).

Re: [PATCH 1/2] hw_breakpoint: Simplify *register_wide_hw_breakpoint()

2013-06-17 Thread Frederic Weisbecker
On Sun, Jun 02, 2013 at 09:50:11PM +0200, Oleg Nesterov wrote: 1. register_wide_hw_breakpoint() can use unregister_ if failure, no need to duplicate the code. 2. struct perf_event **pevent adds the unnecesary lever of indirection and complication, use per_cpu(*cpu_events, cpu).

[PATCH 1/2] hw_breakpoint: Simplify *register_wide_hw_breakpoint()

2013-06-02 Thread Oleg Nesterov
1. register_wide_hw_breakpoint() can use unregister_ if failure, no need to duplicate the code. 2. "struct perf_event **pevent" adds the unnecesary lever of indirection and complication, use per_cpu(*cpu_events, cpu). Signed-off-by: Oleg Nesterov --- kernel/events/hw_breakpoint.c | 34

[PATCH 1/2] hw_breakpoint: Simplify *register_wide_hw_breakpoint()

2013-06-02 Thread Oleg Nesterov
1. register_wide_hw_breakpoint() can use unregister_ if failure, no need to duplicate the code. 2. struct perf_event **pevent adds the unnecesary lever of indirection and complication, use per_cpu(*cpu_events, cpu). Signed-off-by: Oleg Nesterov o...@redhat.com ---