From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=34.202.193.197 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795928185; b=OiO+ZToCgy6zj8eNzJMTmmfd+gNZwz1GXwA/9X984jG6ILXLzIXUn+ROAi0oxBdMY+49 P1wUya/CpdueBQD6CikPQKdCc8+u3kDboQ8a0cXUiCgJA6EqoUVCWWy73aLZbeBQDNRGj l+qDfgKQNYUofuJKbuxdPALqywSYTJoiB4enQON1JYpDfT4cNIFtv0YeV9lLEAOfzDNt0 kCLAt3Orwd4sA8omSvXuRx+3amhb3BBxPq686emlXj4M1BCUjpqmjW30PhuBmoZa+/ryZ MlRS4Xd95n8FQhBb+VOXP6sTon4pFXRp8nNcNeWJblAugmTm2v81OiCA1Sts8uJpGWg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795928185; h=DMARC-Filter:DKIM-Signature:DKIM-Signature:Feedback-ID: X-Pm-Original-To:Received:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:MIME-Version:Content-Transfer-Encoding: X-MIME-Autoconverted:Content-Type; bh=jxFcQX7+Cig034K9k4vVTRNlupkp+xEcXIET7Ltk2Ok=; b=eAo/qsvChGBDPX7aU9Hs8WK0NJIFaZeQThnZ71eizJ28oIFRH9AstdUhRWfDxfnI+45V AMR9AQToZcltxuRbreCf5EQu11XWBxa1owevLeHAlvluxVcuM1+THugbWsjheqaJj4nd1 1OF84sXmDhWYDoGvbXMC4k2Zs1ZPTbb7m8rnEo+mQlE7ramCPD9TrW/7D5OJUIEgupWqt Ci1vlMLMexDE+DRfQsGfjTvblOWNP9DovbPqN0cBuJWrg7EliMauQXIxag/mg0dFTb09F Ea+8o8gTFI9pplpha2lPJ4Cog4So/7dY/58CUFVvXouC+To3UNZiBzC+ilW7nLQnSoA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=atomlin.com; spf=pass smtp.mailfrom=atomlin.com; dkim=pass header.d=atomlin.com header.i=@atomlin.com header.a=rsa-sha256 header.s=purelymail3 header.b=3TZDBAmf; dkim=pass header.d=purelymail.com header.i=@purelymail.com header.a=rsa-sha256 header.s=purelymail3 header.b=ohTbyX6d; arc=none smtp.remote-ip=34.202.193.197 Received: from sendmail.purelymail.com (sendmail.purelymail.com [34.202.193.197]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2D720606A327 for ; Sun, 29 Nov 2026 04:56:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 2D720606A327 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=atomlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=atomlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=atomlin.com header.i=@atomlin.com header.a=rsa-sha256 header.s=purelymail3 header.b=3TZDBAmf; dkim=pass (2048-bit key, unprotected) header.d=purelymail.com header.i=@purelymail.com header.a=rsa-sha256 header.s=purelymail3 header.b=ohTbyX6d DKIM-Signature: a=rsa-sha256; b=3TZDBAmf73CTn+HOkBvh3NS+icTns08VSYyHdG97FJb7YZWkqboraRJpjDcTRfncSjLh+gqsUUE/v4suIHEV0604sts7r6oRwxkTj5QyS0ZX/NatM2CFc1wPPCdGWyAJ3i2NoQoSC/1GgC7QCn5Ttp2MOUk/CZmKmg90ySghGEw9dkLGm4m097QqiJ5tjti60WjkYQYBqJBXq7ekeu8MCIy2DDaowgBf2DbvbLKHJ08DyNP8B0qWWL//qLWtPesbE7haXerL/NkcE64HE9pKEvMTR5VGfcnFKyOEQJ4ulTTpOOwzHJ79P/oipOaX/Bai0Tb8l5mBerpt5Sh5UjswRw==; s=purelymail3; d=atomlin.com; v=1; bh=jxFcQX7+Cig034K9k4vVTRNlupkp+xEcXIET7Ltk2Ok=; h=Received:From:To:Subject:Date:Message-ID; DKIM-Signature: a=rsa-sha256; b=ohTbyX6dMZKqak1TeUCU+jMCzqc3YqjOhyXPJ/ewOV9rO+SBLHhpCrpuh9YkvhD+3uCzNztUaAn0uDrZr21g4DUbyviweLd0ifidYWbUrcrx4baZWtNwhfqMSTWPAGXFFFmQOZT3hy0wGkVIHX+7n+7yImqsiF+AmJtztFdEJtEgd2Hiyggj7k3ugRkXmY1rvfuczoZf9rQ0n3dIS08cB36bct59+hkjaSUKWaP2sKa2xuuQhgyM7khL33dV5T335OMR0ZyLPlBxjg8c5tq6aFCa72STp1YQc/R/lpSpPlLUzfZUkPUCLAYSirDlw0pvconz70EQzE75VhFES7vssA==; s=purelymail3; d=purelymail.com; v=1; bh=jxFcQX7+Cig034K9k4vVTRNlupkp+xEcXIET7Ltk2Ok=; h=Feedback-ID:Received:From:To:Subject:Date:Message-ID; Feedback-ID: 1802931:67223:null:purelymail X-Pm-Original-To: linux-fsdevel@vger.kernel.org Authentication-Results: purelymail.com; auth=pass Received: by smtp.purelymail.com (Purelymail SMTP) with ESMTPSA id -284714038; (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Sun, 29 Nov 2026 04:54:38 +0000 (UTC) From: Aaron Tomlin To: axboe@kernel.dk, tglx@kernel.org, aacraid@microsemi.com, James.Bottomley@HansenPartnership.com, mkp@kernel.org, frederic@kernel.org, bigeasy@linutronix.de, gmaglione@redhat.com, vgoyal@redhat.com, stefanha@redhat.com, miklos@szeredi.hu Cc: atomlin@atomlin.com, dwagner@suse.de, eperezma@redhat.com, tom.leiming@gmail.com, ionut.nechita@windriver.com, corbet@lwn.net, vincent.guittot@linaro.org, mingo@redhat.com, peterz@infradead.org, radu@rendec.net, akpm@linux-foundation.org, steve@abita.co, sean@ashe.io, chjohnst@gmail.com, neelx@suse.com, mproche@gmail.com, nick.lange@gmail.com, marco.crivellari@suse.com, rishil1999@outlook.com, linux-doc@vger.kernel.org, linux-block@vger.kernel.org, linux-scsi@vger.kernel.org, virtualization@lists.linux.dev, linux-fsdevel@vger.kernel.org, fuse-devel@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH v17 01/10] scsi: aacraid: use block layer helpers to calculate num of queues Date: Sat, 28 Nov 2026 23:54:25 -0500 Message-ID: <20261129045436.255364-2-atomlin@atomlin.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261129045436.255364-1-atomlin@atomlin.com> References: <20261129045436.255364-1-atomlin@atomlin.com> X-Mailing-List: linux-fsdevel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by Purelymail Content-Type: text/plain; charset=UTF-8 From: Daniel Wagner The calculation of the upper limit for queues does not depend solely on the number of online CPUs; for example, the isolcpus kernel command-line option must also be considered. To account for this, the block layer provides a helper function to retrieve the maximum number of queues. Use it to set an appropriate upper queue number limit. This patch brings aacraid in line with the API migration initiated for other SCSI drivers in commit 94970cfb5f10 ("scsi: use block layer helpers to calculate num of queues"). Signed-off-by: Daniel Wagner Reviewed-by: Martin K. Petersen Reviewed-by: Hannes Reinecke Signed-off-by: Aaron Tomlin --- drivers/scsi/aacraid/comminit.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/scsi/aacraid/comminit.c b/drivers/scsi/aacraid/commini= t.c index 9bd3f5b868bc..ec165b57182d 100644 --- a/drivers/scsi/aacraid/comminit.c +++ b/drivers/scsi/aacraid/comminit.c @@ -469,8 +469,7 @@ void aac_define_int_mode(struct aac_dev *dev) =09} =20 =09/* Don't bother allocating more MSI-X vectors than cpus */ -=09msi_count =3D min(dev->max_msix, -=09=09(unsigned int)num_online_cpus()); +=09msi_count =3D blk_mq_num_online_queues(dev->max_msix); =20 =09dev->max_msix =3D msi_count; =20 --=20 2.55.0