All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tracing: Fix file mode of free_buffer
@ 2013-05-26  8:52 Wang YanQing
  2013-05-28 19:31 ` Steven Rostedt
  2013-05-28 19:34 ` Vaibhav Nagarnaik
  0 siblings, 2 replies; 5+ messages in thread
From: Wang YanQing @ 2013-05-26  8:52 UTC (permalink / raw)
  To: rostedt; +Cc: fweisbec, mingo, linux-kernel, vnagarnaik

Commit 4f271a2a60c748599b30bb4dafff30d770439b96
(tracing: Add a proc file to stop tracing and free buffer)
implement a method to free up ring buffer in kernel memory
in the release code path of free_buffer's fd.

Then we don't need read/write support for free_buffer,
indeed we just have a dummy write fop, and don't implement read fop.

So the 0200 is more reasonable file mode for free_buffer than
the current file mode 0644.

Signed-off-by: Wang YanQing <udknight@gmail.com>
---
 kernel/trace/trace.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index ae6fa2d..02d9875 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -5927,7 +5927,7 @@ init_tracer_debugfs(struct trace_array *tr, struct dentry *d_tracer)
 	trace_create_file("buffer_total_size_kb", 0444, d_tracer,
 			  tr, &tracing_total_entries_fops);
 
-	trace_create_file("free_buffer", 0644, d_tracer,
+	trace_create_file("free_buffer", 0200, d_tracer,
 			  tr, &tracing_free_buffer_fops);
 
 	trace_create_file("trace_marker", 0220, d_tracer,
-- 
1.7.12.4.dirty

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] tracing: Fix file mode of free_buffer
  2013-05-26  8:52 [PATCH] tracing: Fix file mode of free_buffer Wang YanQing
@ 2013-05-28 19:31 ` Steven Rostedt
  2013-05-28 19:34 ` Vaibhav Nagarnaik
  1 sibling, 0 replies; 5+ messages in thread
From: Steven Rostedt @ 2013-05-28 19:31 UTC (permalink / raw)
  To: Wang YanQing; +Cc: fweisbec, mingo, linux-kernel, vnagarnaik, David Sharp

David, Vaibhav,

Any comments on this patch?

-- Steve


On Sun, 2013-05-26 at 16:52 +0800, Wang YanQing wrote:
> Commit 4f271a2a60c748599b30bb4dafff30d770439b96
> (tracing: Add a proc file to stop tracing and free buffer)
> implement a method to free up ring buffer in kernel memory
> in the release code path of free_buffer's fd.
> 
> Then we don't need read/write support for free_buffer,
> indeed we just have a dummy write fop, and don't implement read fop.
> 
> So the 0200 is more reasonable file mode for free_buffer than
> the current file mode 0644.
> 
> Signed-off-by: Wang YanQing <udknight@gmail.com>
> ---
>  kernel/trace/trace.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
> index ae6fa2d..02d9875 100644
> --- a/kernel/trace/trace.c
> +++ b/kernel/trace/trace.c
> @@ -5927,7 +5927,7 @@ init_tracer_debugfs(struct trace_array *tr, struct dentry *d_tracer)
>  	trace_create_file("buffer_total_size_kb", 0444, d_tracer,
>  			  tr, &tracing_total_entries_fops);
>  
> -	trace_create_file("free_buffer", 0644, d_tracer,
> +	trace_create_file("free_buffer", 0200, d_tracer,
>  			  tr, &tracing_free_buffer_fops);
>  
>  	trace_create_file("trace_marker", 0220, d_tracer,



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] tracing: Fix file mode of free_buffer
  2013-05-26  8:52 [PATCH] tracing: Fix file mode of free_buffer Wang YanQing
  2013-05-28 19:31 ` Steven Rostedt
@ 2013-05-28 19:34 ` Vaibhav Nagarnaik
  2013-05-28 20:14   ` David Sharp
  1 sibling, 1 reply; 5+ messages in thread
From: Vaibhav Nagarnaik @ 2013-05-28 19:34 UTC (permalink / raw)
  To: Wang YanQing, Steven Rostedt, Frédéric Weisbecker,
	Ingo Molnar, linux-kernel, Vaibhav Nagarnaik

On Sun, May 26, 2013 at 1:52 AM, Wang YanQing <udknight@gmail.com> wrote:
> Commit 4f271a2a60c748599b30bb4dafff30d770439b96
> (tracing: Add a proc file to stop tracing and free buffer)
> implement a method to free up ring buffer in kernel memory
> in the release code path of free_buffer's fd.
>
> Then we don't need read/write support for free_buffer,
> indeed we just have a dummy write fop, and don't implement read fop.
>
> So the 0200 is more reasonable file mode for free_buffer than
> the current file mode 0644.
>
> Signed-off-by: Wang YanQing <udknight@gmail.com>

Acked-by: Vaibhav Nagarnaik <vnagarnaik@google.com>

Vaibhav Nagarnaik


> ---
>  kernel/trace/trace.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
> index ae6fa2d..02d9875 100644
> --- a/kernel/trace/trace.c
> +++ b/kernel/trace/trace.c
> @@ -5927,7 +5927,7 @@ init_tracer_debugfs(struct trace_array *tr, struct dentry *d_tracer)
>         trace_create_file("buffer_total_size_kb", 0444, d_tracer,
>                           tr, &tracing_total_entries_fops);
>
> -       trace_create_file("free_buffer", 0644, d_tracer,
> +       trace_create_file("free_buffer", 0200, d_tracer,
>                           tr, &tracing_free_buffer_fops);
>
>         trace_create_file("trace_marker", 0220, d_tracer,
> --
> 1.7.12.4.dirty

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] tracing: Fix file mode of free_buffer
  2013-05-28 19:34 ` Vaibhav Nagarnaik
@ 2013-05-28 20:14   ` David Sharp
  2013-05-29  0:04     ` Steven Rostedt
  0 siblings, 1 reply; 5+ messages in thread
From: David Sharp @ 2013-05-28 20:14 UTC (permalink / raw)
  To: Vaibhav Nagarnaik
  Cc: Wang YanQing, Steven Rostedt, Frédéric Weisbecker,
	Ingo Molnar, linux-kernel

On Tue, May 28, 2013 at 12:34 PM, Vaibhav Nagarnaik
<vnagarnaik@google.com> wrote:
> On Sun, May 26, 2013 at 1:52 AM, Wang YanQing <udknight@gmail.com> wrote:
>> Commit 4f271a2a60c748599b30bb4dafff30d770439b96
>> (tracing: Add a proc file to stop tracing and free buffer)
>> implement a method to free up ring buffer in kernel memory
>> in the release code path of free_buffer's fd.
>>
>> Then we don't need read/write support for free_buffer,
>> indeed we just have a dummy write fop, and don't implement read fop.
>>
>> So the 0200 is more reasonable file mode for free_buffer than
>> the current file mode 0644.
>>
>> Signed-off-by: Wang YanQing <udknight@gmail.com>
>
> Acked-by: Vaibhav Nagarnaik <vnagarnaik@google.com>

Acked-by: David Sharp <dhsharp@google.com>

>
> Vaibhav Nagarnaik
>
>
>> ---
>>  kernel/trace/trace.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
>> index ae6fa2d..02d9875 100644
>> --- a/kernel/trace/trace.c
>> +++ b/kernel/trace/trace.c
>> @@ -5927,7 +5927,7 @@ init_tracer_debugfs(struct trace_array *tr, struct dentry *d_tracer)
>>         trace_create_file("buffer_total_size_kb", 0444, d_tracer,
>>                           tr, &tracing_total_entries_fops);
>>
>> -       trace_create_file("free_buffer", 0644, d_tracer,
>> +       trace_create_file("free_buffer", 0200, d_tracer,
>>                           tr, &tracing_free_buffer_fops);
>>
>>         trace_create_file("trace_marker", 0220, d_tracer,
>> --
>> 1.7.12.4.dirty
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] tracing: Fix file mode of free_buffer
  2013-05-28 20:14   ` David Sharp
@ 2013-05-29  0:04     ` Steven Rostedt
  0 siblings, 0 replies; 5+ messages in thread
From: Steven Rostedt @ 2013-05-29  0:04 UTC (permalink / raw)
  To: David Sharp
  Cc: Vaibhav Nagarnaik, Wang YanQing, Frédéric Weisbecker,
	Ingo Molnar, linux-kernel

On Tue, 2013-05-28 at 13:14 -0700, David Sharp wrote:
> On Tue, May 28, 2013 at 12:34 PM, Vaibhav Nagarnaik
> <vnagarnaik@google.com> wrote:
> > On Sun, May 26, 2013 at 1:52 AM, Wang YanQing <udknight@gmail.com> wrote:
> >> Commit 4f271a2a60c748599b30bb4dafff30d770439b96
> >> (tracing: Add a proc file to stop tracing and free buffer)
> >> implement a method to free up ring buffer in kernel memory
> >> in the release code path of free_buffer's fd.
> >>
> >> Then we don't need read/write support for free_buffer,
> >> indeed we just have a dummy write fop, and don't implement read fop.
> >>
> >> So the 0200 is more reasonable file mode for free_buffer than
> >> the current file mode 0644.
> >>
> >> Signed-off-by: Wang YanQing <udknight@gmail.com>
> >
> > Acked-by: Vaibhav Nagarnaik <vnagarnaik@google.com>
> 
> Acked-by: David Sharp <dhsharp@google.com>
> 
> >

Thanks guys,

As this isn't that big of a deal, I'm going to just queue this for 3.11.

-- Steve



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-05-29  0:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-26  8:52 [PATCH] tracing: Fix file mode of free_buffer Wang YanQing
2013-05-28 19:31 ` Steven Rostedt
2013-05-28 19:34 ` Vaibhav Nagarnaik
2013-05-28 20:14   ` David Sharp
2013-05-29  0:04     ` Steven Rostedt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.