diff options
author | Changbin Du <[email protected]> | 2017-11-30 11:39:43 +0800 |
---|---|---|
committer | Steven Rostedt (VMware) <[email protected]> | 2017-12-04 06:52:08 -0500 |
commit | 90e406f96f630c07d631a021fd4af10aac913e77 (patch) | |
tree | 319adb71056132723eb24456850dcd55196a6623 /net/unix/sysctl_net_unix.c | |
parent | 250d0c7754aa37c6443f07f1f5f591e2806295d8 (diff) |
tracing: Allocate mask_str buffer dynamically
The default NR_CPUS can be very large, but actual possible nr_cpu_ids
usually is very small. For my x86 distribution, the NR_CPUS is 8192 and
nr_cpu_ids is 4. About 2 pages are wasted.
Most machines don't have so many CPUs, so define a array with NR_CPUS
just wastes memory. So let's allocate the buffer dynamically when need.
With this change, the mutext tracing_cpumask_update_lock also can be
removed now, which was used to protect mask_str.
Link: http://lkml.kernel.org/r/[email protected]
Fixes: 36dfe9252bd4c ("ftrace: make use of tracing_cpumask")
Cc: [email protected]
Signed-off-by: Changbin Du <[email protected]>
Signed-off-by: Steven Rostedt (VMware) <[email protected]>
Diffstat (limited to 'net/unix/sysctl_net_unix.c')
0 files changed, 0 insertions, 0 deletions