From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com ([209.132.183.28]:58974 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728913AbfAHVaQ (ORCPT ); Tue, 8 Jan 2019 16:30:16 -0500 From: Jeff Moyer Subject: Re: Broken dio refcounting leads to livelock? References: <20190108002633.GL12689@magnolia> <20190108074644.GX4205@dastard> <20190108200803.GS12689@magnolia> <20190108210716.GV12689@magnolia> Date: Tue, 08 Jan 2019 16:30:14 -0500 In-Reply-To: <20190108210716.GV12689@magnolia> (Darrick J. Wong's message of "Tue, 8 Jan 2019 13:07:16 -0800") Message-ID: MIME-Version: 1.0 Content-Type: text/plain Sender: linux-xfs-owner@vger.kernel.org List-ID: List-Id: xfs To: "Darrick J. Wong" Cc: Dave Chinner , Christoph Hellwig , xfs "Darrick J. Wong" writes: > On Tue, Jan 08, 2019 at 03:54:23PM -0500, Jeff Moyer wrote: >> "Darrick J. Wong" 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