On Tue, 29 Jun 2021 17:34:06 -0700 Paul Burton paulburton@google.com wrote:
On 64 bit systems this will increase the size of tgid_map from 256KiB to 16MiB. Whilst this 64x increase in memory overhead sounds significant 64 bit systems are presumably best placed to accommodate it, and since tgid_map is only allocated when the record-tgid option is actually used presumably the user would rather it spends sufficient memory to actually record the tgids they expect.
NAK. Please see how I fixed this for the saved_cmdlines, and implement it the same way.
785e3c0a3a87 ("tracing: Map all PIDs to command lines")
It's a cache, it doesn't need to save everything.
-- Steve
The size of tgid_map will also increase for CONFIG_BASE_SMALL=y configurations, but these seem unlikely to be systems upon which people are running ftrace with record-tgid anyway.