[PATCH v8 01/11] cpuidle/poll_state: poll via smp_cond_load_relaxed()
Catalin Marinas
catalin.marinas at arm.com
Wed Oct 16 03:06:43 PDT 2024
On Tue, Oct 15, 2024 at 02:32:00PM -0700, Ankur Arora wrote:
> Catalin Marinas <catalin.marinas at arm.com> writes:
> > I'd say if you want
> > something like this, better introduce a new smp_cond_load_timeout()
> > API. The above looks like a hack that may only work on arm64 when the
> > event stream is enabled.
>
> I had a preliminary version of smp_cond_load_relaxed_timeout() here:
> https://lore.kernel.org/lkml/87edae3a1x.fsf@oracle.com/
>
> Even with an smp_cond_load_timeout(), we would need to fallback to
> something like the above for uarchs without WFxT.
Yes, the default/generic implementation would use cpu_relax(). For the
arm64 one, some combination of __cmpwait() and __delay() with the
fallback to cpu_relax().
--
Catalin
More information about the linux-arm-kernel
mailing list