aboutsummaryrefslogtreecommitdiff
path: root/kernel/kprobes.c
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2009-03-11 22:00:13 -0400
committerSteven Rostedt <srostedt@redhat.com>2009-03-11 22:15:27 -0400
commit554f786e284a6ce859d51f62240d615603944c8e (patch)
treed3710f97dac93861b3ff1f389276e643798f9b2e /kernel/kprobes.c
parent9aba60fe6eb20453de53a572143bef22fa929fba (diff)
ring-buffer: only allocate buffers for online cpus
Impact: save on memory Currently, a ring buffer was allocated for each "possible_cpus". On some systems, this is the same as NR_CPUS. Thus, if a system defined NR_CPUS = 64 but it only had 1 CPU, we could have possibly 63 useless ring buffers taking up space. With a default buffer of 3 megs, this could be quite drastic. This patch changes the ring buffer code to only allocate ring buffers for online CPUs. If a CPU goes off line, we do not free the buffer. This is because the user may still have trace data in that buffer that they would like to look at. Perhaps in the future we could add code to delete a ring buffer if the CPU is offline and the ring buffer becomes empty. Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Diffstat (limited to 'kernel/kprobes.c')
0 files changed, 0 insertions, 0 deletions