Re: [PATCH v2] libtracefs: Add ring buffer memory mapping APIs

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

 



On Fri, 5 Jan 2024 15:29:06 -0500
Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:

> From: "Steven Rostedt (Google)" <rostedt@xxxxxxxxxxx>
> 
> Add the following APIs:
> 
>  tracefs_cpu_open_mapped()
>  tracefs_cpu_is_mapped()
>  tracefs_cpu_map()
>  tracefs_cpu_unmap()
> 
> This will allow applications to choose to memory map the tracing ring buffer
> if it is supported. This will improve the performance of tracefs_cpu_read()
> and tracefs_cpu_read_buf(), but it is not done by default because it will
> also hurt the performance of tracefs_cpu_buffered_read() and
> tracefs_cpu_buffered_read_buf() as those use splicing, and with the ring
> buffer memory mapped, the splice has to do a copy instead of a copyless
> subbuffer move.
> 
> Since this change relies on the libtraceevent APIs:
> 
>    kbuffer_dup()
>    kbuffer_subbuffer()
>    kbuffer_refresh()
>    kbuffer_read_buffer()
> 
> Which are available after version 1.8, up the minimum version to 1.8.
> 
> Note, the samples and utest rely on:
> 
>    tep_get_sub_buffer_data_size()
> 
> which is in 1.8.1.
> 
> Signed-off-by: Steven Rostedt (Google) <rostedt@xxxxxxxxxxx>
> ---
> Changes since v1: https://lore.kernel.org/linux-trace-devel/20231228201100.78aae259@xxxxxxxxxxxxxxxxxxxx

Updated the subject to say this is v2 :-p

-- Steve




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

  Powered by Linux