linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* bug in tag handling in blk-mq?
@ 2018-05-07 14:03 Paolo Valente
  2018-05-07 16:39 ` Jens Axboe
  0 siblings, 1 reply; 19+ messages in thread
From: Paolo Valente @ 2018-05-07 14:03 UTC (permalink / raw)
  To: Mike Galbraith, Jens Axboe, Christoph Hellwig
  Cc: linux-block, Ulf Hansson, LKML, Linus Walleij, Ulf Hansson,
	Oleksandr Natalenko

Hi Jens, Christoph, all,
Mike Galbraith has been experiencing hangs, on blk_mq_get_tag, only
with bfq [1].  Symptoms seem to clearly point to a problem in I/O-tag
handling, triggered by bfq because it limits the number of tags for
async and sync write requests (in bfq_limit_depth).

Fortunately, I just happened to find a way to apparently confirm it.
With the following one-liner for block/bfq-iosched.c:

@@ -554,8 +554,7 @@ static void bfq_limit_depth(unsigned int op, struct blk_mq_alloc_data *data)
        if (unlikely(bfqd->sb_shift != bt->sb.shift))
                bfq_update_depths(bfqd, bt);
 
-       data->shallow_depth =
-               bfqd->word_depths[!!bfqd->wr_busy_queues][op_is_sync(op)];
+       data->shallow_depth = 1;
 
        bfq_log(bfqd, "[%s] wr_busy %d sync %d depth %u",
                        __func__, bfqd->wr_busy_queues, op_is_sync(op),

Mike's machine now crashes soon and systematically, while nothing bad
happens on my machines, even with heavy workloads (apart from an
expected throughput drop).

This change simply reduces to 1 the maximum possible value for the sum
of the number of async requests and of sync write requests.

This email is basically a request for help to knowledgeable people.  To
start, here are my first doubts/questions:
1) Just to be certain, I guess it is not normal that blk-mq hangs if
async requests and sync write requests can be at most one, right?
2) Do you have any hint to where I could look for, to chase this bug?
Of course, the bug may be in bfq, i.e, it may be a somehow unrelated
bfq bug that causes this hang in blk-mq, indirectly.  But it is hard
for me to understand how.

Looking forward to some help.

Thanks,
Paolo

[1] https://www.spinics.net/lists/stable/msg215036.html

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2018-05-10  4:38 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-07 14:03 bug in tag handling in blk-mq? Paolo Valente
2018-05-07 16:39 ` Jens Axboe
2018-05-07 18:02   ` Paolo Valente
2018-05-08  4:51     ` Mike Galbraith
2018-05-08  8:37       ` Mike Galbraith
2018-05-08 14:55         ` Jens Axboe
2018-05-08 16:42           ` Mike Galbraith
2018-05-08 20:37             ` Jens Axboe
2018-05-08 21:19               ` Jens Axboe
2018-05-09  1:09                 ` Jens Axboe
2018-05-09  4:11                   ` Mike Galbraith
2018-05-09  5:06                     ` Paolo Valente
2018-05-09 15:18                     ` Jens Axboe
2018-05-09 16:57                       ` Mike Galbraith
2018-05-09 17:01                         ` Jens Axboe
2018-05-09 18:31                           ` Mike Galbraith
2018-05-09 19:50                             ` Jens Axboe
2018-05-10  4:38                               ` Mike Galbraith
2018-05-09  5:09               ` Mike Galbraith

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).