lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <55312ABD.7060207@fb.com>
Date:	Fri, 17 Apr 2015 09:46:05 -0600
From:	Jens Axboe <axboe@...com>
To:	Guenter Roeck <linux@...ck-us.net>
CC:	<linux-kernel@...r.kernel.org>,
	Chong Yuan <chong.yuan@...blaze.com>,
	Wenbo Wang <wenbo.wang@...blaze.com>
Subject: Re: Upstream kernel fails to run on qemu-sparc64 due to commit 889fa31f0
 (blk-mq: reduce unnecessary software queue looping)

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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ