RE: [RFC] kprobes: Use percpu counter to collect nhit statistics

2015-11-12 Thread 平松雅巳 / HIRAMATU,MASAMI
From: Martin KaFai Lau [mailto:ka...@fb.com] > >When doing ebpf+kprobe on some hot TCP functions (e.g. >tcp_rcv_established), the kprobe_dispatcher shows up in 'perf report'. > >In kprobe_dispatcher(), there is a lot of cache bouncing >in 'tk->nhit++'. 'tk->nhit' and 'tk->tp.flags' also share

RE: [RFC] kprobes: Use percpu counter to collect nhit statistics

2015-11-12 Thread 平松雅巳 / HIRAMATU,MASAMI
From: Martin KaFai Lau [mailto:ka...@fb.com] > >When doing ebpf+kprobe on some hot TCP functions (e.g. >tcp_rcv_established), the kprobe_dispatcher shows up in 'perf report'. > >In kprobe_dispatcher(), there is a lot of cache bouncing >in 'tk->nhit++'. 'tk->nhit' and 'tk->tp.flags' also share

[RFC] kprobes: Use percpu counter to collect nhit statistics

2015-11-06 Thread Martin KaFai Lau
When doing ebpf+kprobe on some hot TCP functions (e.g. tcp_rcv_established), the kprobe_dispatcher shows up in 'perf report'. In kprobe_dispatcher(), there is a lot of cache bouncing in 'tk->nhit++'. 'tk->nhit' and 'tk->tp.flags' also share the same cacheline. perf report (cycles:pp): 8.30%

[RFC] kprobes: Use percpu counter to collect nhit statistics

2015-11-06 Thread Martin KaFai Lau
When doing ebpf+kprobe on some hot TCP functions (e.g. tcp_rcv_established), the kprobe_dispatcher shows up in 'perf report'. In kprobe_dispatcher(), there is a lot of cache bouncing in 'tk->nhit++'. 'tk->nhit' and 'tk->tp.flags' also share the same cacheline. perf report (cycles:pp): 8.30%

[RFC] kprobes: Use percpu counter to collect nhit statistics

2015-11-06 Thread Martin KaFai Lau
When doing ebpf+kprobe on some hot TCP functions (e.g. tcp_rcv_established), the kprobe_dispatcher shows up in 'perf report'. In kprobe_dispatcher(), there is a lot of cache bouncing in 'tk->nhit++'. 'tk->nhit' and 'tk->tp.flags' also share the same cacheline. perf report (cycles:pp): 8.30%

[RFC] kprobes: Use percpu counter to collect nhit statistics

2015-11-06 Thread Martin KaFai Lau
When doing ebpf+kprobe on some hot TCP functions (e.g. tcp_rcv_established), the kprobe_dispatcher shows up in 'perf report'. In kprobe_dispatcher(), there is a lot of cache bouncing in 'tk->nhit++'. 'tk->nhit' and 'tk->tp.flags' also share the same cacheline. perf report (cycles:pp): 8.30%