From mboxrd@z Thu Jan 1 00:00:00 1970 From: Shaohua Li Subject: Re: [PATCH V3 1/2] RAID1: a new I/O barrier implementation to remove resync window Date: Fri, 24 Feb 2017 09:17:24 -0800 Message-ID: <20170224171724.4go2ahruap2nqhlq@kernel.org> References: <87k28lshg5.fsf@notabene.neil.brown.name> <20170220070430.4mca7clpaw7kpj4j@kernel.org> <7178ADEA-6263-4FB0-95A5-96E5F71A9740@suse.de> <878tp0s7w8.fsf@notabene.neil.brown.name> <20170221174542.rer73ywil3oq26gj@kernel.org> <488f88e0-8111-a320-3abb-c6e6611a957e@suse.de> <87lgswqz3w.fsf@notabene.neil.brown.name> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-raid-owner@vger.kernel.org To: Coly Li Cc: NeilBrown , linux-raid@vger.kernel.org, Shaohua Li , Johannes Thumshirn , Guoqing Jiang List-Id: linux-raid.ids On Sat, Feb 25, 2017 at 01:06:22AM +0800, Coly Li wrote: > On 2017/2/24 上午7:14, NeilBrown wrote: > > On Thu, Feb 23 2017, Coly Li wrote: > > > >> > >> I tried to set up a 4 layer stacked md raid1, and reduce I/O > >> barrier bucket size to 8MB, running for 10 hours, there is no > >> deadlock observed, > > > > Try setting BARRIER_BUCKETS_NR to '1' and BARRIER_UNIT_SECTOR_BITS > > to 3 and make sure the write requests are larger than 1 page (and > > have resync happen at the same time as writes). > > Hi Neil, > > Yes, the above method triggers deadlock easily. After come to > understand how bios are handled in stacked raid1 and the relationship > between current->bio_list, plug->pending and conf->pending_bio_list, I > think I come to understand what you worried and the meaning of your fix. > > I totally agree and understand there will be hash conflict sooner or > later now. Yes we need this fix. > > Thanks to you and Shaohua, explaining the details to me, and help me > to catch up your mind :-) I'm confused. So the deadlock is real? How is it triggered? Thanks, Shaohua