From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755370AbbKCPqK (ORCPT ); Tue, 3 Nov 2015 10:46:10 -0500 Received: from mail-ob0-f172.google.com ([209.85.214.172]:34277 "EHLO mail-ob0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754851AbbKCPqH (ORCPT ); Tue, 3 Nov 2015 10:46:07 -0500 Subject: Re: [patch, v3] blk-mq: avoid excessive boot delays with large lun counts To: Jeff Moyer References: Cc: Ming Lei , Jason Luo , linux-kernel@vger.kernel.org From: Jens Axboe Message-ID: <5638D6BC.4050607@kernel.dk> Date: Tue, 3 Nov 2015 08:46:04 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/03/2015 08:40 AM, Jeff Moyer wrote: > Hi, > > Zhangqing Luo reported long boot times on a system with thousands of > LUNs when scsi-mq was enabled. He narrowed the problem down to > blk_mq_add_queue_tag_set, where every queue is frozen in order to set > the BLK_MQ_F_TAG_SHARED flag. Each added device will freeze all queues > added before it in sequence, which involves waiting for an RCU grace > period for each one. We don't need to do this. After the second queue > is added, only new queues need to be initialized with the shared tag. > We can do that by percolating the flag up to the blk_mq_tag_set, and > updating the newly added queue's hctxs if the flag is set. > > This problem was introduced by commit 0d2602ca30e41 (blk-mq: improve > support for shared tags maps). Applied, thanks Jeff and Ming. -- Jens Axboe