From: Steven Rostedt <rostedt@goodmis.org>
To: Vincent Donnefort <vincent.donnefort@arm.com>
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 14:09:20 -0500 [thread overview]
Message-ID: <20191112140920.6bbed145@gandalf.local.home> (raw)
In-Reply-To: <20191112190101.GA178419@e120877-lin.cambridge.arm.com>
On Tue, 12 Nov 2019 19:01:02 +0000
Vincent Donnefort <vincent.donnefort@arm.com> wrote:
> 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.
But that does take up a bit of memory in the kernel, which isn't
probably needed. What we could do, is periodically record the contents
of the file, and update the map at the end of the record.
Perhaps I should even make it so that we can just get notifications
when it does get updated. But that would require a kernel change.
-- Steve
next prev parent reply other threads:[~2019-11-12 19:09 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
2019-11-12 19:09 ` Steven Rostedt [this message]
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=20191112140920.6bbed145@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=linux-trace-devel@vger.kernel.org \
--cc=vincent.donnefort@arm.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;
as well as URLs for NNTP newsgroup(s).