Re: [PATCH 1/1] block: Manage bio references so the bio persists until necessary

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

 



On Thu, Jan 30, 2020 at 07:23:42PM -0800, Bijan Mottahedeh wrote:
> Get a reference to a bio, so it won't be freed if end_io() gets to
> it before submit_io() returns.  Defer the release of the first bio
> in a mult-bio request until the last end_io() since the first bio is
> embedded in the dio structure and must therefore persist through an
> entire multi-bio request.

Can you explain the issue a little more?

The initial bio is embedded into the dio, and will have a reference
until the bio_put call at the end of the function, so we can't have
a race for that one and won't ever need the refcount for the single
bio case.  Avoiding the atomic is pretty important for aio/uring
performance.



[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