[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110615142523.GA17204@somewhere>
Date: Wed, 15 Jun 2011 16:25:27 +0200
From: Frederic Weisbecker <fweisbec@...il.com>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...e.hu>,
Andrew Morton <akpm@...ux-foundation.org>,
Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>,
Ingo Molnar <mingo@...hat.com>,
Michael Rubin <mrubin@...gle.com>,
David Sharp <dhsharp@...gle.com>,
Vaibhav Nagarnaik <vnagarnaik@...gle.com>
Subject: Re: [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 <vnagarnaik@...gle.com>
>
> 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 <mingo@...hat.com>
> Cc: Frederic Weisbecker <fweisbec@...il.com>
> Cc: Michael Rubin <mrubin@...gle.com>
> Cc: David Sharp <dhsharp@...gle.com>
> Signed-off-by: Vaibhav Nagarnaik <vnagarnaik@...gle.com>
> Link: http://lkml.kernel.org/r/1308012717-11148-1-git-send-email-vnagarnaik@google.com
> Signed-off-by: Steven Rostedt <rostedt@...dmis.org>
s/proc/debugfs, right?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists