Re: [PATCH] io_uring/futex: return a wait's data to the cache when it fails to arm
From: Jens Axboe
Date: Tue Oct 20 2026 - 10:58:06 EST
On Mon, 19 Oct 2026 16:12:43 -0700, Austin Schuh wrote:
> io_futex_wait() takes its io_futex_data from ctx->futex_cache, and a
> completed wait gives it back in io_futex_complete(). A wait that fails
> to arm kfree()s it instead.
>
> The usual failure is -EAGAIN from futex_wait_setup(): the futex word no
> longer holds the expected value. That is routine for a waiter that
> re-arms with the value it last read, since the word changes whenever
> there is something to wake for. Each such failure takes an object out
> of the cache for good, so the cache drains and from then on waits
> allocate.
>
> [...]
Applied, thanks!
[1/1] io_uring/futex: return a wait's data to the cache when it fails to arm
commit: 02caa5922184e99da04b37fd3336066625ea8e2e
Best regards,
--
Jens Axboe