[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <eb567d99-e03b-4718-9cc9-e27c5e408ea2@amazon.com>
Date: Wed, 13 Dec 2023 01:35:16 +0100
From: Alexander Graf <graf@...zon.com>
To: Steven Rostedt <rostedt@...dmis.org>
CC: <linux-kernel@...r.kernel.org>,
<linux-trace-kernel@...r.kernel.org>, <linux-mm@...ck.org>,
<devicetree@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>,
<kexec@...ts.infradead.org>, <linux-doc@...r.kernel.org>,
<x86@...nel.org>, Eric Biederman <ebiederm@...ssion.com>,
"H. Peter Anvin" <hpa@...or.com>,
Andy Lutomirski <luto@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
Rob Herring <robh+dt@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Mark Rutland <mark.rutland@....com>,
Tom Lendacky <thomas.lendacky@....com>,
Ashish Kalra <ashish.kalra@....com>,
James Gowans <jgowans@...zon.com>,
"Stanislav Kinsburskii" <skinsburskii@...ux.microsoft.com>,
<arnd@...db.de>, <pbonzini@...hat.com>,
<madvenka@...ux.microsoft.com>,
Anthony Yznaga <anthony.yznaga@...cle.com>,
Usama Arif <usama.arif@...edance.com>,
"David Woodhouse" <dwmw@...zon.co.uk>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>
Subject: Re: [PATCH 08/15] tracing: Introduce names for ring buffers
Hi Steve,
On 13.12.23 01:15, Steven Rostedt wrote:
>
> On Wed, 13 Dec 2023 00:04:45 +0000
> Alexander Graf <graf@...zon.com> wrote:
>
>> With KHO (Kexec HandOver), we want to preserve trace buffers across
>> kexec. To carry over their state between kernels, the kernel needs a
>> common handle for them that exists on both sides. As handle we introduce
>> names for ring buffers. In a follow-up patch, the kernel can then use
>> these names to recover buffer contents for specific ring buffers.
>>
> Is there a way to use the trace_array name instead?
>
> The trace_array is the structure that represents each tracing instance. And
> it already has a name field. And if you can get the associated ring buffer
> from that too.
>
> struct trace_array *tr;
>
> tr->array_buffer.buffer
>
> tr->name
>
> When you do: mkdir /sys/kernel/tracing/instance/foo
>
> You create a new trace_array instance where tr->name = "foo" and allocates
> the buffer for it as well.
The name in the ring buffer is pretty much just a copy of the trace
array name. I use it to reconstruct which buffer we're actually
referring to inside __ring_buffer_alloc().
I'm all ears for alternative suggestions. I suppose we could pass tr as
argument to ring_buffer_alloc() instead of the name?
Alex
Amazon Development Center Germany GmbH
Krausenstr. 38
10117 Berlin
Geschaeftsfuehrung: Christian Schlaeger, Jonathan Weiss
Eingetragen am Amtsgericht Charlottenburg unter HRB 149173 B
Sitz: Berlin
Ust-ID: DE 289 237 879
Powered by blists - more mailing lists