Re: [RFC PATCH] LTTng relay buffer allocation, read, write

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Steven Rostedt
Date: Monday, September 29, 2008 - 2:24 pm

On Mon, 29 Sep 2008, Mathieu Desnoyers wrote:

Only on the reader side.


Agree, we can do better than that.


yep


Remember, I plan on supporting two modes. An iterator mode and a consumer 
producer mode. Do you have an iterator mode? That's what most of the
ftrace tools use.

The iterator mode will disable writing and use the "peek" mode. The
consumer mode will not, and have its own ways to read. As is right
now in the buffer code.


Perhaps we can look at this for v2.


I do that too. Yes I have duplicate info. But I still like the robustness
of the padding event.


False. It is a "special" event that can actually be in 4 bytes. Which is
what would be wasted anyway. Lenght is ignored by the padding event. Its
basically just another way to make sure we are not reading useless data.

From the rb_event_length function:

+       switch (event->type) {
+       case RINGBUF_TYPE_PADDING:
+               /* undefined */
+               return -1;



False as described above.


A 4 byte dataless payload is useless anyway.


Only for dataless events.


I rather keep the page headers out of the buffer. Let the tracer expose 
it.


Create something special for >page_size events. Those are not the norm
anyway.


This sounds like something special, and can be done with something 
different. No, I don't want the ring buffer infrastructure to be complex 
mechanism that can do everything. It should be a generic infrastructure 
that does what 99% of the tracers want to do. And 100% of those tracers 
want to record something smaller than a page size.


Again, make a special tracer for this. This is not the common case, and
I really don't care about it.



Only need to handle writes in stack order (interrupts and nmis). I'll move 
the tail index into the page itself, and then we can do atomic operations 
on both uping the tail and moving the tail page pointer. This will work 
nicely.



Heh, I was thinking of doing the same thing in the page frame. Sounds
like this is growing into what you did. See, I told you that it will.
Just wait for v2 ;-)


Actually, I plan on pushing all the work to the reader. The writer will 
have full speed.  I'm not going to worry about it now, I'm pretty sure we 
have the infrastructure in place to make it happen. Another reason I don't 
want the ring buffer to interface with the user land directly is because 
it lets us change it without worrying.

Remember, there is no internal kernel backward compatibility ;-)

-- Steve

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC PATCH] LTTng relay buffer allocation, read, write, Mathieu Desnoyers, (Sat Sep 27, 6:40 am)
Re: [RFC PATCH] LTTng relay buffer allocation, read, write, Peter Zijlstra, (Sat Sep 27, 10:10 am)
Re: [RFC PATCH] LTTng relay buffer allocation, read, write, Peter Zijlstra, (Sun Sep 28, 1:59 am)
Re: [RFC PATCH] LTTng relay buffer allocation, read, write, Mathieu Desnoyers, (Mon Sep 29, 8:50 am)
Re: [RFC PATCH] LTTng relay buffer allocation, read, write, Mathieu Desnoyers, (Mon Sep 29, 9:06 am)
Re: [RFC PATCH] LTTng relay buffer allocation, read, write, Steven Rostedt, (Mon Sep 29, 9:38 am)
Re: [RFC PATCH] LTTng relay buffer allocation, read, write, Peter Zijlstra, (Mon Sep 29, 10:30 am)
Re: [RFC PATCH] LTTng relay buffer allocation, read, write, Mathieu Desnoyers, (Mon Sep 29, 11:38 am)
Re: [RFC PATCH] LTTng relay buffer allocation, read, write, Steven Rostedt, (Mon Sep 29, 12:40 pm)
Re: [RFC PATCH] LTTng relay buffer allocation, read, write, Steven Rostedt, (Mon Sep 29, 12:54 pm)
Re: [RFC PATCH] LTTng relay buffer allocation, read, write, Mathieu Desnoyers, (Mon Sep 29, 1:31 pm)
Re: [RFC PATCH] LTTng relay buffer allocation, read, write, Steven Rostedt, (Mon Sep 29, 2:24 pm)
Re: [RFC PATCH] LTTng relay buffer allocation, read, write, Mathieu Desnoyers, (Tue Sep 30, 11:14 am)
Re: [RFC PATCH] LTTng relay buffer allocation, read, write, Steven Rostedt, (Tue Sep 30, 11:22 am)
Re: [RFC PATCH] LTTng relay buffer allocation, read, write, Mathieu Desnoyers, (Tue Sep 30, 11:35 am)
Re: [RFC PATCH] LTTng relay buffer allocation, read, write, Steven Rostedt, (Tue Sep 30, 12:43 pm)
Re: [RFC PATCH] LTTng relay buffer allocation, read, write, Mathieu Desnoyers, (Tue Sep 30, 12:54 pm)
Re: [RFC PATCH] LTTng relay buffer allocation, read, write, Frank Ch. Eigler, (Tue Sep 30, 1:01 pm)
Re: [RFC PATCH] LTTng relay buffer allocation, read, write, Steven Rostedt, (Tue Sep 30, 1:21 pm)
Re: [RFC PATCH] LTTng relay buffer allocation, read, write, Mathieu Desnoyers, (Tue Sep 30, 1:55 pm)