From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933817AbbDQPq1 (ORCPT ); Fri, 17 Apr 2015 11:46:27 -0400 Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:11802 "EHLO mx0b-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932274AbbDQPqZ (ORCPT ); Fri, 17 Apr 2015 11:46:25 -0400 Message-ID: <55312ABD.7060207@fb.com> Date: Fri, 17 Apr 2015 09:46:05 -0600 From: Jens Axboe User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Guenter Roeck CC: , Chong Yuan , Wenbo Wang Subject: Re: Upstream kernel fails to run on qemu-sparc64 due to commit 889fa31f0 (blk-mq: reduce unnecessary software queue looping) References: <20150417063220.GA2871@roeck-us.net> <20150417133204.GA29300@roeck-us.net> <55311803.9030105@fb.com> <20150417153136.GA11202@roeck-us.net> In-Reply-To: <20150417153136.GA11202@roeck-us.net> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [192.168.54.13] X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.13.68,1.0.33,0.0.0000 definitions=2015-04-17_06:2015-04-17,2015-04-17,1970-01-01 signatures=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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