linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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: Wed, 13 Nov 2019 12:27:35 +0000	[thread overview]
Message-ID: <20191113122735.GB318994@e120877-lin.cambridge.arm.com> (raw)
In-Reply-To: <20191112140920.6bbed145@gandalf.local.home>

On Tue, Nov 12, 2019 at 02:09:20PM -0500, Steven Rostedt wrote:
> 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

Hi Steve,

I then pushed an updated version covering your previous comments, small issues
and introducing the --cmdlines-size option without any default value.

Aside, apology for the disclaimer notice into the previous emails. This should
hopefully be gone by now.

-- 
Vincent

  parent reply	other threads:[~2019-11-13 12:27 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
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             ` Vincent Donnefort [this message]
2019-11-13 15:08               ` [PATCH " 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=20191113122735.GB318994@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).