From: Vivek Goyal <vgoyal@redhat.com>
To: Tejun Heo <tj@kernel.org>
Cc: Dominik Klein <dk@in-telegence.net>,
linux kernel mailing list <linux-kernel@vger.kernel.org>,
libvir-list@redhat.com
Subject: Re: Is it a workqueue related issue in 2.6.37 (Was: Re: [libvirt] blkio cgroup [solved])
Date: Fri, 25 Feb 2011 10:11:13 -0500 [thread overview]
Message-ID: <20110225151113.GD2994@redhat.com> (raw)
In-Reply-To: <20110225150329.GM24828@htj.dyndns.org>
On Fri, Feb 25, 2011 at 04:03:29PM +0100, Tejun Heo wrote:
> Hello,
>
> On Fri, Feb 25, 2011 at 09:57:08AM -0500, Vivek Goyal wrote:
> > blk_throtl_work() calls generic_make_request() to dispatch some bios and I
> > guess blk_throtl_work() has been put to sleep because threre are no request
> > descriptors available and CFQ is frozen so no requests descriptors get freed
> > hence blk_throtl_work() never finishes.
> >
> > Following caught my eye.
> >
> > ksoftirqd/0-3 [000] 1640.983585: 8,16 m N cfq4810 slice
> > expired t=0
> > ksoftirqd/0-3 [000] 1640.983588: 8,16 m N cfq4810
> > sl_used=2 disp=6 charge=2 iops=0 sect=2080
> > ksoftirqd/0-3 [000] 1640.983589: 8,16 m N cfq4810
> > del_from_rr
> > ksoftirqd/0-3 [000] 1640.983591: 8,16 m N cfq schedule
> > dispatch
> > sshd-3125 [004] 1640.983597: workqueue_queue_work: work
> > struct=ffff88102c3a3110 function=flush_to_ldisc workqueue=ffff88182c834a00
> > req_cpu=4 cpu=4
> > sshd-3125 [004] 1640.983598: workqueue_activate_work: work
> > struct ffff88102c3a3110
> >
> > CFQ tries to schedule a work and but there is no associated
> > "workqueue_queue_work" trace. So it looks like that work never got queued.
> >
> > CFQ calls following.
> >
> > cfq_log(cfqd, "schedule dispatch");
> > kblockd_schedule_work(cfqd->queue, &cfqd->unplug_work);
> >
> > We do see "schedule dispatch" message and kblockd_schedule_work() calls
> > queue_work(). So what happended here? This is strange. I will put one
> > more trace after kblockd_schedule_work() to trace that function returned.
>
> It could be that the unplug work was already queued and in pending
> state. The second queueing request will be ignored then. So, I think
> the problem is that blk_throtl_work() occupies kblockd but requires
> another work item (unplug_work) to make forward progress. In such
> cases, forward progress cannot be guaranteed. Either
> blk_throtl_work() or cfq unplug work should use a separate workqueue.
Ok, that would make sense. So blk_throtl_work() can not finish as CFQ
is not making progress and no request descriptors are being freed and
unplug_work() is not being called because blk_throtl_work() has not finished.
So that's cyclic dependency and I should use a separate work queue for
queueing throttle related work. I will write a patch.
Thanks
Vivek
next prev parent reply other threads:[~2011-02-25 15:11 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20110218163137.GF26654@redhat.com>
[not found] ` <4D621B9B.3070205@in-telegence.net>
[not found] ` <4D622002.2040604@in-telegence.net>
[not found] ` <4D6222A8.6090303@in-telegence.net>
[not found] ` <20110221184442.GM6428@redhat.com>
[not found] ` <4D63BA3B.7070809@in-telegence.net>
[not found] ` <20110222152426.GD28269@redhat.com>
[not found] ` <20110222190953.GF28269@redhat.com>
[not found] ` <4D650D7E.4050908@in-telegence.net>
[not found] ` <4D662248.6040405@in-telegence.net>
2011-02-24 14:23 ` Is it a workqueue related issue in 2.6.37 (Was: Re: [libvirt] blkio cgroup [solved]) Vivek Goyal
2011-02-24 14:31 ` Tejun Heo
2011-02-24 14:58 ` Dominik Klein
2011-02-24 15:17 ` Tejun Heo
2011-02-25 7:24 ` Dominik Klein
2011-02-25 11:29 ` Tejun Heo
2011-02-25 11:46 ` Dominik Klein
2011-02-25 13:18 ` Tejun Heo
2011-02-25 14:41 ` Dominik Klein
2011-02-25 14:55 ` Tejun Heo
2011-02-25 14:57 ` Vivek Goyal
2011-02-25 15:03 ` Tejun Heo
2011-02-25 15:11 ` Vivek Goyal [this message]
2011-02-25 15:15 ` Vivek Goyal
2011-02-25 16:03 ` Vivek Goyal
2011-02-25 16:09 ` Tejun Heo
2011-02-25 16:19 ` Vivek Goyal
2011-02-25 16:30 ` Vivek Goyal
2011-02-25 16:56 ` Dominik Klein
2011-02-25 19:53 ` Steven Rostedt
2011-02-25 20:18 ` Vivek Goyal
2011-02-26 2:47 ` Steven Rostedt
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=20110225151113.GD2994@redhat.com \
--to=vgoyal@redhat.com \
--cc=dk@in-telegence.net \
--cc=libvir-list@redhat.com \
--cc=linux-kernel@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.