diff options
author | Vaibhav Nagarnaik <[email protected]> | 2011-06-13 17:51:57 -0700 |
---|---|---|
committer | Steven Rostedt <[email protected]> | 2011-06-14 22:48:37 -0400 |
commit | 4f271a2a60c748599b30bb4dafff30d770439b96 (patch) | |
tree | 4b6aa671e0fbe3e81a423a551ce5aa1032725e2b /lib/mpi/mpiutil.c | |
parent | 7ea5906405a1f3fc1c0033dfd7e02f2cfd1de5e5 (diff) |
tracing: Add a proc file to stop tracing and free buffer
The proc file entry buffer_size_kb is used to set the size of tracing
buffer. The memory to expand the buffer size is kernel memory. Consider
a use case where tracing is handled by a user space utility, which acts
as a gate keeper for tracing requests. In an OOM condition, tracing is
considered a low priority task and if the utility gets killed the ring
buffer memory cannot be released back to the kernel.
This patch adds a proc file called "free_buffer" whose purpose is to
stop tracing and free up the ring buffer when it is closed.
The user space process can then set the desired size in buffer_size_kb
file and open the fd to the "free_buffer" file. Under OOM condition, if
the process gets killed, the kernel closes the file descriptor. The
release handler stops the tracing and releases the kernel memory
automatically.
Cc: Ingo Molnar <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Michael Rubin <[email protected]>
Cc: David Sharp <[email protected]>
Signed-off-by: Vaibhav Nagarnaik <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Steven Rostedt <[email protected]>
Diffstat (limited to 'lib/mpi/mpiutil.c')
0 files changed, 0 insertions, 0 deletions