Messages in this thread | | | Date | Fri, 25 Oct 2013 10:04:11 -0600 | From | David Ahern <> | Subject | Re: [PATCH] perf session: Add option to copy events when queueing |
| |
On 10/24/13 8:07 AM, Arnaldo Melo wrote: > What I thought was since we have to allocate memory _somewhere_ we could > size the ring buffer in such a way that it would be big enough for us to > leave those referenced entries there, not consumed, till we actually > consume them when reordering the events, and if we run out of space, the > kernel would just use LOST records, and not overwrite anything.
The tail pointer should only be moved up once all the events have been flushed from the ordered samples queue. Right now the tail is moved up when the event is read from the mmap (the patch in the other email thread withstanding). The problem is that we do not have any linkage between the event and the mmap that it came from; that information is lost when the event is added to the ordered samples queue.
David
| |