public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCHSET v2 0/3] Convert fs drivers to ->read_iter()
@ 2024-04-03 14:02 Jens Axboe
  2024-04-03 14:02 ` [PATCH 1/3] timerfd: convert " Jens Axboe
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Jens Axboe @ 2024-04-03 14:02 UTC (permalink / raw)
  To: linux-fsdevel; +Cc: brauner, linux-kernel

Hi,

There are still a few users of fops->read() in the core parts of the
fs stack. Which is a shame, since it'd be nice to get rid of the
non-iterator parts of down the line, and reclaim that part of the
file_operations struct.

Outside of moving in that direction as a cleanup, using ->read_iter()
enables us to mark them with FMODE_NOWAIT. This is important for users
like io_uring, where per-IO nonblocking hints make a difference in how
efficiently IO can be done.

Those two things are my main motivation for starting this work, with
hopefully more to come down the line.

All patches have been booted and tested, and the corresponding test
cases been run. The timerfd one was sent separately previously, figured
I'd do a few more and make a smaller series out of it.

Since v1:
- Include uio.h in userfaultfd, or it fails to see iov_iter_count()
  on some configs
- Drop (now) unused siginfo pointer in signalfd and the incrementing of
  it, we don't use it anymore
- Add missing put_unused_fd() for userfaultfd error path

 fs/signalfd.c    | 46 ++++++++++++++++++++++++++++------------------
 fs/timerfd.c     | 31 ++++++++++++++++++++++---------
 fs/userfaultfd.c | 44 ++++++++++++++++++++++++++++----------------
 3 files changed, 78 insertions(+), 43 deletions(-)

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 12+ messages in thread
* [PATCHSET 0/3] Convert fs drivers to ->read_iter()
@ 2024-04-02 20:18 Jens Axboe
  2024-04-02 20:18 ` [PATCH 2/3] userfaultfd: convert " Jens Axboe
  0 siblings, 1 reply; 12+ messages in thread
From: Jens Axboe @ 2024-04-02 20:18 UTC (permalink / raw)
  To: linux-fsdevel; +Cc: brauner, linux-kernel

Hi,

There are still a few users of fops->read() in the core parts of the
fs stack. Which is a shame, since it'd be nice to get rid of the
non-iterator parts of down the line, and reclaim that part of the
file_operations struct.

Outside of moving in that direction as a cleanup, using ->read_iter()
enables us to mark them with FMODE_NOWAIT. This is important for users
like io_uring, where per-IO nonblocking hints make a difference in how
efficiently IO can be done.

Those two things are my main motivation for starting this work, with
hopefully more to come down the line.

All patches have been booted and tested, and the corresponding test
cases been run. The timerfd one was sent separately previously, figured
I'd do a few more and make a smaller series out of it.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2024-04-04 12:52 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-03 14:02 [PATCHSET v2 0/3] Convert fs drivers to ->read_iter() Jens Axboe
2024-04-03 14:02 ` [PATCH 1/3] timerfd: convert " Jens Axboe
2024-04-03 22:40   ` Al Viro
2024-04-04 12:51     ` Jens Axboe
2024-04-03 14:02 ` [PATCH 2/3] userfaultfd: " Jens Axboe
2024-04-03 22:45   ` Al Viro
2024-04-03 14:02 ` [PATCH 3/3] signalfd: " Jens Axboe
2024-04-03 22:57   ` Al Viro
2024-04-04 12:52     ` Jens Axboe
  -- strict thread matches above, loose matches on Subject: below --
2024-04-02 20:18 [PATCHSET 0/3] Convert fs drivers " Jens Axboe
2024-04-02 20:18 ` [PATCH 2/3] userfaultfd: convert " Jens Axboe
2024-04-03 10:09   ` Christian Brauner
2024-04-03 13:44     ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox