Re: Rotation of instance traces

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 18 Feb 2022 14:22:16 -0500
Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:

> Now to be able to do things like splice, and zero copy from the ring
> buffer, when you read the ring buffer it swaps out a sub buffer from the
> writable portion of the ring buffer and makes it into the "reader_page".
> The reader page is now own by the reader, and will never be written to.

I need to correct that statement about never being written to. It can be.
If the current write head is on the page as it gets swapped out and becomes
the reader page. A new write will happen on the reader page, but once the
writer walks off the reader page and into the main ring buffer, it will
never touch the reader page again.

The read logic detects this, and will do copies of the page to send it to
the user as it can not give the page itself to the user with the writer
still on it.

-- Steve




[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux