Skip to content

RFC futex request support

Pavel Begunkov io-uring lkml 1 version NAK

Status from this message: Nacked-by: Peter Zijlstra (Intel) <[email protected]>

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest4 patches 18 repliesNAK

Patches in v1

#Subject and filesSizeRepliesApplied
1/4futex: add op wake for a single keyinclude/linux/futex.h kernel/futex.c+77 -20 replies
2/4io_uring: frame out futex opfs/io_uring.c include/uapi/linux/io_uring.h+32 -00 replies
3/4io_uring: support futex wake requestsfs/io_uring.c include/uapi/linux/io_uring.h+55 -30 replies
4/4io_uring: implement futex waitfs/io_uring.c include/uapi/linux/io_uring.h+32 -816 replies

Reviews trailers per patch

None of the 4 patches has a Reviewed-by or Acked-by.

PatchPeter Zijlstra (Intel)
1/4
2/4
3/4
4/4Nacked-by

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [RFC 0/4] futex request support

Proof of concept for io_uring futex requests. The wake side does FUTEX_WAKE_OP type of modify-compare operation but with a single address. Wait reqs go through io-wq and so slow path.

Should be interesting for a bunch of people, so we should first outline API and capabilities it should give. As I almost never had to deal with futexes myself, would especially love to hear use case, what might be lacking and other blind spots.

1) Do we need PI?
2) Do we need requeue? Anything else?
3) How hot waits are? May be done fully async avoiding io-wq, but apparently requires more changes in futex code.
4) We can avoid all page locking/unlocking for shared futexes with pre-registration. How much is it interesting?

For _very_ basic examples see [1]

[1] https://github.com/isilence/liburing/tree/futex_v1

Pavel Begunkov (4):
futex: add op wake for a single key
io_uring: frame out futex op
io_uring: support futex wake requests
io_uring: implement futex wait

 fs/io_uring.c                 | 91 +++++++++++++++++++++++++++++++++++
 include/linux/futex.h         | 15 ++++++
 include/uapi/linux/io_uring.h | 19 +++++++-
 kernel/futex.c                | 64 +++++++++++++++++++++++-
 4 files changed, 186 insertions(+), 3 deletions(-)
Signature · 1 line
2.31.1