Re: [PATCH 2/2] hw_breakpoint: Use cpu_possible_mask in {reserve,release}_bp_slot()

2013-06-15 Thread Frederic Weisbecker
On Sat, Jun 01, 2013 at 08:21:39PM +0200, Oleg Nesterov wrote: > fetch_bp_busy_slots() and toggle_bp_slot() use for_each_online_cpu(), > this is obviously wrong wrt cpu_up() or cpu_down(), we can over/under > account the per-cpu numbers. > > For example: > > # echo 0 >>

Re: [PATCH 2/2] hw_breakpoint: Use cpu_possible_mask in {reserve,release}_bp_slot()

2013-06-15 Thread Frederic Weisbecker
On Sat, Jun 01, 2013 at 08:21:39PM +0200, Oleg Nesterov wrote: fetch_bp_busy_slots() and toggle_bp_slot() use for_each_online_cpu(), this is obviously wrong wrt cpu_up() or cpu_down(), we can over/under account the per-cpu numbers. For example: # echo 0

[PATCH 2/2] hw_breakpoint: Use cpu_possible_mask in {reserve,release}_bp_slot()

2013-06-01 Thread Oleg Nesterov
fetch_bp_busy_slots() and toggle_bp_slot() use for_each_online_cpu(), this is obviously wrong wrt cpu_up() or cpu_down(), we can over/under account the per-cpu numbers. For example: # echo 0 >> /sys/devices/system/cpu/cpu1/online # perf record -e mem:0x10 -p 1 & # echo 1

[PATCH 2/2] hw_breakpoint: Use cpu_possible_mask in {reserve,release}_bp_slot()

2013-06-01 Thread Oleg Nesterov
fetch_bp_busy_slots() and toggle_bp_slot() use for_each_online_cpu(), this is obviously wrong wrt cpu_up() or cpu_down(), we can over/under account the per-cpu numbers. For example: # echo 0 /sys/devices/system/cpu/cpu1/online # perf record -e mem:0x10 -p 1 # echo 1