From: Marc Zyngier <maz@kernel.org>
To: Catalin Marinas <catalin.marinas@arm.com>
Cc: linux-arm-kernel@lists.infradead.org,
kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org,
Will Deacon <will@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
James Morse <james.morse@arm.com>,
Suzuki K Poulose <suzuki.poulose@arm.com>,
Alexandru Elisei <alexandru.elisei@arm.com>,
Joey Gouly <joey.gouly@arm.com>,
kernel-team@android.com
Subject: Re: [PATCH v2 00/10] arm64: Add initial support for FEAT_WFxT
Date: Wed, 20 Apr 2022 19:50:27 +0100 [thread overview]
Message-ID: <87ilr3a8ss.wl-maz@kernel.org> (raw)
In-Reply-To: <YmBBz8yKPAWSHAJo@arm.com>
On Wed, 20 Apr 2022 18:24:31 +0100,
Catalin Marinas <catalin.marinas@arm.com> wrote:
>
> On Tue, Apr 19, 2022 at 07:27:45PM +0100, Marc Zyngier wrote:
> > A potential addition to this series would be to remove the event
> > generation from the counters, and rely on the timeout where it
> > matters (spinlocks?). Feedback welcome.
>
> I think we still need to keep the event generation around, at least for
> hardware bugs we don't know about. I don't think user-space rely on it
> though, people tend to come up with weird delays like isb ;). But yes,
> the WFET should be handy when it turns up in hardware.
My hope was that the trick of using the event generation to work
around systems failing to broadcast events could become a thing of the
past when WFET is present in the HW. After all, they serve the same
purpose (generate a local event to un-wedge the CPU).
But the more I look at it, the more I hate the potential solution. One
of the issues is that WFxT takes an absolute deadline, rather than a
relative one. So you end up with things like:
ISB
MRS x0, CNTVCT_EL0
ADD x0, x0, #some_small_value
WFET x0
which is really heavy handed for the slow path of an atomic operation.
Even if you have ECV and CNTVCTSS_EL0 (which allows you to get rid of
the ISB), it is a royal pain.
It would be much better if there was a *relative* version of WFET that
would directly take a timeout relative to the current virtual count,
but I can sense HW designers calling me names already, so I'll shut
up.
M.
--
Without deviation from the norm, progress is not possible.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
prev parent reply other threads:[~2022-04-20 18:51 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-19 18:27 [PATCH v2 00/10] arm64: Add initial support for FEAT_WFxT Marc Zyngier
2022-04-19 18:27 ` [PATCH v2 01/10] arm64: Expand ESR_ELx_WFx_ISS_TI to match its ARMv8.7 definition Marc Zyngier
2022-04-20 17:24 ` Catalin Marinas
2022-04-19 18:27 ` [PATCH v2 02/10] arm64: Add RV and RN fields for ESR_ELx_WFx_ISS Marc Zyngier
2022-04-20 17:25 ` Catalin Marinas
2022-04-19 18:27 ` [PATCH v2 03/10] KVM: arm64: Simplify kvm_cpu_has_pending_timer() Marc Zyngier
2022-04-19 18:27 ` [PATCH v2 04/10] KVM: arm64: Introduce kvm_counter_compute_delta() helper Marc Zyngier
2022-04-19 18:27 ` [PATCH v2 05/10] KVM: arm64: Handle blocking WFIT instruction Marc Zyngier
2022-04-19 18:27 ` [PATCH v2 06/10] KVM: arm64: Offer early resume for non-blocking WFxT instructions Marc Zyngier
2022-04-19 18:27 ` [PATCH v2 07/10] KVM: arm64: Expose the WFXT feature to guests Marc Zyngier
2022-04-20 17:46 ` Catalin Marinas
2022-04-19 18:27 ` [PATCH v2 08/10] arm64: Add HWCAP advertising FEAT_WFXT Marc Zyngier
2022-04-20 17:27 ` Catalin Marinas
2022-04-20 18:39 ` Marc Zyngier
2022-04-19 18:27 ` [PATCH v2 09/10] arm64: Add wfet()/wfit() helpers Marc Zyngier
2022-04-20 17:28 ` Catalin Marinas
2022-04-19 18:27 ` [PATCH v2 10/10] arm64: Use WFxT for __delay() when possible Marc Zyngier
2022-04-20 17:44 ` Catalin Marinas
2022-04-20 18:35 ` Marc Zyngier
2022-04-20 17:24 ` [PATCH v2 00/10] arm64: Add initial support for FEAT_WFxT Catalin Marinas
2022-04-20 18:50 ` Marc Zyngier [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ilr3a8ss.wl-maz@kernel.org \
--to=maz@kernel.org \
--cc=alexandru.elisei@arm.com \
--cc=catalin.marinas@arm.com \
--cc=james.morse@arm.com \
--cc=joey.gouly@arm.com \
--cc=kernel-team@android.com \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=mark.rutland@arm.com \
--cc=suzuki.poulose@arm.com \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).