From mboxrd@z Thu Jan 1 00:00:00 1970 From: Asias He Subject: Re: [RFC PATCH 2/5] block: Do not stop draining if waitqueue is not empty. Date: Mon, 28 May 2012 11:39:29 +0800 Message-ID: <4FC2F371.30004@redhat.com> References: <1337591313-26333-1-git-send-email-asias@redhat.com> <1337591313-26333-2-git-send-email-asias@redhat.com> <20120521153922.GA6549@google.com> <4FBB36D7.9030202@redhat.com> <20120522150742.GA14339@google.com> <4FBCFA13.5030401@redhat.com> <4FBEDD7F.4090300@redhat.com> <20120528003009.GB8305@dhcp-172-17-108-109.mtv.corp.google.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Jens Axboe , linux-fsdevel@vger.kernel.org To: Tejun Heo Return-path: Received: from mx1.redhat.com ([209.132.183.28]:36281 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754194Ab2E1Di3 (ORCPT ); Sun, 27 May 2012 23:38:29 -0400 In-Reply-To: <20120528003009.GB8305@dhcp-172-17-108-109.mtv.corp.google.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On 05/28/2012 08:30 AM, Tejun Heo wrote: > Hello, Asias. > > On Fri, May 25, 2012 at 09:16:47AM +0800, Asias He wrote: >>> I found this after queue cleanup. rl->wait[] is not empty while >>> rl->count[] == 0. There are exactly nr_sleep - nr_wakeup of process in D >>> state. So missed wakeup happens? Any ideas to do more debug to find the >>> root-cause? >> >> Ping. > > Ah, okay, freed_request() wakes up single waiter with the assumption > that after the wakeup there will at least be one successful allocation > which in turn will continue the wakeup chain until the wait list is > empty - ie. waiter wakeup is dependent on successful request > allocation happening after each wakeup. With queue marked dead, any > woken up waiter fails the allocation path, so the wakeup chaining is > lost and we're left with hung waiters. What we need is wake_up_all() > after drain completion. Can you please test that? Thanks, Tejun! Works for me. Will cook a patch for this. -- Asias