On Thu, 6 Mar 2025 at 08:53, Ankur Arora <ankur.a.arora@xxxxxxxxxx> wrote: > > > Catalin Marinas <catalin.marinas@xxxxxxx> writes: > > > On Mon, Feb 03, 2025 at 01:49:08PM -0800, Ankur Arora wrote: > >> Add smp_cond_load_relaxed_timewait(), a timed variant of > >> smp_cond_load_relaxed(). This is useful for cases where we want to > >> wait on a conditional variable but don't want to wait indefinitely. > > > > Bikeshedding: why not "timeout" rather than "timewait"? > > Well my reasons, such as they are, also involved a fair amount of bikeshedding: > > - timewait and spinwait have same length names which just minimized all > the indentation issues. > - timeout seems to suggest a timing mechanism of some kind. I would also be in favor of timewait naming, since this is not a generic timeout primitive, the alternative naming is useful to distinguish it. The wait can be off by 100us or so for arm64 when we need to break out but that's tolerable for some cases. I've also taken a copy of the thing in [0] so it can begin using the in-tree implementation once it's merged. [0]: https://lore.kernel.org/bpf/20250303152305.3195648-9-memxor@xxxxxxxxx > > [...]