Re: [PATCH 2/2] trace-cmd: Add an option to set saved_cmdlines_size

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 12 Nov 2019 19:01:02 +0000
Vincent Donnefort <vincent.donnefort@xxxxxxx> 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



[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux