public inbox for [email protected]
 help / color / mirror / Atom feed
From: "Alexander V. Buev" <[email protected]>
To: Jens Axboe <[email protected]>
Cc: <[email protected]>, <[email protected]>,
	Christoph Hellwig <[email protected]>,
	"Martin K . Petersen" <[email protected]>,
	Pavel Begunkov <[email protected]>,
	Chaitanya Kulkarni <[email protected]>,
	Mikhail Malygin <[email protected]>, <[email protected]>
Subject: Re: [PATCH v2 2/3] block: io_uring: add READV_PI/WRITEV_PI operations
Date: Thu, 10 Feb 2022 22:03:11 +0300	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>

> On 2/10/22 6:08 AM, Alexander V. Buev wrote:
> > Added new READV_PI/WRITEV_PI operations to io_uring.
> > Added new pi_addr & pi_len fields to SQE struct.
> > Added new pi_iter field and IOCB_USE_PI flag to kiocb struct.
> > Make corresponding corrections to io uring trace event.
> > 
> > +struct io_rw_pi_state {
> > +	struct iov_iter			iter;
> > +	struct iov_iter_state		iter_state;
> > +	struct iovec			fast_iov[UIO_FASTIOV_PI];
> > +};
> > +
> > +struct io_rw_pi {
> > +	struct io_rw			rw;
> > +	struct iovec			*pi_iov;
> > +	u32				nr_pi_segs;
> > +	struct io_rw_pi_state		*s;
> > +};
> 
> One immediate issue I see here is that io_rw_pi is big, and we try very
> hard to keep the per-command payload to 64-bytes. This would be 88 bytes
> by my count :-/
> 
> Do you need everything from io_rw? If not, I'd just make io_rw_pi
> contain the bits you need and see if you can squeeze it into the
> existing cacheline.

In short - Yes. Current patch code call existing io_read/io_write functions.
This functions use io_rw struct information and process this data.
I wanted to use existing functions but may be this is wrong way in this 
case.
                                                                                
The second problem with request size is that the patch adds pi_iter   
pointer to kiocb struct. This also increase whole request union
length.

So I can see some (may be possible) solution for this: 

 1) do not store whole kiocb struct in request
    and write fully separated io_read/write_pi functions

 2) make special CONFIG_XXX variable and simplify hide this code
    as default

Any other variants?



-- 
Alexander Buev

  reply	other threads:[~2022-02-10 19:03 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-10 13:08 [PATCH v2 0/3] implement direct IO with integrity Alexander V. Buev
2022-02-10 13:08 ` [PATCH v2 1/3] block: bio-integrity: add PI iovec to bio Alexander V. Buev
2022-02-10 17:49   ` Chaitanya Kulkarni
2022-02-10 13:08 ` [PATCH v2 2/3] block: io_uring: add READV_PI/WRITEV_PI operations Alexander V. Buev
2022-02-10 15:39   ` Jens Axboe
2022-02-10 19:03     ` Alexander V. Buev [this message]
2022-02-10 19:07       ` Jens Axboe
2022-02-11  9:39         ` Alexander V. Buev
2022-02-10 13:08 ` [PATCH v2 3/3] block: fops: handle IOCB_USE_PI in direct IO Alexander V. Buev
2022-02-10 17:53   ` Chaitanya Kulkarni

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] \
    [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