[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAOLDJO+8JApK5_qjtn+DhCnQoF+Lp-x1KP_QQvJUqecp744T1w@mail.gmail.com>
Date: Tue, 23 Sep 2025 13:07:57 +0200
From: Varad Gautam <varadgautam@...gle.com>
To: Arnd Bergmann <arnd@...db.de>
Cc: Linux-Arch <linux-arch@...r.kernel.org>,
Sai Prakash Ranjan <quic_saipraka@...cinc.com>, linux-kernel@...r.kernel.org,
stable@...r.kernel.org
Subject: Re: [PATCH] asm-generic/io.h: Skip trace helpers if rwmmio events are disabled
Hey Arnd,
On Sat, Jul 26, 2025 at 6:22 PM Arnd Bergmann <arnd@...db.de> wrote:
>
> On Thu, Jul 24, 2025, at 13:49, Varad Gautam wrote:
> > On Wed, May 28, 2025 at 5:28 PM Varad Gautam <varadgautam@...gle.com> wrote:
> >>
> >> On Mon, Apr 28, 2025 at 9:41 PM Varad Gautam <varadgautam@...gle.com> wrote:
> >> >
> >> > On Mon, Apr 7, 2025 at 6:13 PM Varad Gautam <varadgautam@...gle.com> wrote:
> >> > >
> >> > > On Sun, Mar 30, 2025 at 6:42 PM Varad Gautam <varadgautam@...gle.com> wrote:
> >> > > >
> >> > > > With `CONFIG_TRACE_MMIO_ACCESS=y`, the `{read,write}{b,w,l,q}{_relaxed}()`
> >> > > > mmio accessors unconditionally call `log_{post_}{read,write}_mmio()`
> >> > > > helpers, which in turn call the ftrace ops for `rwmmio` trace events
> >> > > >
> >> > > > This adds a performance penalty per mmio accessor call, even when
> >> > > > `rwmmio` events are disabled at runtime (~80% overhead on local
> >> > > > measurement).
> >> > > >
> >> > > > Guard these with `tracepoint_enabled()`.
> >> > > >
> >> > > > Signed-off-by: Varad Gautam <varadgautam@...gle.com>
> >> > > > Fixes: 210031971cdd ("asm-generic/io: Add logging support for MMIO accessors")
> >> > > > Cc: <stable@...r.kernel.org>
> >> > >
> >> > > Ping.
> >> > >
> >> >
> >> > Ping.
> >> >
> >>
> >> Ping. Arnd, can this be picked up into the asm-generic tree?
> >>
> >
> > Ping.
>
> I'm sorry I keep missing this one. It's really too late again for
> the merge window, so it won't be in 6.17 either, but I've applied
> it locally in my asm-generic branch that I'm planning for 6.18
> so I hope I won't miss it again.
>
Can I follow this along somewhere? (I don't see it on arnd/asm-generic.git atm.)
The unnecessary log_*_mmio() calls are showing up on enough Pixel devices
as a CPU cycles wastage, and I'm sure other Androids see it too.
Thanks,
Varad
> I currently have nothing queued up for 6.17 at all, but I already
> have some of my own patches that I plan to submit for review after
> the merge window and merge through the asm-generic tree.
>
> Arnd
Powered by blists - more mailing lists