[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Tue, 4 Apr 2017 10:32:53 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Masami Hiramatsu <mhiramat@...nel.org>
Cc: Alban Crequy <alban.crequy@...il.com>,
Alban Crequy <alban@...volk.io>,
Alexei Starovoitov <ast@...nel.org>,
Jonathan Corbet <corbet@....net>,
Ingo Molnar <mingo@...hat.com>, Shuah Khan <shuah@...nel.org>,
Arnaldo Carvalho de Melo <acme@...hat.com>,
Omar Sandoval <osandov@...com>,
Anton Blanchard <anton@...ba.org>, linux-doc@...r.kernel.org,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-kselftest@...r.kernel.org, iago@...volk.io,
michael@...volk.io, lukasz.dorau@...el.com,
vitalii.chernookyi@...el.com, marcin.slusarz@...el.com,
sarah.jelinek@...el.com, gabor.buella@...el.com
Subject: Re: [PATCH v3] tracing/kprobes: expose maxactive for kretprobe in
kprobe_events
On Tue, 4 Apr 2017 20:24:59 +0900
Masami Hiramatsu <mhiramat@...nel.org> wrote:
> On Mon, 3 Apr 2017 12:36:22 +0200
> Alban Crequy <alban.crequy@...il.com> wrote:
>
> > From: Alban Crequy <alban@...volk.io>
> >
> > When a kretprobe is installed on a kernel function, there is a maximum
> > limit of how many calls in parallel it can catch (aka "maxactive"). A
> > kernel module could call register_kretprobe() and initialize maxactive
> > (see example in samples/kprobes/kretprobe_example.c).
> >
> > But that is not exposed to userspace and it is currently not possible to
> > choose maxactive when writing to /sys/kernel/debug/tracing/kprobe_events
> >
> > The default maxactive can be as low as 1 on single-core with a
> > non-preemptive kernel. This is too low and we need to increase it not
> > only for recursive functions, but for functions that sleep or resched.
> >
> > This patch updates the format of the command that can be written to
> > kprobe_events so that maxactive can be optionally specified.
> >
> > I need this for a bpf program attached to the kretprobe of
> > inet_csk_accept, which can sleep for a long time.
> >
> > This patch includes a basic selftest:
> >
> > > # ./ftracetest -v test.d/kprobe/
> > > === Ftrace unit tests ===
> > > [1] Kprobe dynamic event - adding and removing [PASS]
> > > [2] Kprobe dynamic event - busy event check [PASS]
> > > [3] Kprobe dynamic event with arguments [PASS]
> > > [4] Kprobes event arguments with types [PASS]
> > > [5] Kprobe dynamic event with function tracer [PASS]
> > > [6] Kretprobe dynamic event with arguments [PASS]
> > > [7] Kretprobe dynamic event with maxactive [PASS]
> > >
> > > # of passed: 7
> > > # of failed: 0
> > > # of unresolved: 0
> > > # of untested: 0
> > > # of unsupported: 0
> > > # of xfailed: 0
> > > # of undefined(test bug): 0
> >
> > BugLink: https://github.com/iovisor/bcc/issues/1072
> > Signed-off-by: Alban Crequy <alban@...volk.io>
>
> Looks good to me.
>
> Acked-by: Masami Hiramatsu <mhiramat@...nel.org>
>
Applied, thanks!
-- Steve
Powered by blists - more mailing lists