Re: [PATCH] char/mem: only use {read,write}_iter, not the old {read,write} functions

From: Jens Axboe
Date: Fri May 20 2022 - 11:47:27 EST


On 5/20/22 9:44 AM, Al Viro wrote:
> On Fri, May 20, 2022 at 09:32:34AM -0600, Jens Axboe wrote:
>
>> Didn't look closer, but I'm assuming this is _mostly_ tied to needing to
>> init 48 bytes of kiocb for each one. There might be ways to embed a
>> sync_kiocb inside the kiocb for the bits we need there, at least that
>> could get us down to 32 bytes.
>
> My bet would be on iocb_flags() (and kiocb_set_rw_flags()) tests and
> pointer-chasing, actually.

That would be my guess too, around init/setup of the kiocb. But as per
previous email, for some reason it seems _worse_ on bigger reads (1k and
4k vs 32 bytes), which would seem to indicate that it's not necessarily
just the setup but something else too. And hopefully that "something
else" is workable.

> I'd been sick on and off since early November, trying to dig myself
> from under the piles right now. Christoph's patches in that area are
> somewhere in the pile ;-/

Sorry to hear that, hope you're feeling better.

Do you have a pointer to those patches?

--
Jens Axboe