Re: [PATCH] target/file: don't zero iter before iov_iter_bvec

2021-01-14 Thread Martin K. Petersen
On Sat, 9 Jan 2021 15:53:27 +, 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). Applied to 5.12/scsi-queue,

Re: [PATCH] target/file: don't zero iter before iov_iter_bvec

2021-01-12 Thread Martin K. Petersen
Pavel, > 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). Applied to 5.12/scsi-staging, thanks! -- Martin K. Petersen Oracle Linux

Re: [PATCH] target/file: don't zero iter before iov_iter_bvec

2021-01-10 Thread Pavel Begunkov
On 11/01/2021 05:23, Chaitanya Kulkarni wrote: > On 1/10/21 18:32, Pavel Begunkov wrote: >> On 11/01/2021 02:06, Chaitanya Kulkarni wrote: >>> On 1/9/21 13:29, Pavel Begunkov wrote: On 09/01/2021 20:52, Chaitanya Kulkarni wrote: > On 1/9/21 12:40, Pavel Begunkov wrote: >> I expect you

Re: [PATCH] target/file: don't zero iter before iov_iter_bvec

2021-01-10 Thread Chaitanya Kulkarni
On 1/10/21 18:32, Pavel Begunkov wrote: > On 11/01/2021 02:06, Chaitanya Kulkarni wrote: >> On 1/9/21 13:29, Pavel Begunkov wrote: >>> On 09/01/2021 20:52, Chaitanya Kulkarni wrote: On 1/9/21 12:40, Pavel Begunkov wrote: > I expect you won't find any, but such little things can pile up

Re: [PATCH] target/file: don't zero iter before iov_iter_bvec

2021-01-10 Thread Bart Van Assche
On 1/9/21 7:53 AM, 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). Reviewed-by: Bart Van Assche

Re: [PATCH] target/file: don't zero iter before iov_iter_bvec

2021-01-10 Thread Pavel Begunkov
On 11/01/2021 02:06, Chaitanya Kulkarni wrote: > On 1/9/21 13:29, Pavel Begunkov wrote: >> On 09/01/2021 20:52, Chaitanya Kulkarni wrote: >>> On 1/9/21 12:40, Pavel Begunkov wrote: I expect you won't find any, but such little things can pile up into a not-easy-to-spot overhead over time.

Re: [PATCH] target/file: don't zero iter before iov_iter_bvec

2021-01-10 Thread Chaitanya Kulkarni
On 1/9/21 13:29, Pavel Begunkov wrote: > On 09/01/2021 20:52, Chaitanya Kulkarni wrote: >> On 1/9/21 12:40, Pavel Begunkov wrote: >>> I expect you won't find any, but such little things can pile up >>> into a not-easy-to-spot overhead over time. >> That is what I suspected with the resulting

Re: [PATCH] target/file: don't zero iter before iov_iter_bvec

2021-01-09 Thread Pavel Begunkov
On 09/01/2021 20:52, Chaitanya Kulkarni wrote: > On 1/9/21 12:40, Pavel Begunkov wrote: >> I expect you won't find any, but such little things can pile up >> into a not-easy-to-spot overhead over time. > > That is what I suspected with the resulting assembly. The commit log > needs to document

Re: [PATCH] target/file: don't zero iter before iov_iter_bvec

2021-01-09 Thread Chaitanya Kulkarni
On 1/9/21 12:40, Pavel Begunkov wrote: > I expect you won't find any, but such little things can pile up > into a not-easy-to-spot overhead over time. That is what I suspected with the resulting assembly. The commit log needs to document that there is no direct impact on the performance which can

Re: [PATCH] target/file: don't zero iter before iov_iter_bvec

2021-01-09 Thread Pavel Begunkov
On 09/01/2021 20:09, Chaitanya Kulkarni wrote: > 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).

Re: [PATCH] target/file: don't zero iter before iov_iter_bvec

2021-01-09 Thread Chaitanya Kulkarni
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