Thread (3 messages) 3 messages, 2 authors, 2021-10-20

Re: [PATCH] fs: kill unused ret2 argument from iocb->ki_complete()

From: Jens Axboe <axboe@kernel.dk>
Date: 2021-10-20 18:41:11
Also in: linux-fsdevel

Possibly related (same subject, not in this thread)

On 10/20/21 12:37 PM, Jeff Moyer wrote:
Jens Axboe [off-list ref] writes:
quoted
On 10/20/21 12:16 PM, Jeff Moyer wrote:
quoted
Hi, Jens,

Jens Axboe [off-list ref] writes:
quoted
It's not used for anything, and we're wasting time passing in zeroes
where we could just ignore it instead. Update all ki_complete users in
the kernel to drop that last argument.
What does "wasting time passing in zeroes" mean?
That everybody but the funky usb gadget code passes in zero, hence it's
a waste of time to pass it in as an argument.
OK.  Just making sure you hadn't found some performance gain from this.
:)
Oh there certainly is, not uncommon to see an extra register cleared and
used just for passing in this 0.
quoted
quoted
We can't know whether some userspace implementation relies on this
behavior, so I don't think you can change it.
Well, I think we should find out, particularly as it's the sole user of
that extra argument.
How can we find out?  Anyone can write userspace usb gadget code.  Some
of those users may be proprietary.  Is that likely?  I don't know.  I'd
rather err on the side of not (potentially) breaking existing
applications, though.
Yeah I don't want to risk that either. And since I can see this turning
into a discussion on what potentially would be using it, seems like the
path of less resistance...

Working on just changing it to a 64-bit type instead, then we can pass
in both at once with res2 being the upper 32 bits. That'll keep the same
API on the aio side.

-- 
Jens Axboe
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help