Re: [PATCH v9 01/12] asm-generic: barrier: Add smp_cond_load_relaxed_timeout()

From: David Laight

Date: Sat Feb 14 2026 - 06:31:57 EST


On Fri, 13 Feb 2026 20:58:08 -0800
Ankur Arora <ankur.a.arora@xxxxxxxxxx> wrote:

> David Laight <david.laight.linux@xxxxxxxxx> writes:
...
> > Plus the cost of evaluating cond_expr 200 times.
> > I guess that isn't expected to contain a PCIe read :-)
>
> :). Good point. I'll see if I can add something like "when polling on
> a memory address".

I've only timed PCIe reads into an fpga (Cyclone V) target, but those
are about 1 micro-second - which is a lot of clocks.
Hard logic will be somewhat faster - but still slow.

There might be other places where 200 isn't a good value.
Perhaps add an extra #define that drops in the loop count?

David