[lkml]   [2011]   [Jun]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 03/16 v2] tracing: Add a proc file to stop tracing and free buffer
On Wed, Jun 15, 2011 at 09:48:44AM -0400, Steven Rostedt wrote:
> From: Vaibhav Nagarnaik <>
> 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 <>
> Cc: Frederic Weisbecker <>
> Cc: Michael Rubin <>
> Cc: David Sharp <>
> Signed-off-by: Vaibhav Nagarnaik <>
> Link:
> Signed-off-by: Steven Rostedt <>

s/proc/debugfs, right?

 \ /
  Last update: 2011-06-15 16:27    [W:0.107 / U:12.632 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site