All of lore.kernel.org
 help / color / mirror / Atom feed
From: Asias He <asias@redhat.com>
To: Tejun Heo <tj@kernel.org>
Cc: Jens Axboe <axboe@kernel.dk>, linux-fsdevel@vger.kernel.org
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	[thread overview]
Message-ID: <4FC2F371.30004@redhat.com> (raw)
In-Reply-To: <20120528003009.GB8305@dhcp-172-17-108-109.mtv.corp.google.com>

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

  reply	other threads:[~2012-05-28  3:38 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-21  9:08 [RFC PATCH 1/5] block: Introduce q->abort_queue_fn() Asias He
2012-05-21  9:08 ` [RFC PATCH 2/5] block: Do not stop draining if waitqueue is not empty Asias He
2012-05-21 15:39   ` Tejun Heo
2012-05-22  6:48     ` Asias He
2012-05-22 15:07       ` Tejun Heo
2012-05-23 14:54         ` Asias He
2012-05-25  1:16           ` Asias He
2012-05-28  0:30             ` Tejun Heo
2012-05-28  3:39               ` Asias He [this message]
2012-05-21  9:08 ` [RFC PATCH 3/5] virtio-blk: Call del_gendisk() before disable guest kick Asias He
2012-05-21  9:08 ` [RFC PATCH 4/5] virtio-blk: Use q->abort_queue_fn() to abort requests Asias He
2012-05-21  9:08 ` [RFC PATCH 5/5] virtio-blk: Use block layer provided spinlock Asias He
2012-05-21 20:59   ` Michael S. Tsirkin
2012-05-22  8:22     ` Asias He
2012-05-21 15:42 ` [RFC PATCH 1/5] block: Introduce q->abort_queue_fn() Tejun Heo
2012-05-22  7:30   ` Asias He
2012-05-22 15:14     ` Tejun Heo
2012-05-23 15:04       ` Asias He

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4FC2F371.30004@redhat.com \
    --to=asias@redhat.com \
    --cc=axboe@kernel.dk \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=tj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.