public inbox for [email protected]
 help / color / mirror / Atom feed
From: Jens Axboe <[email protected]>
To: Ming Lei <[email protected]>,
	[email protected], Pavel Begunkov <[email protected]>
Cc: [email protected],
	Uday Shankar <[email protected]>,
	Akilesh Kailash <[email protected]>
Subject: Re: [PATCH V9 5/7] io_uring: support leased group buffer with REQ_F_GROUP_BUF
Date: Wed, 6 Nov 2024 08:17:10 -0700	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>

On 11/6/24 5:26 AM, Ming Lei wrote:
> @@ -670,6 +689,14 @@ struct io_kiocb {
>  		struct io_buffer_list	*buf_list;
>  
>  		struct io_rsrc_node	*buf_node;
> +
> +		/* valid IFF REQ_F_GROUP_BUF is set */
> +		union {
> +			/* store group buffer for group leader */
> +			const struct io_mapped_buf *grp_buf;
> +			/* for group member */
> +			bool	grp_buf_imported;
> +		};
>  	};

Just add a REQ_F flag for this.

> +/* For group member only */
> +static inline void io_req_mark_group_buf(struct io_kiocb *req, bool imported)
> +{
> +	req->grp_buf_imported = imported;
> +}
> +
> +/* For group member only */
> +static inline bool io_req_group_buf_imported(struct io_kiocb *req)
> +{
> +	return req->grp_buf_imported;
> +}

And kill these useless helpers, should just set or clear the above
mentioned REQ_F flag instead.

-- 
Jens Axboe

  reply	other threads:[~2024-11-06 15:17 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-06 12:26 [PATCH V9 0/7] io_uring: support group buffer & ublk zc Ming Lei
2024-11-06 12:26 ` [PATCH V9 1/7] io_uring: rename io_mapped_ubuf as io_mapped_buf Ming Lei
2024-11-06 12:26 ` [PATCH V9 2/7] io_uring: rename ubuf of io_mapped_buf as start Ming Lei
2024-11-06 15:07   ` Jens Axboe
2024-11-06 12:26 ` [PATCH V9 3/7] io_uring: shrink io_mapped_buf Ming Lei
2024-11-06 15:09   ` Jens Axboe
2024-11-07  1:04     ` Ming Lei
2024-11-07  2:13       ` Jens Axboe
2024-11-06 12:26 ` [PATCH V9 4/7] io_uring: reuse io_mapped_buf for kernel buffer Ming Lei
2024-11-06 15:15   ` Jens Axboe
2024-11-07  1:22     ` Ming Lei
2024-11-07  2:16       ` Jens Axboe
2024-11-06 12:26 ` [PATCH V9 5/7] io_uring: support leased group buffer with REQ_F_GROUP_BUF Ming Lei
2024-11-06 15:17   ` Jens Axboe [this message]
2024-11-06 12:26 ` [PATCH V9 6/7] io_uring/uring_cmd: support leasing device kernel buffer to io_uring Ming Lei
2024-11-06 12:26 ` [PATCH V9 7/7] ublk: support leasing io " Ming Lei

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox