Re: [PATCH v4 tip 3/7] tracing: allow BPF programs to call ktime_get_ns()

2015-02-28 Thread Alexei Starovoitov
On Sat, Feb 28, 2015 at 2:20 AM, Peter Zijlstra wrote: >> >> +static u64 bpf_ktime_get_ns(u64 r1, u64 r2, u64 r3, u64 r4, u64 r5) >> +{ >> + return ktime_get_ns(); >> +} > > Please use ktime_get_mono_fast_ns() instead. If you ever want to allow > running BPF stuff from general tracepoints and

Re: [PATCH v4 tip 3/7] tracing: allow BPF programs to call ktime_get_ns()

2015-02-28 Thread Peter Zijlstra
On Fri, Feb 27, 2015 at 04:08:51PM -0800, Alexei Starovoitov wrote: > bpf_ktime_get_ns() is used by programs to compue time delta between events > or as a timestamp > > Signed-off-by: Alexei Starovoitov > --- > include/uapi/linux/bpf.h |1 + > kernel/trace/bpf_trace.c | 10 ++ > 2

Re: [PATCH v4 tip 3/7] tracing: allow BPF programs to call ktime_get_ns()

2015-02-28 Thread Peter Zijlstra
On Fri, Feb 27, 2015 at 04:08:51PM -0800, Alexei Starovoitov wrote: bpf_ktime_get_ns() is used by programs to compue time delta between events or as a timestamp Signed-off-by: Alexei Starovoitov a...@plumgrid.com --- include/uapi/linux/bpf.h |1 + kernel/trace/bpf_trace.c | 10

Re: [PATCH v4 tip 3/7] tracing: allow BPF programs to call ktime_get_ns()

2015-02-28 Thread Alexei Starovoitov
On Sat, Feb 28, 2015 at 2:20 AM, Peter Zijlstra pet...@infradead.org wrote: +static u64 bpf_ktime_get_ns(u64 r1, u64 r2, u64 r3, u64 r4, u64 r5) +{ + return ktime_get_ns(); +} Please use ktime_get_mono_fast_ns() instead. If you ever want to allow running BPF stuff from general

[PATCH v4 tip 3/7] tracing: allow BPF programs to call ktime_get_ns()

2015-02-27 Thread Alexei Starovoitov
bpf_ktime_get_ns() is used by programs to compue time delta between events or as a timestamp Signed-off-by: Alexei Starovoitov --- include/uapi/linux/bpf.h |1 + kernel/trace/bpf_trace.c | 10 ++ 2 files changed, 11 insertions(+) diff --git a/include/uapi/linux/bpf.h

[PATCH v4 tip 3/7] tracing: allow BPF programs to call ktime_get_ns()

2015-02-27 Thread Alexei Starovoitov
bpf_ktime_get_ns() is used by programs to compue time delta between events or as a timestamp Signed-off-by: Alexei Starovoitov a...@plumgrid.com --- include/uapi/linux/bpf.h |1 + kernel/trace/bpf_trace.c | 10 ++ 2 files changed, 11 insertions(+) diff --git