Re: [PATCH 5.11] io_uring: share fixed_file_refs b/w multiple rsrcs

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

 



On 11/18/20 12:57 PM, Pavel Begunkov wrote:
> Double fixed files for splice/tee are done in a nasty way, it takes 2
> ref_node refs, and during the second time it blindly overrides
> req->fixed_file_refs hoping that it haven't changed. That works because
> all that is done under iouring_lock in a single go but is error-prone.
> 
> Bind everything explicitly to a single ref_node and take only one ref,
> with current ref_node ordering it's guaranteed to keep all files valid
> awhile the request is inflight.
> 
> That's mainly a cleanup + preparation for generic resource handling,
> but also saves pcpu_ref get/put for splice/tee with 2 fixed files.

LGTM, applied, thanks.

-- 
Jens Axboe




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux