Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4820516ybl; Wed, 22 Jan 2020 05:22:55 -0800 (PST) X-Google-Smtp-Source: APXvYqxvkh/nkcY42qnqpBJIYccmTj1Rh1BrlerPKlCoV0HVnfYu2nSEZoMzr1UafEYfT4bNDI6m X-Received: by 2002:a05:6808:312:: with SMTP id i18mr6917768oie.44.1579699375030; Wed, 22 Jan 2020 05:22:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579699375; cv=none; d=google.com; s=arc-20160816; b=H3KhJrbf81d9KJXkQUtUuboh7No6ZeDLxgJU61ZXsHsfXkFWTUXWU2HaB/8UGUkuO1 ep8ZMXVWf0eHQPAfcZ02AmgfBeCM2Ylma/dRDMovi5zcLB85DLCTr5PL477zdaoULYao 6pXEu0tU0PUp36xQev00gydYiyoGAukLaRpoEtr9Z7wjE7/fskl0mVw5YVHnUlQ+7V6f ev39tkSIAkV8ybioJPZckh9qjSpYyWFdBDCqMRLGNlVhpzoFBX9p2gC2k48+1bYVBcYz IVNZVBe6yh1IBHpYST68yuD0wtrBdqfKJGM6yAmRqQZQFgwA3EazVKzAUhV0pVTLfHcK MIZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=/Ownh1/+gAS5uMywJkzlrbyw3/etRdAVlvwI5h2UYic=; b=oo8gD3iiSJrVLwr99t7l2GAGIyTtGljXmTDKkjkG/ri8IwSv9KZManGY4MUrmuy7tt sujCQ1dJWK71T0SKHHerwfnYUypGvhijJdlIwzjL+R+loUG8QtZx5IUZbXU5vo3SWXWy PpMzkKLKpTuSz384I4GwiKqRkSMNeG01diqw594ura+oH7lZlryDrwRYWoK1+0qLuz8Y 6d9FsjkhKY8YlBd/dR4iOVxIIH0K/v5P4YNs5RDbOjmulT2h2BROLMnRU6i6HRmlmzmt EK9tArMvRJwB+pTBkE3W5HGg8fILYYtZgbwj9+00HaD6H8yNZWfu0GsKYT8aI6gOCQSu ZICw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=fI9i9FgY; 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 d14si13915137otp.151.2020.01.22.05.22.43; Wed, 22 Jan 2020 05:22:55 -0800 (PST) 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; dkim=pass header.i=@kernel.org header.s=default header.b=fI9i9FgY; 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 S1729851AbgAVNT5 (ORCPT + 99 others); Wed, 22 Jan 2020 08:19:57 -0500 Received: from mail.kernel.org ([198.145.29.99]:35926 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729826AbgAVNTy (ORCPT ); Wed, 22 Jan 2020 08:19:54 -0500 Received: from localhost (unknown [84.241.205.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id EC2A82467A; Wed, 22 Jan 2020 13:19:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579699193; bh=zrgM32+MfYz8uFvX7xck2BXM2ageeXgUiFXT/ybNLUw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fI9i9FgYuQKj/YaiMQ+8BlhnjSi7GcWJ1jCcr+Mj1bIaBOQZ6PrpVF6iT0/VA1QMc lWy3e69qnvGvXyELZk/GjPRSEPEfwFy3RznFHtcpK1c/5vEBC9uheU9mmQMcQRg3Ue Dp5aUU/zeW6I+C2P3W9yD9FgeJ8NtM6LZDuZ+pjc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ming Lei , Long Li , "Martin K. Petersen" Subject: [PATCH 5.4 068/222] scsi: storvsc: Correctly set number of hardware queues for IDE disk Date: Wed, 22 Jan 2020 10:27:34 +0100 Message-Id: <20200122092838.593531809@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200122092833.339495161@linuxfoundation.org> References: <20200122092833.339495161@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Long Li commit 7b571c19d4c0b78d27dd3bf1f3c42e4032390af6 upstream. Commit 0ed881027690 ("scsi: storvsc: setup 1:1 mapping between hardware queue and CPU queue") introduced a regression for disks attached to IDE. For these disks the host VSP only offers one VMBUS channel. Setting multiple queues can overload the VMBUS channel and result in performance drop for high queue depth workload on system with large number of CPUs. Fix it by leaving the number of hardware queues to 1 (default value) for IDE disks. Fixes: 0ed881027690 ("scsi: storvsc: setup 1:1 mapping between hardware queue and CPU queue") Link: https://lore.kernel.org/r/1578960516-108228-1-git-send-email-longli@linuxonhyperv.com Reviewed-by: Ming Lei Signed-off-by: Long Li Signed-off-by: Martin K. Petersen Signed-off-by: Greg Kroah-Hartman --- drivers/scsi/storvsc_drv.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/drivers/scsi/storvsc_drv.c +++ b/drivers/scsi/storvsc_drv.c @@ -1835,9 +1835,11 @@ static int storvsc_probe(struct hv_devic */ host->sg_tablesize = (stor_device->max_transfer_bytes >> PAGE_SHIFT); /* + * For non-IDE disks, the host supports multiple channels. * Set the number of HW queues we are supporting. */ - host->nr_hw_queues = num_present_cpus(); + if (!dev_is_ide) + host->nr_hw_queues = num_present_cpus(); /* * Set the error handler work queue.