[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87ft6r4bgd.wl-maz@kernel.org>
Date: Tue, 06 Oct 2020 16:32:18 +0100
From: Marc Zyngier <maz@...nel.org>
To: Alexandru Elisei <alexandru.elisei@....com>
Cc: linux-arm-kernel@...ts.infradead.org, kvmarm@...ts.cs.columbia.edu,
linux-kernel@...r.kernel.org, james.morse@....com,
julien.thierry.kdev@...il.com, suzuki.poulose@....com,
catalin.marinas@....com, will@...nel.org, mark.rutland@....com
Subject: Re: [PATCH] perf: arm_spe: Use Inner Shareable DSB when draining the buffer
Hi Alex,
On Tue, 06 Oct 2020 16:05:20 +0100,
Alexandru Elisei <alexandru.elisei@....com> wrote:
>
> From ARM DDI 0487F.b, page D9-2807:
>
> "Although the Statistical Profiling Extension acts as another observer in
> the system, for determining the Shareability domain of the DSB
> instructions, the writes of sample records are treated as coming from the
> PE that is being profiled."
>
> Similarly, on page D9-2801:
>
> "The memory type and attributes that are used for a write by the
> Statistical Profiling Extension to the Profiling Buffer is taken from the
> translation table entries for the virtual address being written to. That
> is:
> - The writes are treated as coming from an observer that is coherent with
> all observers in the Shareability domain that is defined by the
> translation tables."
>
> All the PEs are in the Inner Shareable domain, use a DSB ISH to make sure
> writes to the profiling buffer have completed.
I'm a bit sceptical of this change. The SPE writes are per-CPU, and
all we are trying to ensure is that the CPU we are running on has
drained its own queue of accesses.
The accesses being made within the IS domain doesn't invalidate the
fact that they are still per-CPU, because "the writes of sample
records are treated as coming from the PE that is being profiled.".
So why should we have an IS-wide synchronisation for accesses that are
purely local?
M.
--
Without deviation from the norm, progress is not possible.
Powered by blists - more mailing lists