From: Jens Axboe <axboe@kernel.dk>
To: Christoph Hellwig <hch@infradead.org>, Meelis Roos <mroos@linux.ee>
Cc: linux-scsi@vger.kernel.org, sparclinux@vger.kernel.org,
David Miller <davem@davemloft.net>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Subject: Re: Another (ESP?) scsi blk-mq problem on sparc64
Date: Fri, 14 Nov 2014 10:01:05 -0700 [thread overview]
Message-ID: <54663551.8080500@kernel.dk> (raw)
In-Reply-To: <20141114165804.GA14631@infradead.org>
[-- Attachment #1: Type: text/plain, Size: 1015 bytes --]
On 11/14/2014 09:58 AM, Christoph Hellwig wrote:
> Paul, what's the best way to figure out these CPU stalls?
>
> The second oops is in blk_mq_map_queue() which is a trivial
> two level cpu lookup. I wonder if there's something odd about
> cpu numbers on these big old sparc systems?
>
> Something like the debug patch below might shed some light on where the
> index goes wrong, but it'll be horribly verbose.
>
>
> diff --git a/block/blk-mq.c b/block/blk-mq.c
> index b5896d4..ef4b35b 100644
> --- a/block/blk-mq.c
> +++ b/block/blk-mq.c
> @@ -1270,7 +1270,12 @@ run_queue:
> */
> struct blk_mq_hw_ctx *blk_mq_map_queue(struct request_queue *q, const int cpu)
> {
> - return q->queue_hw_ctx[q->mq_map[cpu]];
> + int idx;
> +
> + printk("cpu: %d\n", cpu);
> + idx = q->mq_map[cpu];
> + printk("queue: %d\n", idx);
> + return q->queue_hw_ctx[idx];
> }
> EXPORT_SYMBOL(blk_mq_map_queue);
It'd probably be better to shove this debug stuff into the map building
code instead, ala attached.
--
Jens Axboe
[-- Attachment #2: mapdump.patch --]
[-- Type: text/x-patch, Size: 408 bytes --]
diff --git a/block/blk-mq-cpumap.c b/block/blk-mq-cpumap.c
index 1065d7c65fa1..9200e2aee746 100644
--- a/block/blk-mq-cpumap.c
+++ b/block/blk-mq-cpumap.c
@@ -81,6 +81,9 @@ int blk_mq_update_queue_map(unsigned int *map, unsigned int nr_queues)
map[i] = map[first_sibling];
}
+ for (i = 0; i < queue; i++)
+ printk(KERN_ERR "cpumap %d -> %d\n", i, map[i]);
+
free_cpumask_var(cpus);
return 0;
}
WARNING: multiple messages have this Message-ID (diff)
From: Jens Axboe <axboe@kernel.dk>
To: Christoph Hellwig <hch@infradead.org>, Meelis Roos <mroos@linux.ee>
Cc: linux-scsi@vger.kernel.org, sparclinux@vger.kernel.org,
David Miller <davem@davemloft.net>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Subject: Re: Another (ESP?) scsi blk-mq problem on sparc64
Date: Fri, 14 Nov 2014 17:01:05 +0000 [thread overview]
Message-ID: <54663551.8080500@kernel.dk> (raw)
In-Reply-To: <20141114165804.GA14631@infradead.org>
[-- Attachment #1: Type: text/plain, Size: 1015 bytes --]
On 11/14/2014 09:58 AM, Christoph Hellwig wrote:
> Paul, what's the best way to figure out these CPU stalls?
>
> The second oops is in blk_mq_map_queue() which is a trivial
> two level cpu lookup. I wonder if there's something odd about
> cpu numbers on these big old sparc systems?
>
> Something like the debug patch below might shed some light on where the
> index goes wrong, but it'll be horribly verbose.
>
>
> diff --git a/block/blk-mq.c b/block/blk-mq.c
> index b5896d4..ef4b35b 100644
> --- a/block/blk-mq.c
> +++ b/block/blk-mq.c
> @@ -1270,7 +1270,12 @@ run_queue:
> */
> struct blk_mq_hw_ctx *blk_mq_map_queue(struct request_queue *q, const int cpu)
> {
> - return q->queue_hw_ctx[q->mq_map[cpu]];
> + int idx;
> +
> + printk("cpu: %d\n", cpu);
> + idx = q->mq_map[cpu];
> + printk("queue: %d\n", idx);
> + return q->queue_hw_ctx[idx];
> }
> EXPORT_SYMBOL(blk_mq_map_queue);
It'd probably be better to shove this debug stuff into the map building
code instead, ala attached.
--
Jens Axboe
[-- Attachment #2: mapdump.patch --]
[-- Type: text/x-patch, Size: 408 bytes --]
diff --git a/block/blk-mq-cpumap.c b/block/blk-mq-cpumap.c
index 1065d7c65fa1..9200e2aee746 100644
--- a/block/blk-mq-cpumap.c
+++ b/block/blk-mq-cpumap.c
@@ -81,6 +81,9 @@ int blk_mq_update_queue_map(unsigned int *map, unsigned int nr_queues)
map[i] = map[first_sibling];
}
+ for (i = 0; i < queue; i++)
+ printk(KERN_ERR "cpumap %d -> %d\n", i, map[i]);
+
free_cpumask_var(cpus);
return 0;
}
next prev parent reply other threads:[~2014-11-14 17:01 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-14 11:32 Another (ESP?) scsi blk-mq problem on sparc64 Meelis Roos
2014-11-14 11:32 ` Meelis Roos
2014-11-14 16:58 ` Christoph Hellwig
2014-11-14 16:58 ` Christoph Hellwig
2014-11-14 17:01 ` Jens Axboe [this message]
2014-11-14 17:01 ` Jens Axboe
2014-11-14 19:35 ` Meelis Roos
2014-11-14 19:35 ` Meelis Roos
2014-11-14 19:42 ` Jens Axboe
2014-11-14 19:42 ` Jens Axboe
2014-11-14 22:59 ` Meelis Roos
2014-11-14 22:59 ` Meelis Roos
2014-11-14 23:29 ` Jens Axboe
2014-11-14 23:29 ` Jens Axboe
2014-11-15 6:48 ` Meelis Roos
2014-11-15 6:48 ` Meelis Roos
2014-11-15 15:31 ` Jens Axboe
2014-11-15 15:31 ` Jens Axboe
2014-11-20 6:01 ` Christoph Hellwig
2014-11-20 6:01 ` Christoph Hellwig
2014-11-21 19:56 ` David Miller
2014-11-21 19:56 ` David Miller
2014-11-24 8:21 ` Christoph Hellwig
2014-11-24 8:21 ` Christoph Hellwig
2014-11-24 15:35 ` Jens Axboe
2014-11-24 15:35 ` Jens Axboe
2014-11-24 16:22 ` Paul E. McKenney
2014-11-24 16:22 ` Paul E. McKenney
2014-11-24 17:16 ` Jens Axboe
2014-11-24 17:16 ` Jens Axboe
2014-11-24 17:31 ` Paul E. McKenney
2014-11-24 17:31 ` Paul E. McKenney
2014-11-24 17:33 ` Jens Axboe
2014-11-24 17:33 ` Jens Axboe
2014-11-24 17:44 ` Paul E. McKenney
2014-11-24 17:44 ` Paul E. McKenney
2014-11-24 21:56 ` David Miller
2014-11-24 21:56 ` David Miller
2014-11-24 22:01 ` Jens Axboe
2014-11-24 22:01 ` Jens Axboe
2014-11-24 22:09 ` David Miller
2014-11-24 22:09 ` David Miller
2014-11-24 22:20 ` Jens Axboe
2014-11-24 22:20 ` Jens Axboe
2014-11-24 22:23 ` mroos
2014-11-24 22:23 ` mroos
2014-11-24 22:28 ` David Miller
2014-11-24 22:28 ` David Miller
2015-01-29 7:53 ` Meelis Roos
2015-01-29 7:53 ` Meelis Roos
2015-01-29 16:37 ` Jens Axboe
2015-01-29 16:37 ` Jens Axboe
2015-09-04 8:33 ` Meelis Roos
2015-09-04 8:33 ` Meelis Roos
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=54663551.8080500@kernel.dk \
--to=axboe@kernel.dk \
--cc=davem@davemloft.net \
--cc=hch@infradead.org \
--cc=linux-scsi@vger.kernel.org \
--cc=mroos@linux.ee \
--cc=paulmck@linux.vnet.ibm.com \
--cc=sparclinux@vger.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.