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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/20/21 12:37 PM, Jeff Moyer wrote:
> Jens Axboe <axboe@xxxxxxxxx> writes:
> 
>> On 10/20/21 12:16 PM, Jeff Moyer wrote:
>>> Hi, Jens,
>>>
>>> Jens Axboe <axboe@xxxxxxxxx> writes:
>>>
>>>> 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.

>>> 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




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux