Re: [PATCH v2] fs: replace the ki_complete two integer arguments with a single argument

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

 



On Wed, Oct 20, 2021 at 01:08:17PM -0600, Jens Axboe wrote:
> The second argument is only used by the USB gadget code, yet everyone
> pays the overhead of passing a zero to be passed into aio, where it
> ends up being part of the aio res2 value.
> 
> Since we pass this value around as long, there's only 32-bits of
> information in each of these. Linux IO transfers are capped at INT_MAX
> anyway, so could not be any larger return value. For the one cases where
> we care about this second result, mask it into the upper bits of the
> value passed in. aio can then simply shift to get it.
> 
> For everyone else, just pass in res as an argument like before. Update
> all ki_complete handlers to conform to the new prototype.
> 
> On 64-bit, this avoids an extra register allocation and clear for the
> the fast path (non-USB gadget...).
> 
> Signed-off-by: Jens Axboe <axboe@xxxxxxxxx>


Acked-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux