Re: [PATCH v6 1/3] trace: Make removal of ring buffer pages atomic

From: Steven Rostedt
Date: Thu May 03 2012 - 08:57:18 EST


On Wed, 2012-05-02 at 23:40 -0700, Vaibhav Nagarnaik wrote:
> On Wed, May 2, 2012 at 6:55 PM, Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:
> > Hmm, something in this patch breaks buffers_size_kb and friends.
>
> I checked and I guess you are referring to the initial state of the
> buffer_size_kb, which returns:
> 0 (expanded: 1408)
> instead of:
> 7 (expanded: 1408)
>

No I realized that. That changed with your other patch.

> I found this got in with the earlier patch which added per-cpu
> buffer_size_kb. I will send a small fix-up patch for it.

Yeah, probably should send a fix for that.

>
> After expanding the ring buffer to various sizes, I couldn't find any
> other breakage. Is there any other behavior that you saw as odd?

The issue I see seems to trigger with trace-cmd:

[root@ixf ~]# cat /debug/tracing/buffer_size_kb
0 (expanded: 1408)
[root@ixf ~]# trace-cmd start -e sched
/debug/tracing/events/sched/filter
/debug/tracing/events/*/sched/filter
[root@ixf ~]# cat /debug/tracing/buffer_size_kb
0

But if I enable it via the command line it works:

[root@ixf ~]# cat /debug/tracing/buffer_size_kb
0 (expanded: 1408)
[root@ixf ~]# echo 1 > /debug/tracing/events/sched/enable
[root@ixf ~]# cat /debug/tracing/buffer_size_kb
1408


Without your patch:

[root@ixf ~]# cat /debug/tracing/buffer_size_kb
0 (expanded: 1408)
[root@ixf ~]# trace-cmd start -e sched
/debug/tracing/events/sched/filter
/debug/tracing/events/*/sched/filter
[root@ixf ~]# cat /debug/tracing/buffer_size_kb
1408


So it seems to be trace-cmd doing something different that prevents the
expand from happening. Not sure what it is. If I get time, I'll
investigate it a little more.

Thanks,

-- Steve


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/