Re: [PATCH v10 09/12] bpf/rqspinlock: switch check_timeout() to a clock interface
From: Ankur Arora <hidden>
Date: 2026-03-25 05:57:55
Also in:
bpf, linux-arch, linux-pm, lkml
From: Ankur Arora <hidden>
Date: 2026-03-25 05:57:55
Also in:
bpf, linux-arch, linux-pm, lkml
Kumar Kartikeya Dwivedi [off-list ref] writes:
On Mon, 16 Mar 2026 at 02:37, Ankur Arora [off-list ref] wrote:quoted
check_timeout() gets the current time value and depending on how much time has passed, checks for deadlock or times out, returning 0 or -errno on deadlock or timeout. Switch this out to a clock style interface, where it functions as a clock in the "lock-domain", returning the current time until a deadlock or timeout occurs. Once a deadlock or timeout has occurred, it stops functioning as a clock and returns error. Also adjust the RES_CHECK_TIMEOUT macro to discard the clock value when updating the explicit return status. Cc: bpf@vger.kernel.org Cc: Kumar Kartikeya Dwivedi <memxor@gmail.com> Cc: Alexei Starovoitov <ast@kernel.org> Signed-off-by: Ankur Arora <redacted> --Acked-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Thanks Kumar. -- ankur