public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Upstream kernel fails to run on qemu-sparc64 due to commit 889fa31f0 (blk-mq: reduce unnecessary software queue looping)
@ 2015-04-17  6:32 Guenter Roeck
  2015-04-17 13:32 ` Guenter Roeck
  0 siblings, 1 reply; 5+ messages in thread
From: Guenter Roeck @ 2015-04-17  6:32 UTC (permalink / raw)
  To: linux-kernel; +Cc: Chong Yuan, Wenbo Wang, Jens Axboe

Hi,

my qemu-sparc64 tests fail to run with kernel v4.0-7245-ga39ef1a7c609.
Bisect points to commit 889fa31f00b ("blk-mq: reduce unnecessary software
queue looping"). Reverting this commit fixes the problem.

I had a look into the commit, but I have no idea what might be wrong.

I made the bisect log, images, configuration file, root file system, and directions
on how to run the images available at http://server.roeck-us.net/qemu/sparc64.

Please let me know if there is any other information I can provide.

Guenter

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

* Re: Upstream kernel fails to run on qemu-sparc64 due to commit 889fa31f0 (blk-mq: reduce unnecessary software queue looping)
  2015-04-17  6:32 Upstream kernel fails to run on qemu-sparc64 due to commit 889fa31f0 (blk-mq: reduce unnecessary software queue looping) Guenter Roeck
@ 2015-04-17 13:32 ` Guenter Roeck
  2015-04-17 14:26   ` Jens Axboe
  0 siblings, 1 reply; 5+ messages in thread
From: Guenter Roeck @ 2015-04-17 13:32 UTC (permalink / raw)
  To: linux-kernel; +Cc: Chong Yuan, Wenbo Wang, Jens Axboe

On Thu, Apr 16, 2015 at 11:32:20PM -0700, Guenter Roeck wrote:
> Hi,
> 
> my qemu-sparc64 tests fail to run with kernel v4.0-7245-ga39ef1a7c609.
> Bisect points to commit 889fa31f00b ("blk-mq: reduce unnecessary software
> queue looping"). Reverting this commit fixes the problem.
> 
> I had a look into the commit, but I have no idea what might be wrong.
> 
> I made the bisect log, images, configuration file, root file system, and directions
> on how to run the images available at http://server.roeck-us.net/qemu/sparc64.
> 
> Please let me know if there is any other information I can provide.
> 
As additional information:

+                * Set the map size to the number of mapped software queues.
+                * This is more accurate and more efficient than looping
+                * over all possibly mapped software queues.
+                */
+               map->map_size = hctx->nr_ctx / map->bits_per_word;

On my system, hctx->nr_ctx is 1, and map->bits_per_word is 8.
Thus map->map_size is set to 0, which doesn't make much sense.
The system comes up if I replace the above code with
		map->map_size = DIV_ROUND_UP(hctx->nr_ctx, map->bits_per_word);

I have no idea if that is the correct fix, though.

Guenter

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

* Re: Upstream kernel fails to run on qemu-sparc64 due to commit 889fa31f0 (blk-mq: reduce unnecessary software queue looping)
  2015-04-17 13:32 ` Guenter Roeck
@ 2015-04-17 14:26   ` Jens Axboe
  2015-04-17 15:31     ` Guenter Roeck
  0 siblings, 1 reply; 5+ messages in thread
From: Jens Axboe @ 2015-04-17 14:26 UTC (permalink / raw)
  To: Guenter Roeck, linux-kernel; +Cc: Chong Yuan, Wenbo Wang

On 04/17/2015 07:32 AM, Guenter Roeck wrote:
> On Thu, Apr 16, 2015 at 11:32:20PM -0700, Guenter Roeck wrote:
>> Hi,
>>
>> my qemu-sparc64 tests fail to run with kernel v4.0-7245-ga39ef1a7c609.
>> Bisect points to commit 889fa31f00b ("blk-mq: reduce unnecessary software
>> queue looping"). Reverting this commit fixes the problem.
>>
>> I had a look into the commit, but I have no idea what might be wrong.
>>
>> I made the bisect log, images, configuration file, root file system, and directions
>> on how to run the images available at https://urldefense.proofpoint.com/v1/url?u=http://server.roeck-us.net/qemu/sparc64&k=ZVNjlDMF0FElm4dQtryO4A%3D%3D%0A&r=3JMVyziIyZtZ5cv9eWNLwQ%3D%3D%0A&m=%2FUVX9MC8j8RmqOwlL6HnyBe%2FFSO5xSJdG3GTTzADFYk%3D%0A&s=caaf39bb4246d5223f9dea93771fdb075f9046b6fdf1822b7da21d7665da71d5.
>>
>> Please let me know if there is any other information I can provide.
>>
> As additional information:
>
> +                * Set the map size to the number of mapped software queues.
> +                * This is more accurate and more efficient than looping
> +                * over all possibly mapped software queues.
> +                */
> +               map->map_size = hctx->nr_ctx / map->bits_per_word;
>
> On my system, hctx->nr_ctx is 1, and map->bits_per_word is 8.
> Thus map->map_size is set to 0, which doesn't make much sense.


> The system comes up if I replace the above code with
> 		map->map_size = DIV_ROUND_UP(hctx->nr_ctx, map->bits_per_word);
>
> I have no idea if that is the correct fix, though.

Ugh, yes indeed, looks like the <= was lost from a previous patch. Now I 
wonder why it I didn't see any hangs with this... Thanks for reporting, 
I'll get a fix in today.

-- 
Jens Axboe


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

* Re: Upstream kernel fails to run on qemu-sparc64 due to commit 889fa31f0 (blk-mq: reduce unnecessary software queue looping)
  2015-04-17 14:26   ` Jens Axboe
@ 2015-04-17 15:31     ` Guenter Roeck
  2015-04-17 15:46       ` Jens Axboe
  0 siblings, 1 reply; 5+ messages in thread
From: Guenter Roeck @ 2015-04-17 15:31 UTC (permalink / raw)
  To: Jens Axboe; +Cc: linux-kernel, Chong Yuan, Wenbo Wang

Hi Jens,

On Fri, Apr 17, 2015 at 08:26:11AM -0600, Jens Axboe wrote:
> >>
> >As additional information:
> >
> >+                * Set the map size to the number of mapped software queues.
> >+                * This is more accurate and more efficient than looping
> >+                * over all possibly mapped software queues.
> >+                */
> >+               map->map_size = hctx->nr_ctx / map->bits_per_word;
> >
> >On my system, hctx->nr_ctx is 1, and map->bits_per_word is 8.
> >Thus map->map_size is set to 0, which doesn't make much sense.
> 
> 
> >The system comes up if I replace the above code with
> >		map->map_size = DIV_ROUND_UP(hctx->nr_ctx, map->bits_per_word);
> >
> >I have no idea if that is the correct fix, though.
> 
> Ugh, yes indeed, looks like the <= was lost from a previous patch. Now I
> wonder why it I didn't see any hangs with this... Thanks for reporting, I'll
> get a fix in today.
> 
Assuming that nr_ctx reflects the number of (online) CPUs, my guess is that
you may have a multiple of bits_per_word CPUs in your system.

Guenter

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

* Re: Upstream kernel fails to run on qemu-sparc64 due to commit 889fa31f0 (blk-mq: reduce unnecessary software queue looping)
  2015-04-17 15:31     ` Guenter Roeck
@ 2015-04-17 15:46       ` Jens Axboe
  0 siblings, 0 replies; 5+ messages in thread
From: Jens Axboe @ 2015-04-17 15:46 UTC (permalink / raw)
  To: Guenter Roeck; +Cc: linux-kernel, Chong Yuan, Wenbo Wang

On 04/17/2015 09:31 AM, Guenter Roeck wrote:
> Hi Jens,
>
> On Fri, Apr 17, 2015 at 08:26:11AM -0600, Jens Axboe wrote:
>>>>
>>> As additional information:
>>>
>>> +                * Set the map size to the number of mapped software queues.
>>> +                * This is more accurate and more efficient than looping
>>> +                * over all possibly mapped software queues.
>>> +                */
>>> +               map->map_size = hctx->nr_ctx / map->bits_per_word;
>>>
>>> On my system, hctx->nr_ctx is 1, and map->bits_per_word is 8.
>>> Thus map->map_size is set to 0, which doesn't make much sense.
>>
>>
>>> The system comes up if I replace the above code with
>>> 		map->map_size = DIV_ROUND_UP(hctx->nr_ctx, map->bits_per_word);
>>>
>>> I have no idea if that is the correct fix, though.
>>
>> Ugh, yes indeed, looks like the <= was lost from a previous patch. Now I
>> wonder why it I didn't see any hangs with this... Thanks for reporting, I'll
>> get a fix in today.
>>
> Assuming that nr_ctx reflects the number of (online) CPUs, my guess is that
> you may have a multiple of bits_per_word CPUs in your system.

Ah yes, now it makes sense. Smallest box I have is 8 CPUs, and generally 
map bits_per_word is in the 5-6 range. So it ends up working out for my 
case, ->map_size would be >= 1.

-- 
Jens Axboe


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

end of thread, other threads:[~2015-04-17 15:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-17  6:32 Upstream kernel fails to run on qemu-sparc64 due to commit 889fa31f0 (blk-mq: reduce unnecessary software queue looping) Guenter Roeck
2015-04-17 13:32 ` Guenter Roeck
2015-04-17 14:26   ` Jens Axboe
2015-04-17 15:31     ` Guenter Roeck
2015-04-17 15:46       ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox