mbox series

[v2,0/6] compile out ctx->compat reads

Message ID cover.1740400452.git.asml.silence@gmail.com (mailing list archive)
Headers show
Series compile out ctx->compat reads | expand

Message

Pavel Begunkov Feb. 24, 2025, 12:42 p.m. UTC
Some code paths read ctx->compat even for !CONFIG_COMPAT, add and use
a helper to optimise that out. Namely cmd and rw.c vector imports
benefit from that, and others are converted for consistency.

rsrc.c is left out to avoid conflicts, it's easier to update it later.
It'd also be a good idea to further clean up compat code on top. 

v2: also use it for net, cmd and waitid
    remove some of the CONFIG_COMPAT guards from rw.c

Pavel Begunkov (6):
  io_uring: introduce io_is_compat()
  io_uring/cmd: optimise !CONFIG_COMPAT flags setting
  io_uring/rw: compile out compat param passing
  io_uring/rw: shrink io_iov_compat_buffer_select_prep
  io_uring/waitid: use io_is_compat()
  io_uring/net: use io_is_compat()

 io_uring/io_uring.h  |  5 +++++
 io_uring/net.c       | 19 ++++++++-----------
 io_uring/rw.c        | 22 ++++++----------------
 io_uring/uring_cmd.c |  2 +-
 io_uring/waitid.c    |  2 +-
 5 files changed, 21 insertions(+), 29 deletions(-)

Comments

Jens Axboe Feb. 24, 2025, 2:35 p.m. UTC | #1
On Mon, 24 Feb 2025 12:42:18 +0000, Pavel Begunkov wrote:
> Some code paths read ctx->compat even for !CONFIG_COMPAT, add and use
> a helper to optimise that out. Namely cmd and rw.c vector imports
> benefit from that, and others are converted for consistency.
> 
> rsrc.c is left out to avoid conflicts, it's easier to update it later.
> It'd also be a good idea to further clean up compat code on top.
> 
> [...]

Applied, thanks!

[1/6] io_uring: introduce io_is_compat()
      commit: 3035deac0cd5bd9c8cacdcf5a1c488cbc87abc2d
[2/6] io_uring/cmd: optimise !CONFIG_COMPAT flags setting
      commit: 0bba6fccbdcb28d284debc31150f84ef14f7e252
[3/6] io_uring/rw: compile out compat param passing
      commit: 82d187d356dcc257ecaa659e57e6c0546ec1cd2d
[4/6] io_uring/rw: shrink io_iov_compat_buffer_select_prep
      commit: 52524b281d5746cf9dbd53a7dffce9576e8ddd30
[5/6] io_uring/waitid: use io_is_compat()
      commit: d8cc800bac886fac69cc672545eee89dbeb50bef
[6/6] io_uring/net: use io_is_compat()
      commit: 5e646339944c10d615b1b0b5a2fa8a4f6734f21d

Best regards,