[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20240209082552.1ab5c9b1@rorschach.local.home>
Date: Fri, 9 Feb 2024 08:25:52 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: Vincent Donnefort <vdonnefort@...gle.com>
Cc: mhiramat@...nel.org, linux-kernel@...r.kernel.org,
linux-trace-kernel@...r.kernel.org, mathieu.desnoyers@...icios.com,
kernel-team@...roid.com
Subject: Re: [PATCH v15 2/6] ring-buffer: Introducing ring-buffer mapping
functions
On Fri, 9 Feb 2024 10:21:58 +0000
Vincent Donnefort <vdonnefort@...gle.com> wrote:
> +static void rb_update_meta_page(struct ring_buffer_per_cpu *cpu_buffer)
> +{
> + struct trace_buffer_meta *meta = cpu_buffer->meta_page;
> +
> + WRITE_ONCE(meta->reader.read, cpu_buffer->reader_page->read);
> + WRITE_ONCE(meta->reader.id, cpu_buffer->reader_page->id);
> + WRITE_ONCE(meta->reader.lost_events, cpu_buffer->lost_events);
> +
> + WRITE_ONCE(meta->entries, local_read(&cpu_buffer->entries));
> + WRITE_ONCE(meta->overrun, local_read(&cpu_buffer->overrun));
> + WRITE_ONCE(meta->read, cpu_buffer->read);
> +
Small nit, but we should add a comment to the two flush_dache_folio() calls:
/* Some archs do not have data cache coherency between kernel and user space */
> + flush_dcache_folio(virt_to_folio(cpu_buffer->meta_page));
> +}
> +
-- Steve
Powered by blists - more mailing lists