[PATCHv8 5/6] io_uring: enable per-io hinting capability
Hannes Reinecke
hare at suse.de
Thu Oct 17 23:03:43 PDT 2024
On 10/17/24 18:09, Keith Busch wrote:
> From: Kanchan Joshi <joshi.k at samsung.com>
>
> With F_SET_RW_HINT fcntl, user can set a hint on the file inode, and
> all the subsequent writes on the file pass that hint value down. This
> can be limiting for block device as all the writes can be tagged with
> only one lifetime hint value. Concurrent writes (with different hint
> values) are hard to manage. Per-IO hinting solves that problem.
>
> Allow userspace to pass additional metadata in the SQE.
>
> __u16 write_hint;
>
> This accepts all hint values that the file allows.
>
> The write handlers (io_prep_rw, io_write) send the hint value to
> lower-layer using kiocb. This is good for upporting direct IO, but not
> when kiocb is not available (e.g., buffered IO).
>
> When per-io hints are not passed, the per-inode hint values are set in
> the kiocb (as before). Otherwise, per-io hints take the precedence over
> per-inode hints.
>
> Signed-off-by: Kanchan Joshi <joshi.k at samsung.com>
> Signed-off-by: Nitesh Shetty <nj.shetty at samsung.com>
> Signed-off-by: Keith Busch <kbusch at kernel.org>
> ---
> include/uapi/linux/io_uring.h | 4 ++++
> io_uring/rw.c | 11 +++++++++--
> 2 files changed, 13 insertions(+), 2 deletions(-)
>
Reviewed-by: Hannes Reinecke <hare at suse.de>
Cheers,
Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
hare at suse.de +49 911 74053 688
SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg
HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich
More information about the Linux-nvme
mailing list