From: Vivek Goyal <vgoyal@redhat.com>
To: Josh Hunt <joshhunt00@gmail.com>
Cc: Jens Axboe <axboe@kernel.dk>,
linux-kernel@vger.kernel.org, tj@kernel.org
Subject: Re: multi-second application stall in open()
Date: Thu, 8 Mar 2012 18:40:16 -0500 [thread overview]
Message-ID: <20120308234016.GA925@redhat.com> (raw)
In-Reply-To: <CAKA=qzaHJ0OcbvtT-mwKBUBvzPkxE4r-bW6gDvicKhoQeyFWEg@mail.gmail.com>
On Thu, Mar 08, 2012 at 04:22:31PM -0600, Josh Hunt wrote:
[..]
> A crude bisection seems to show that if I revert "blkio: Set
> must_dispatch only if we decided to not dispatch the request"
> (bf7919371025412978268efca4b09dd847acb395) I no longer see the stalls
> in 2.6.35. However this does not seem to solve the problem if I revert
> it in 2.6.38.
Strange. If this was the problem it should have fixed it in 2.6.38 also.
BTW, the blktrace you sent was from 2.6.38 or 2.6.35 kernels.
>
> By setting slice_idle to 0, does this basically disable plugging?
It disables idling and not plugging.
> Based on the blktrace info it seems that something is going wrong with
> plugging with my testcase. I'm just wondering why setting slice_idle
> to 0 seems to resolve my issue? Also, since we see unplugs in the
> blktrace how could the requests still not be getting sent to the disk?
Unplug will just try to kick the queue. That does not mean that request
will be dispatched. And that's the question that why are we not
dispatching requests.
I had another look at traces and I think it is not just async write, but
there is was sync write request queued and we have not dispatched that
too for a long time.
Added request here.
8,0 1 36921 5028.492019664 162 A WS 63 + 8 <- (8,1) 0
8,0 1 36922 5028.492021620 162 Q WS 63 + 8 [sync_supers]
8,0 1 36923 5028.492029721 162 G WS 63 + 8 [sync_supers]
8,0 1 36924 5028.492040617 162 I W 63 + 8 ( 10896)
[sync_supers]
8,0 1 0 5028.492044807 0 m N cfq162 insert_request
8,0 1 0 5028.492046763 0 m N cfq162 add_to_rr
And after a long time we dispatched the request.
8,0 0 0 5050.116841906 0 m N cfq162 set_active wl_prio:0 wl_type:1
8,0 0 0 5050.116844979 0 m N cfq162 fifo=ffff8800e8787aa0
8,0 0 0 5050.116846655 0 m N cfq162 dispatch_insert
8,0 0 0 5050.116849728 0 m N cfq162 dispatched a
request
8,0 0 0 5050.116851683 0 m N cfq162 activate rq, drv=1
8,0 0 36518 5050.116853360 166 D W 63 + 8 (21624812743)
[kblockd/0]
8,0 0 36519 5050.117236650 9671 C W 63 + 8 ( 383290) [0]
So it is not async requestss being starved by sync request issue, most
likely.
Are you using any of the blk cgroup stuff?
Can you put some more trace messages to figure out what's happening.
I think you can try putting some trace messages in following functions.
__blk_run_queue()
cfq_select_queue()
and try to narrow down why CFQ refuses to dispatch the request when
this happens.
Thanks
Vivek
next prev parent reply other threads:[~2012-03-08 23:40 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-06 21:56 multi-second application stall in open() Josh Hunt
2012-03-07 13:43 ` Josh Hunt
2012-03-07 16:28 ` Vivek Goyal
2012-03-07 18:56 ` Jens Axboe
2012-03-07 19:56 ` Vivek Goyal
2012-03-07 21:08 ` Josh Hunt
2012-03-08 22:22 ` Josh Hunt
2012-03-08 23:40 ` Vivek Goyal [this message]
[not found] ` <CAKA=qzbsL9UVYLZ3=hoT-1jfp=v=_Sr=h+YeHu0qAA=Ko_7P6w@mail.gmail.com>
2012-06-21 19:26 ` Josh Hunt
2012-06-21 20:32 ` Vivek Goyal
2012-06-21 20:36 ` Tejun Heo
2012-06-21 21:28 ` Josh Hunt
2012-06-21 21:32 ` Tejun Heo
2012-06-21 21:48 ` Rakesh Iyer
[not found] ` <CAOT6A4-a49wLHcQepUxJCDxOxfnSTEWa72OweLsmrea85OyrCg@mail.gmail.com>
2012-06-22 14:15 ` Vivek Goyal
2012-06-21 21:11 ` Josh Hunt
2012-06-22 14:12 ` Vivek Goyal
2012-06-22 20:05 ` Josh Hunt
2012-06-22 20:22 ` Josh Hunt
2012-06-22 20:42 ` Vivek Goyal
2012-06-22 20:53 ` Josh Hunt
2012-06-22 20:57 ` Josh Hunt
2012-06-22 21:34 ` Josh Hunt
2012-06-25 13:30 ` Vivek Goyal
2012-06-25 16:22 ` Josh Hunt
2012-06-25 21:18 ` Vivek Goyal
2012-06-25 23:05 ` Josh Hunt
2012-06-26 4:01 ` Josh Hunt
2012-06-26 12:59 ` Vivek Goyal
2012-06-26 15:18 ` Josh Hunt
2012-06-26 15:53 ` Vivek Goyal
2012-06-26 20:37 ` Josh Hunt
2012-06-26 20:56 ` Tejun Heo
[not found] ` <CAKA=qzbBtteDjHiPogCvN5jOSiPrDxx=vn96p02bXUy=6=jAgA@mail.gmail.com>
2012-06-26 23:44 ` Josh Hunt
2012-06-27 17:21 ` Josh Hunt
2012-06-27 17:38 ` Tejun Heo
2012-06-27 17:44 ` Josh Hunt
2012-06-27 17:54 ` Tejun Heo
2012-06-27 17:59 ` Josh Hunt
2012-06-29 23:02 ` Tejun Heo
2012-06-30 0:37 ` Josh Hunt
2012-07-04 1:12 ` Tejun Heo
2012-07-18 17:48 ` Tejun Heo
2012-06-26 20:43 ` Tejun Heo
2012-06-25 17:26 ` Tejun Heo
2012-03-07 19:47 ` Josh Hunt
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=20120308234016.GA925@redhat.com \
--to=vgoyal@redhat.com \
--cc=axboe@kernel.dk \
--cc=joshhunt00@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).