mbox series

[0/2] optimise iov_iter

Message ID cover.1605799583.git.asml.silence@gmail.com (mailing list archive)
Headers show
Series optimise iov_iter | expand

Message

Pavel Begunkov Nov. 19, 2020, 3:29 p.m. UTC
The first patch optimises iov_iter_npages() for the bvec case, and the
second helps code generation to kill unreachable code.

Pavel Begunkov (2):
  iov_iter: optimise iov_iter_npages for bvec
  iov_iter: optimise iter type checking

 include/linux/uio.h | 10 +++++-----
 lib/iov_iter.c      | 10 +++++-----
 2 files changed, 10 insertions(+), 10 deletions(-)

Comments

Jens Axboe Nov. 19, 2020, 4:46 p.m. UTC | #1
On 11/19/20 8:29 AM, Pavel Begunkov wrote:
> The first patch optimises iov_iter_npages() for the bvec case, and the
> second helps code generation to kill unreachable code.
> 
> Pavel Begunkov (2):
>   iov_iter: optimise iov_iter_npages for bvec
>   iov_iter: optimise iter type checking
> 
>  include/linux/uio.h | 10 +++++-----
>  lib/iov_iter.c      | 10 +++++-----
>  2 files changed, 10 insertions(+), 10 deletions(-)

Nice! Tested this and confirmed both the better code generation,
and reduction in overhead in iov_iter_npages().

Reviewed-by: Jens Axboe <axboe@kernel.dk>
Pavel Begunkov Nov. 19, 2020, 5:14 p.m. UTC | #2
On 19/11/2020 16:46, Jens Axboe wrote:
> On 11/19/20 8:29 AM, Pavel Begunkov wrote:
>> The first patch optimises iov_iter_npages() for the bvec case, and the
>> second helps code generation to kill unreachable code.
>>
>> Pavel Begunkov (2):
>>   iov_iter: optimise iov_iter_npages for bvec
>>   iov_iter: optimise iter type checking
>>
>>  include/linux/uio.h | 10 +++++-----
>>  lib/iov_iter.c      | 10 +++++-----
>>  2 files changed, 10 insertions(+), 10 deletions(-)
> 
> Nice! Tested this and confirmed both the better code generation,
> and reduction in overhead in iov_iter_npages().

Thanks! Did you find t-put/etc. boost with your setup?

> 
> Reviewed-by: Jens Axboe <axboe@kernel.dk>
Jens Axboe Nov. 19, 2020, 5:20 p.m. UTC | #3
On 11/19/20 10:14 AM, Pavel Begunkov wrote:
> On 19/11/2020 16:46, Jens Axboe wrote:
>> On 11/19/20 8:29 AM, Pavel Begunkov wrote:
>>> The first patch optimises iov_iter_npages() for the bvec case, and the
>>> second helps code generation to kill unreachable code.
>>>
>>> Pavel Begunkov (2):
>>>   iov_iter: optimise iov_iter_npages for bvec
>>>   iov_iter: optimise iter type checking
>>>
>>>  include/linux/uio.h | 10 +++++-----
>>>  lib/iov_iter.c      | 10 +++++-----
>>>  2 files changed, 10 insertions(+), 10 deletions(-)
>>
>> Nice! Tested this and confirmed both the better code generation,
>> and reduction in overhead in iov_iter_npages().
> 
> Thanks! Did you find t-put/etc. boost with your setup?

Yeah, for this kind of test, if we shave 1% off the stack overhead,
that directly yields an increase in peak IOPS. My numbers were close
to yours, dropped about 1% of system overhead.
Pavel Begunkov Nov. 19, 2020, 6:02 p.m. UTC | #4
On 19/11/2020 17:20, Jens Axboe wrote:
> On 11/19/20 10:14 AM, Pavel Begunkov wrote:
>> On 19/11/2020 16:46, Jens Axboe wrote:
>>> On 11/19/20 8:29 AM, Pavel Begunkov wrote:
>>>> The first patch optimises iov_iter_npages() for the bvec case, and the
>>>> second helps code generation to kill unreachable code.
>>>>
>>>> Pavel Begunkov (2):
>>>>   iov_iter: optimise iov_iter_npages for bvec
>>>>   iov_iter: optimise iter type checking
>>>>
>>>>  include/linux/uio.h | 10 +++++-----
>>>>  lib/iov_iter.c      | 10 +++++-----
>>>>  2 files changed, 10 insertions(+), 10 deletions(-)
>>>
>>> Nice! Tested this and confirmed both the better code generation,
>>> and reduction in overhead in iov_iter_npages().
>>
>> Thanks! Did you find t-put/etc. boost with your setup?
> 
> Yeah, for this kind of test, if we shave 1% off the stack overhead,
> that directly yields an increase in peak IOPS. My numbers were close
> to yours, dropped about 1% of system overhead.

That's great. I was guessing how much of it can be due
to not cached bvec and was just tossed to somewhere else.