linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chaitanya Kulkarni <Chaitanya.Kulkarni@wdc.com>
To: Pavel Begunkov <asml.silence@gmail.com>,
	"Martin K . Petersen" <martin.petersen@oracle.com>
Cc: "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"target-devel@vger.kernel.org" <target-devel@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] target/file: don't zero iter before iov_iter_bvec
Date: Sat, 9 Jan 2021 20:09:15 +0000	[thread overview]
Message-ID: <BYAPR04MB4965F4DCF59E5225CF17322D86AD0@BYAPR04MB4965.namprd04.prod.outlook.com> (raw)
In-Reply-To: 34cd22d6cec046e3adf402accb1453cc255b9042.1610207523.git.asml.silence@gmail.com

On 1/9/21 07:59, Pavel Begunkov wrote:
> iov_iter_bvec() initialises iterators well, no need to pre-zero it
> beforehand as done in fd_execute_rw_aio(). Compilers can't optimise it
> out and generate extra code for that (confirmed with assembly).
It will be great if we can quantify this optimization with the actual
performance
numbers.
> Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
> ---
>  drivers/target/target_core_file.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/target/target_core_file.c b/drivers/target/target_core_file.c
> index cce455929778..5a66854def95 100644
> --- a/drivers/target/target_core_file.c
> +++ b/drivers/target/target_core_file.c
> @@ -267,7 +267,7 @@ fd_execute_rw_aio(struct se_cmd *cmd, struct scatterlist *sgl, u32 sgl_nents,
>  	struct fd_dev *fd_dev = FD_DEV(dev);
>  	struct file *file = fd_dev->fd_file;
>  	struct target_core_file_cmd *aio_cmd;
> -	struct iov_iter iter = {};
> +	struct iov_iter iter;
>  	struct scatterlist *sg;
>  	ssize_t len = 0;
>  	int ret = 0, i;


  reply	other threads:[~2021-01-09 20:10 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-09 15:53 [PATCH] target/file: don't zero iter before iov_iter_bvec Pavel Begunkov
2021-01-09 20:09 ` Chaitanya Kulkarni [this message]
2021-01-09 20:37   ` Pavel Begunkov
2021-01-09 20:52     ` Chaitanya Kulkarni
2021-01-09 21:25       ` Pavel Begunkov
2021-01-11  2:06         ` Chaitanya Kulkarni
2021-01-11  2:28           ` Pavel Begunkov
2021-01-11  5:23             ` Chaitanya Kulkarni
2021-01-11  5:31               ` Pavel Begunkov
2021-01-11  2:49 ` Bart Van Assche
2021-01-13  5:34 ` Martin K. Petersen
2021-01-15  4:08 ` Martin K. Petersen

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 \
    --in-reply-to=BYAPR04MB4965F4DCF59E5225CF17322D86AD0@BYAPR04MB4965.namprd04.prod.outlook.com \
    --to=chaitanya.kulkarni@wdc.com \
    --cc=asml.silence@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=target-devel@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).