Re: Broken dio refcounting leads to livelock?

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

 



"Darrick J. Wong" <darrick.wong@xxxxxxxxxx> writes:

> On Tue, Jan 08, 2019 at 03:54:23PM -0500, Jeff Moyer wrote:
>> "Darrick J. Wong" <darrick.wong@xxxxxxxxxx> writes:
>> 
>> > It looks like we're issuing two bios to satisfy a particular dio.
>> > However, the first bio completes before the submitter calls finish_plug??
>> >
>> > I guess this means that blk_start_plug no longer plugs up io requests,
>> > which means that the end_io function tries to wake up the submitter
>> > before it's even had a chance to issue the second bio.
>> 
>> blk_start_plug was always a hint.  If you exceed a certain number of
>> requests (BLK_MAX_REQUEST_COUNT, which is 16) or a certain size of
>> request (BLK_PLUG_FLUSH_SIZE, which is 128k), the block layer will flush
>> the plug list.
>> 
>> > This is surprising to me, because I was under the impression that
>> > blk_{start,finish}_plug held all the bios so there was no chance that
>> > any of them would issue (let alone call end_io) before finish_plug.
>> 
>> Definitely not the case.  The plug list is just a performance
>> optimization.
>
> Ahh, fun!  I had not realized that it was merely a suggestion.
>
> $ git grep blk_start_plug Documentation/
> $ echo $?
> 1

Point taken.  ;-)  I'll write some kernel-doc text.  Hopefully
documentation in the header file will be enough?

Cheers,
Jeff



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux