linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Ankur Arora <ankur.a.arora@oracle.com>
To: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Cc: Ankur Arora <ankur.a.arora@oracle.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, arnd@arndb.de,
	will@kernel.org, peterz@infradead.org, mark.rutland@arm.com,
	harisokn@amazon.com, cl@gentwo.org, zhenglifeng1@huawei.com,
	joao.m.martins@oracle.com, boris.ostrovsky@oracle.com,
	konrad.wilk@oracle.com,
	Alexei Starovoitov <alexei.starovoitov@gmail.com>
Subject: Re: [PATCH 1/4] asm-generic: barrier: Add smp_cond_load_relaxed_timewait()
Date: Tue, 11 Mar 2025 23:34:55 -0700	[thread overview]
Message-ID: <87o6y6kb8w.fsf@oracle.com> (raw)
In-Reply-To: <CAP01T76TWAPz4fXh6EoqHLCAxtgbzyvZib72QeFoTSx-0WKPtQ@mail.gmail.com>


Kumar Kartikeya Dwivedi <memxor@gmail.com> writes:

> On Thu, 6 Mar 2025 at 08:53, Ankur Arora <ankur.a.arora@oracle.com> wrote:
>>
>>
>> Catalin Marinas <catalin.marinas@arm.com> 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.

Sounds good. I'll keep the timewait naming for the next version.
I'm on vacation until the 23rd so will send it out the week after.

Current plan is to address Catalin's comments and make sure that
any fuzziness around the timeout is visible to the caller.

Ankur

>   [0]: https://lore.kernel.org/bpf/20250303152305.3195648-9-memxor@gmail.com
>
>>
>> [...]


--
ankur


  reply	other threads:[~2025-03-12  6:38 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-03 21:49 [PATCH 0/4] barrier: Introduce smp_cond_load_*_timeout() Ankur Arora
2025-02-03 21:49 ` [PATCH 1/4] asm-generic: barrier: Add smp_cond_load_relaxed_timewait() Ankur Arora
2025-03-04 19:15   ` Catalin Marinas
2025-03-06  7:53     ` Ankur Arora
2025-03-11  8:48       ` Kumar Kartikeya Dwivedi
2025-03-12  6:34         ` Ankur Arora [this message]
2025-03-09  3:26     ` Ankur Arora
2025-02-03 21:49 ` [PATCH 2/4] asm-generic: barrier: Add smp_cond_load_acquire_timewait() Ankur Arora
2025-02-03 21:49 ` [PATCH 3/4] arm64: barrier: Add smp_cond_load_relaxed_timewait() Ankur Arora
2025-03-04 19:29   ` Catalin Marinas
2025-03-06  7:58     ` Ankur Arora
2025-02-03 21:49 ` [PATCH 4/4] arm64: barrier: Add smp_cond_load_acquire_timewait() Ankur Arora
2025-02-14 22:42   ` Okanovic, Haris
2025-02-18 21:44     ` Ankur Arora
2025-02-06 10:57 ` [PATCH 0/4] barrier: Introduce smp_cond_load_*_timeout() Kumar Kartikeya Dwivedi
2025-02-18 21:48 ` Ankur Arora
2025-03-03 21:28 ` Ankur Arora

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=87o6y6kb8w.fsf@oracle.com \
    --to=ankur.a.arora@oracle.com \
    --cc=alexei.starovoitov@gmail.com \
    --cc=arnd@arndb.de \
    --cc=boris.ostrovsky@oracle.com \
    --cc=catalin.marinas@arm.com \
    --cc=cl@gentwo.org \
    --cc=harisokn@amazon.com \
    --cc=joao.m.martins@oracle.com \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=memxor@gmail.com \
    --cc=peterz@infradead.org \
    --cc=will@kernel.org \
    --cc=zhenglifeng1@huawei.com \
    /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).