From nobody Thu Jun 06 10:39:33 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vw16Y4kM2z5Mfwf; Thu, 06 Jun 2024 10:39:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vw16Y40C5z4jPW; Thu, 6 Jun 2024 10:39:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1717670373; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=liJ+NfwkWcmDTDuPGAh///9oR989W/n7SNGGBPlVka0=; b=sxayB6QrzTb8BD3nYZGsLvonOXDtmbhWvFJ569stiSjHmpN67umFFLsJeHSi9p9+CjV3hw VMqPjp5CRDrmo125aXjy6Byn2sasJ3hvZVMBHOIF8GU84h+96BGEN3D8hw5DkQMJrTFo7S 8sJ42dLAG1P8npmnabw2quoNvSZ9vcGbtoIA97JaqQegqoAmF+ePiMdn/I9JYJv5ZGoeG2 rB+J2EhkXLUpG3cXKkaVPCgtQQDt+b2LvhtYzuUDpAb499KTegLD0fvqRwPyoBpWMDQr6G WEkEY76xq/kqXefrXkgnNYaG8AyVwhLpOwU1d9MweT/BNtsKpJChc29PzRslng== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1717670373; a=rsa-sha256; cv=none; b=DH7weJRcCyZckpGH0OVfsLeGNg59xxrMolgXDVDo9vooVB9QnRk4T4XmxiN9Y259VIKXub hyp9vdbWq7YscA4LrWycIrFdPG6fe70lo/wRS3MCm/cccc8HvFUHmzuWUoRv3jLaFFEdFZ ctSh77rq8RPHNOsL+0Z1JgCpTjOrZqwzlNypZK4SEiTB6CF0HaJYQLWrl3LnyDNISh+jHK t8B6wEkxwhNUmq8opiBZsw4ZAuygJ7Y7O0diSahCpLPheLjx8999XruAg9dXBooyREi9Dr txYTEQ1yZ06O3/RgZ8WJh1nfN36Fz5UhtlF6own3V9UHmmi8RKf0rEzx32dljQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1717670373; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=liJ+NfwkWcmDTDuPGAh///9oR989W/n7SNGGBPlVka0=; b=bGG8L5gpjl2ZBCt1+OsPFNsJphUZx/X5WPer1Uu1cbrZBA7I/ijvQ1lxCVmZKaLlJTMHMa dnpac41xVAayj+sZmkY0WDEDMThPNt+vUpxDHMNoppX+JdjGhHb0zrX6vqrlgULfIRDSVs ENGRZgiHPwO7bMwUUPkHqU4Iap/IyqLzKyAAYU285Fa72wSxNIJ65g9ySEQit1J6lEzUom rujl4lE+hFBWGxLqRpS+1tFR0GahF0sjyynUNZDrnfXLsHQCh680zhhJZgpxy+SbC7qcXN 0kg3bil/3Xqqt8+NLxKp2tE7c5Q5xr/POdR09RYAMU+IpMsqrCbt9yVStISk5A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vw16Y2wjMzj4h; Thu, 6 Jun 2024 10:39:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 456AdXds090141; Thu, 6 Jun 2024 10:39:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 456AdXZ4090138; Thu, 6 Jun 2024 10:39:33 GMT (envelope-from git) Date: Thu, 6 Jun 2024 10:39:33 GMT Message-Id: <202406061039.456AdXZ4090138@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Sumit Saxena Subject: git: 8d3c3b52423f - main - mpi3mr: Track IO per target counter during queue poll with local variable List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ssaxena X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8d3c3b52423f9740da424aa6dd73a20e694a9e08 Auto-Submitted: auto-generated The branch main has been updated by ssaxena: URL: https://cgit.FreeBSD.org/src/commit/?id=8d3c3b52423f9740da424aa6dd73a20e694a9e08 commit 8d3c3b52423f9740da424aa6dd73a20e694a9e08 Author: Chandrakanth patil AuthorDate: 2024-06-06 10:28:38 +0000 Commit: Sumit Saxena CommitDate: 2024-06-06 10:39:16 +0000 mpi3mr: Track IO per target counter during queue poll with local variable Reviewed by: imp Approved by: imp Differential revision: https://reviews.freebsd.org/D44494 --- sys/dev/mpi3mr/mpi3mr_cam.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/sys/dev/mpi3mr/mpi3mr_cam.c b/sys/dev/mpi3mr/mpi3mr_cam.c index e3958ed8daf2..e00d61073d96 100644 --- a/sys/dev/mpi3mr/mpi3mr_cam.c +++ b/sys/dev/mpi3mr/mpi3mr_cam.c @@ -1839,6 +1839,7 @@ int mpi3mr_remove_device_from_os(struct mpi3mr_softc *sc, U16 handle) { int retval = 0; struct mpi3mr_target *target; + unsigned int target_outstanding; mpi3mr_dprint(sc, MPI3MR_EVENT, "Removing Device (dev_handle: %d)\n", handle); @@ -1856,16 +1857,17 @@ int mpi3mr_remove_device_from_os(struct mpi3mr_softc *sc, U16 handle) target->flags |= MPI3MRSAS_TARGET_INREMOVAL; - if (mpi3mr_atomic_read(&target->outstanding)) { - mpi3mr_dprint(sc, MPI3MR_ERROR, "there are [%2d] outstanding IOs on target: %d" - "Poll reply queue once\n", mpi3mr_atomic_read(&target->outstanding), - target->per_id); - mpi3mr_poll_pend_io_completions(sc); - if (mpi3mr_atomic_read(&target->outstanding)) - mpi3mr_dprint(sc, MPI3MR_ERROR, "[%2d] outstanding IOs present on target: %d" - "despite poll\n", mpi3mr_atomic_read(&target->outstanding), - target->per_id); - } + target_outstanding = mpi3mr_atomic_read(&target->outstanding); + if (target_outstanding) { + mpi3mr_dprint(sc, MPI3MR_ERROR, "there are [%2d] outstanding IOs on target: %d " + "Poll reply queue once\n", target_outstanding, target->per_id); + mpi3mr_poll_pend_io_completions(sc); + target_outstanding = mpi3mr_atomic_read(&target->outstanding); + if (target_outstanding) + target_outstanding = mpi3mr_atomic_read(&target->outstanding); + mpi3mr_dprint(sc, MPI3MR_ERROR, "[%2d] outstanding IOs present on target: %d " + "despite poll\n", target_outstanding, target->per_id); + } if (target->exposed_to_os && !sc->reset_in_progress) { mpi3mr_rescan_target(sc, target);