From: Alexander Gordeev <agordeev@redhat.com>
To: "Nicholas A. Bellinger" <nab@linux-iscsi.org>
Cc: Mike Christie <mchristie@fusionio.com>,
James Bottomley <James.Bottomley@HansenPartnership.com>,
Jens Axboe <axboe@kernel.dk>, Tejun Heo <tj@kernel.org>,
linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org,
Jeff Garzik <jgarzik@pobox.com>,
linux-scsi <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH RESEND 0/1] AHCI: Optimize interrupt processing
Date: Fri, 20 Sep 2013 17:19:16 +0200 [thread overview]
Message-ID: <20130920151915.GC10507@dhcp-26-207.brq.redhat.com> (raw)
In-Reply-To: <1376619569.5171.217.camel@haakon3.risingtidesystems.com>
On Thu, Aug 15, 2013 at 07:19:29PM -0700, Nicholas A. Bellinger wrote:
> Ok, here's a bit better idea of what is going on now..
>
> The problem is that blkdev_issue_flush() -> blk_mq_make_request() ->
> __blk_mq_alloc_request() allocates the first tag, which calls
> blk_insert_flush() -> blk_flush_complete_seq() -> blk_flush_kick() ->
> mq_flush_work() -> blk_mq_alloc_request() to allocate a second tag for
> the struct request that actually gets dispatched into scsi-mq as a
> SYCHRONIZE_CACHE command..
>
> I'm not exactly sure why this double tag usage of struct request is
> occurring, but AFAICT it does happen for every flush, and is not
> specific to the blkdev_issue_flush() codepath.. I'm sure that Jens can
> fill us in on that bit. ;)
I also played with the double tag using a reserved tag (below).
While it fixes 'fdisk /dev/sda' issue when trying to 'mount /dev/sda1 /mnt'
what appears to be a call to bio->bi_end_io() from the free'd bio hits in.
Not sure if I should pursue the root cause until the whole double-tag
thingy is confirmed.
Jens?
diff --git a/block/blk-mq.c b/block/blk-mq.c
index 6fc1df3..81794dc 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -874,14 +874,14 @@ static void blk_mq_make_request(struct request_queue *q, struct bio *bio)
hctx = q->mq_ops->map_queue(q, ctx->cpu);
trace_block_getrq(q, bio, rw);
- rq = __blk_mq_alloc_request(hctx, GFP_ATOMIC, false);
+ rq = __blk_mq_alloc_request(hctx, GFP_ATOMIC, is_flush_fua);
if (likely(rq))
blk_mq_rq_ctx_init(ctx, rq, rw);
else {
blk_mq_put_ctx(ctx);
trace_block_sleeprq(q, bio, rw);
rq = blk_mq_alloc_request_pinned(q, rw, __GFP_WAIT|GFP_ATOMIC,
- false);
+ is_flush_fua);
ctx = rq->mq_ctx;
hctx = q->mq_ops->map_queue(q, ctx->cpu);
}
@@ -1317,6 +1317,9 @@ struct request_queue *blk_mq_init_queue(struct blk_mq_reg *reg,
reg->queue_depth = BLK_MQ_MAX_DEPTH;
}
+ reg->queue_depth++;
+ reg->reserved_tags++;
+
ctx = alloc_percpu(struct blk_mq_ctx);
if (!ctx)
return ERR_PTR(-ENOMEM);
--
Regards,
Alexander Gordeev
agordeev@redhat.com
next prev parent reply other threads:[~2013-09-20 15:19 UTC|newest]
Thread overview: 55+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1369155164.git.agordeev@redhat.com>
[not found] ` <20130521235003.GE6985@mtj.dyndns.org>
[not found] ` <20130522143923.GD19383@dhcp-26-207.brq.redhat.com>
[not found] ` <20130522170305.GD9563@kernel.dk>
[not found] ` <20130711102630.GA11133@dhcp-26-207.brq.redhat.com>
[not found] ` <1373583637.7397.370.camel@haakon3.risingtidesystems.com>
[not found] ` <20130712074559.GA8727@dhcp-26-207.brq.redhat.com>
[not found] ` <1373692812.7397.625.camel@haakon3.risingtidesystems.com>
[not found] ` <20130716183207.GA6402@dhcp-26-207.brq.redhat.com>
2013-07-16 21:38 ` [PATCH RESEND 0/1] AHCI: Optimize interrupt processing Nicholas A. Bellinger
2013-07-17 16:19 ` Alexander Gordeev
2013-07-18 18:51 ` Nicholas A. Bellinger
2013-07-18 19:12 ` Mike Christie
2013-07-19 0:23 ` Nicholas A. Bellinger
2013-07-19 0:30 ` Jens Axboe
2013-07-19 1:03 ` Nicholas A. Bellinger
2013-07-19 6:34 ` Nicholas A. Bellinger
2013-07-19 15:33 ` James Bottomley
2013-07-19 21:01 ` Nicholas A. Bellinger
2013-07-20 4:56 ` Nicholas A. Bellinger
2013-07-20 14:48 ` Mike Christie
2013-07-20 22:14 ` Nicholas A. Bellinger
2013-07-20 23:57 ` Jens Axboe
2013-08-09 19:15 ` Alexander Gordeev
2013-08-09 20:17 ` Nicholas A. Bellinger
2013-08-15 16:23 ` Alexander Gordeev
2013-08-16 2:19 ` Nicholas A. Bellinger
2013-08-16 16:41 ` Alexander Gordeev
2013-08-16 17:46 ` Nicholas A. Bellinger
2013-08-28 15:56 ` Alexander Gordeev
2013-09-20 15:19 ` Alexander Gordeev [this message]
2013-09-20 20:41 ` Nicholas A. Bellinger
2013-10-03 11:06 ` Christoph Hellwig
2013-10-07 14:44 ` Alexander Gordeev
2013-07-22 15:03 ` Alexander Gordeev
2013-07-22 21:10 ` Nicholas A. Bellinger
2013-07-25 10:16 ` Alexander Gordeev
2013-07-25 22:08 ` Nicholas A. Bellinger
2013-07-26 2:09 ` Jens Axboe
2013-07-26 21:14 ` Nicholas A. Bellinger
2013-07-27 0:43 ` Nicholas A. Bellinger
2013-07-29 11:18 ` Alexander Gordeev
2013-07-29 14:08 ` Jens Axboe
2013-07-29 19:19 ` Nicholas A. Bellinger
2013-07-31 4:16 ` Marc C
2013-07-31 10:23 ` Tejun Heo
2013-07-29 11:50 ` Tejun Heo
2013-07-29 19:11 ` Nicholas A. Bellinger
2013-07-29 11:46 ` Tejun Heo
2013-07-29 14:03 ` Jens Axboe
2013-08-09 8:23 ` Alexander Gordeev
2013-08-09 14:15 ` Tejun Heo
2013-08-09 14:24 ` Jens Axboe
2013-08-09 15:07 ` Alexander Gordeev
2013-08-09 15:52 ` Jens Axboe
2013-08-09 16:46 ` Alexander Gordeev
2013-08-09 17:07 ` Jens Axboe
2013-08-12 15:21 ` Alexander Gordeev
2013-07-29 7:28 ` Hannes Reinecke
2013-07-31 17:11 ` Alexander Gordeev
2013-07-19 15:58 ` Mike Christie
2013-07-19 21:05 ` Nicholas A. Bellinger
2013-07-18 19:14 ` Nicholas A. Bellinger
2013-07-18 21:21 ` Jens Axboe
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=20130920151915.GC10507@dhcp-26-207.brq.redhat.com \
--to=agordeev@redhat.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=axboe@kernel.dk \
--cc=jgarzik@pobox.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=mchristie@fusionio.com \
--cc=nab@linux-iscsi.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).