From: Vincent Donnefort <vincent.donnefort@arm.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: <linux-trace-devel@vger.kernel.org>
Subject: Re: [PATCH 2/2] trace-cmd: Add an option to set saved_cmdlines_size
Date: Tue, 12 Nov 2019 19:01:02 +0000 [thread overview]
Message-ID: <20191112190101.GA178419@e120877-lin.cambridge.arm.com> (raw)
In-Reply-To: <20191112094037.651a156f@gandalf.local.home>
On Tue, Nov 12, 2019 at 09:40:37AM -0500, Steven Rostedt wrote:
> On Tue, 12 Nov 2019 12:03:15 +0000
> Vincent Donnefort <vincent.donnefort@arm.com> wrote:
>
> > Hi Steve,
> >
> > Thank you for your review. I also thought that we could avoid having a new
> > option and try to write /proc/sys/kernel/threads-max into saved_cmdlines_size,
> > before recording the trace. Do you think that would be a more suitable
> > solution?
>
> That's an interesting approach. I still think that having a parameter
> would be good as well, but then use the threads-max approach if one is
> not supplied.
>
> -- Steve
This was not a good idea in the end. We can't rely on the sysctl entries
threads-max or pid_max, as the pid/comm map is static and the maximum is
defined by PID_MAX_DEFAULT. I do not see any way of getting this value from
user-space.
We could though, as an alternative, use a hard-coded value of 32768 for
--cmdlines-size. Without being perfect, this should still be true for most of
the systems. PID_MAX_DEFAULT depends on CONFIG_BASE_SMALL and hasn't changed
since Linux started using Git.
--
Vincent
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
next prev parent reply other threads:[~2019-11-12 19:03 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-07 10:51 [PATCH 1/2] trace-cmd: Enable kptr_restrict vincent.donnefort
2019-11-07 10:51 ` [PATCH 2/2] trace-cmd: Add an option to set saved_cmdlines_size vincent.donnefort
2019-11-11 22:52 ` Steven Rostedt
2019-11-12 12:03 ` Vincent Donnefort
2019-11-12 14:40 ` Steven Rostedt
2019-11-12 19:01 ` Vincent Donnefort [this message]
2019-11-12 19:09 ` Steven Rostedt
2019-11-13 12:14 ` [PATCH v2 1/2] trace-cmd: Enable kptr_restrict vincent.donnefort
2019-11-13 12:14 ` [PATCH v2 2/2] trace-cmd: Add an option to set saved_cmdlines_size vincent.donnefort
2019-11-13 12:27 ` [PATCH " Vincent Donnefort
2019-11-13 15:08 ` Steven Rostedt
2019-11-12 12:03 ` [PATCH v2 1/2] trace-cmd: Enable kptr_restrict vincent.donnefort
2019-11-12 12:03 ` [PATCH v2 2/2] trace-cmd: Add an option to set saved_cmdlines_size vincent.donnefort
2019-11-11 22:47 ` [PATCH 1/2] trace-cmd: Enable kptr_restrict Steven Rostedt
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=20191112190101.GA178419@e120877-lin.cambridge.arm.com \
--to=vincent.donnefort@arm.com \
--cc=linux-trace-devel@vger.kernel.org \
--cc=rostedt@goodmis.org \
/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;
as well as URLs for NNTP newsgroup(s).