From: Steven Rostedt <rostedt@goodmis.org>
To: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Alban Crequy <alban.crequy@gmail.com>,
Alban Crequy <alban@kinvolk.io>,
Alexei Starovoitov <ast@kernel.org>,
Jonathan Corbet <corbet@lwn.net>, Ingo Molnar <mingo@redhat.com>,
Shuah Khan <shuah@kernel.org>,
Arnaldo Carvalho de Melo <acme@redhat.com>,
Omar Sandoval <osandov@fb.com>, Anton Blanchard <anton@samba.org>,
linux-doc@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
iago@kinvolk.io, michael@kinvolk.io, lukasz.dorau@intel.com,
vitalii.chernookyi@intel.com, marcin.slusarz@intel.com,
sarah.jelinek@intel.com, gabor.buella@intel.com
Subject: Re: [PATCH v3] tracing/kprobes: expose maxactive for kretprobe in kprobe_events
Date: Tue, 4 Apr 2017 10:32:53 -0400 [thread overview]
Message-ID: <20170404103253.11d03dc1@gandalf.local.home> (raw)
In-Reply-To: <20170404202459.6ca0e044df141602fe7033f9@kernel.org>
On Tue, 4 Apr 2017 20:24:59 +0900
Masami Hiramatsu <mhiramat@kernel.org> wrote:
> On Mon, 3 Apr 2017 12:36:22 +0200
> Alban Crequy <alban.crequy@gmail.com> wrote:
>
> > From: Alban Crequy <alban@kinvolk.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@kinvolk.io>
>
> Looks good to me.
>
> Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
>
Applied, thanks!
-- Steve
prev parent reply other threads:[~2017-04-04 14:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-03 10:36 [PATCH v3] tracing/kprobes: expose maxactive for kretprobe in kprobe_events Alban Crequy
2017-04-04 11:24 ` Masami Hiramatsu
2017-04-04 14:32 ` Steven Rostedt [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170404103253.11d03dc1@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=acme@redhat.com \
--cc=alban.crequy@gmail.com \
--cc=alban@kinvolk.io \
--cc=anton@samba.org \
--cc=ast@kernel.org \
--cc=corbet@lwn.net \
--cc=gabor.buella@intel.com \
--cc=iago@kinvolk.io \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=lukasz.dorau@intel.com \
--cc=marcin.slusarz@intel.com \
--cc=mhiramat@kernel.org \
--cc=michael@kinvolk.io \
--cc=mingo@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=osandov@fb.com \
--cc=sarah.jelinek@intel.com \
--cc=shuah@kernel.org \
--cc=vitalii.chernookyi@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox