Received: by 10.192.165.156 with SMTP id m28csp285750imm; Tue, 17 Apr 2018 10:05:56 -0700 (PDT) X-Google-Smtp-Source: AIpwx48cPTblnCj5kKS2VktJYR2IXsDJQ9fVT6AKQsuWiXPKykrQGNdT2PaM+dLXkB2fXp0+zgFY X-Received: by 10.98.99.4 with SMTP id x4mr2653951pfb.179.1523984756564; Tue, 17 Apr 2018 10:05:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523984756; cv=none; d=google.com; s=arc-20160816; b=hzIEBmRtbyyLKax0obUAOc0ObaNzzEAow9dYd0xNeCmg1OILQDziOpkTheAsDaXy8Q Q3h9K2KDSugzGJXVi1qWnXG+os71dxDoGod/DU8h00kW4jIQBKKT8fzwlrEIKD3eh5fW ARuc/gcBfI1RwQD+KFchdaXgU3vF3mue0xpvFipfDm0e4I+oKfEOxzOHdgH0wgghBnrE YOMP60nDf3qOnVEKNBVeRJHXMTDiyXCBfsIzClZ+SIZzMxjJH2d+0yeqvJqL+UGUHsKJ ZX2QEkQJHFN3ERh69yl/pwMeLYefOOGl+6U/95pCJzIr60akUdjwUq4jwNH9+ix+/KG1 Szhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=QJhFiCwFsvYs1xjS9Y9LUtdr+Xwo3Eu3uR7Af8s7JfM=; b=TdcLydnjOjkvXEu9/y4fSFoxzmQc5vvR9/5t7c/5o3KHWLoE06t+2be8ODrEWB0kYa j+sMLyAgjnuiZ1hCclKOJh8Q9T5fELj9HuRlYiL5FpvUSSTcKOQyrhcrGXR20QnSksfG 5Kjh09cdlw4jGJjMfMujwqUDKb0Pwuzn2am4rThCCWEUty1rkHVG4vIcjzljE+aLJG7q 0F/y09hFkC9GKw7e6EJVKi4FGjvC0mij40vQ/Wl/gsLexE3X9rvRL1VsWDRQK8aXkHfR DflZ7nQplMBruUIzjggx+p59kuiqOEJD43Rch2cazJtAKbHIkP5tWWrSmFe7CF9P+DW7 nyEg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g15-v6si1670648pln.526.2018.04.17.10.05.42; Tue, 17 Apr 2018 10:05:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753824AbeDQQBj (ORCPT + 99 others); Tue, 17 Apr 2018 12:01:39 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:60508 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753088AbeDQQBe (ORCPT ); Tue, 17 Apr 2018 12:01:34 -0400 Received: from localhost (unknown [46.44.180.42]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 11ECEDF6; Tue, 17 Apr 2018 16:01:33 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Stefan Haberland , Keith Busch , Christian Borntraeger , Christoph Hellwig , Sagi Grimberg , Ming Lei , Jens Axboe Subject: [PATCH 4.16 43/68] blk-mq: dont keep offline CPUs mapped to hctx 0 Date: Tue, 17 Apr 2018 17:57:56 +0200 Message-Id: <20180417155751.080846191@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180417155749.341779147@linuxfoundation.org> References: <20180417155749.341779147@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.16-stable review patch. If anyone has any objections, please let me know. ------------------ From: Ming Lei commit bffa9909a6b48d8ca3398dec601bc9162a4020c4 upstream. >From commit 4b855ad37194 ("blk-mq: Create hctx for each present CPU), blk-mq doesn't remap queue after CPU topo is changed, that said when some of these offline CPUs become online, they are still mapped to hctx 0, then hctx 0 may become the bottleneck of IO dispatch and completion. This patch sets up the mapping from the beginning, and aligns to queue mapping for PCI device (blk_mq_pci_map_queues()). Cc: Stefan Haberland Cc: Keith Busch Cc: stable@vger.kernel.org Fixes: 4b855ad37194 ("blk-mq: Create hctx for each present CPU) Tested-by: Christian Borntraeger Reviewed-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Signed-off-by: Ming Lei Signed-off-by: Jens Axboe Signed-off-by: Greg Kroah-Hartman --- block/blk-mq-cpumap.c | 5 ----- 1 file changed, 5 deletions(-) --- a/block/blk-mq-cpumap.c +++ b/block/blk-mq-cpumap.c @@ -16,11 +16,6 @@ static int cpu_to_queue_index(unsigned int nr_queues, const int cpu) { - /* - * Non present CPU will be mapped to queue index 0. - */ - if (!cpu_present(cpu)) - return 0; return cpu % nr_queues; }