From nobody Wed Apr 30 17:21:39 2025 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 4ZnkW85WZxz5tj1y; Wed, 30 Apr 2025 17:21:40 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZnkW76L5lz3Ly8; Wed, 30 Apr 2025 17:21:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746033700; 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=QXO4fUslb7ORiwOYgdUveYHsVKxc9LZF8u8Ggl1sGgg=; b=sRv3ex18qdyybnZDz+BEyOJztj1ligkq8mt0DDYS/bO+DwteqpD/kTjMGaX13AvXcBajkH yT0VwvGYJCOXD+wYx4QWzKrP5psK2OTjP0e2rlY0OF+zgDSuyZQ4his5pphacoSn7r7xlD 9gskpyNZ26kj5TsUWGLW6zMueaMldPA5MocJ8JlphaZDyNCDwNofKExPAD7dY4jM5ENhK1 SwnYMVk8KWERWN0OrnhKGZHBtUDUFbwLRaeP4mw8H91EPzHDb0snbgjIHMmMzb5PgMXWva +4Lh3PAlsBPBe2w9gGXmOL6psFPlAQLLAMCc4n3mIzp0noDz3687KrngttoCmw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746033700; a=rsa-sha256; cv=none; b=tbqgo+37X7bGLvrpNb9qdLtTlIV1cr0bZZ/cb6kRkwsBgJLPgK7jfShhu8FQfT7VCAq2Ta 5zFSmfXNX+kNaeZdyotqi3xDap1QTCiSS/3tCzuYbvyVrgSWNeh2w/p0iXdv0AOTXfLWKQ 0uoh5Su8uOu1a6BKqkCqS1BS0ooApRGWO9Wdw7r6Wk9kjvBAk9oxStzG8kcRhzX3Bsh/o2 uDiUupF5fHQ6mYVLTNVu++q+x2jHyeHjNKuW4LczpLNhetDKeDhyGrtNZupolmUlfNQemu RvjuT4Cz3yQ4oVACrGhb1OBqok9P7M1fJia37Wp0MfCv57uY3TCApBbKrTXC+g== 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=1746033700; 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=QXO4fUslb7ORiwOYgdUveYHsVKxc9LZF8u8Ggl1sGgg=; b=rB39RQuMuEGmr30jYIdd73stnGXTmuvMjH4ET68oVA6MoqFgxPtuxYHZ9ZNIlNmwFCASEs oiwUsTs4gEjhd5MoYnsYaTJC3uvluBfVAUEXu3mLV60TueYi418DM9Obouj22gOwU1eSDD axp9hhIWFq2N1eb0IQQF/H2JQOSfUCCe5FwcUtJBJ3JYaeI2dFtNNcePJ/FrY/79mJc/fd q/OjGaGIaiguKAt0vit0oU/PxgtPCyYwIaWT8ijHlZA6p7jSe+x7RWzR2tSNRV5ZD2b+GU dMFS3VpE2NG6qTZg3nZvnVG9oAPW1VGW3t6hDqjecNBSXOKOLBTG2hOaI9Fe1w== 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 4ZnkW72Rlnzjw; Wed, 30 Apr 2025 17:21:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 53UHLdBG093884; Wed, 30 Apr 2025 17:21:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 53UHLdXX093866; Wed, 30 Apr 2025 17:21:39 GMT (envelope-from git) Date: Wed, 30 Apr 2025 17:21:39 GMT Message-Id: <202504301721.53UHLdXX093866@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 897fcbe89391 - stable/14 - mpi3mr: Update consumer index of admin and operational reply queues after every 100 replies 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: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 897fcbe893912e0e0bdf3116cc1f599e5e8fb210 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=897fcbe893912e0e0bdf3116cc1f599e5e8fb210 commit 897fcbe893912e0e0bdf3116cc1f599e5e8fb210 Author: Chandrakanth patil AuthorDate: 2024-03-14 18:41:07 +0000 Commit: Warner Losh CommitDate: 2025-04-30 17:05:51 +0000 mpi3mr: Update consumer index of admin and operational reply queues after every 100 replies Instead of updating the ConsumerIndex of the Admin and Operational ReplyQueues after processing all replies in the queue, it will now be periodically updated after processing every 100 replies. Reviewed by: imp Approved by: imp Differential revision: https://reviews.freebsd.org/D44425 (cherry picked from commit eb7a4b35de89a0e22f1fb373df33d79135b68dd8) --- sys/dev/mpi3mr/mpi3mr.c | 14 +++++++++++++- sys/dev/mpi3mr/mpi3mr.h | 2 ++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/sys/dev/mpi3mr/mpi3mr.c b/sys/dev/mpi3mr/mpi3mr.c index ab17ea4e2692..41981dce0c5f 100644 --- a/sys/dev/mpi3mr/mpi3mr.c +++ b/sys/dev/mpi3mr/mpi3mr.c @@ -4389,6 +4389,7 @@ static int mpi3mr_complete_admin_cmd(struct mpi3mr_softc *sc) U32 num_adm_reply = 0; U64 reply_dma = 0; Mpi3DefaultReplyDescriptor_t *reply_desc; + U16 threshold_comps = 0; mtx_lock_spin(&sc->admin_reply_lock); if (sc->admin_in_use == false) { @@ -4426,6 +4427,11 @@ static int mpi3mr_complete_admin_cmd(struct mpi3mr_softc *sc) if ((reply_desc->ReplyFlags & MPI3_REPLY_DESCRIPT_FLAGS_PHASE_MASK) != exp_phase) break; + + if (++threshold_comps == MPI3MR_THRESHOLD_REPLY_COUNT) { + mpi3mr_regwrite(sc, MPI3_SYSIF_ADMIN_REPLY_Q_CI_OFFSET, adm_reply_ci); + threshold_comps = 0; + } } while (1); mpi3mr_regwrite(sc, MPI3_SYSIF_ADMIN_REPLY_Q_CI_OFFSET, adm_reply_ci); @@ -4838,7 +4844,7 @@ int mpi3mr_complete_io_cmd(struct mpi3mr_softc *sc, U32 num_op_replies = 0; U64 reply_dma = 0; Mpi3DefaultReplyDescriptor_t *reply_desc; - U16 req_qid = 0; + U16 req_qid = 0, threshold_comps = 0; mtx_lock_spin(&op_reply_q->q_lock); if (op_reply_q->in_use == false) { @@ -4883,6 +4889,12 @@ int mpi3mr_complete_io_cmd(struct mpi3mr_softc *sc, if ((reply_desc->ReplyFlags & MPI3_REPLY_DESCRIPT_FLAGS_PHASE_MASK) != exp_phase) break; + + if (++threshold_comps == MPI3MR_THRESHOLD_REPLY_COUNT) { + mpi3mr_regwrite(sc, MPI3_SYSIF_OPER_REPLY_Q_N_CI_OFFSET(op_reply_q->qid), reply_ci); + threshold_comps = 0; + } + } while (1); diff --git a/sys/dev/mpi3mr/mpi3mr.h b/sys/dev/mpi3mr/mpi3mr.h index 7dc1b3ba3fc2..6838e7fe616a 100644 --- a/sys/dev/mpi3mr/mpi3mr.h +++ b/sys/dev/mpi3mr/mpi3mr.h @@ -124,6 +124,8 @@ #define MPI3MR_OP_REP_Q_QD 1024 #define MPI3MR_OP_REP_Q_QD_A0 4096 +#define MPI3MR_THRESHOLD_REPLY_COUNT 100 + #define MPI3MR_CHAINSGE_SIZE MPI3MR_4K_PGSZ #define MPI3MR_SGEFLAGS_SYSTEM_SIMPLE_END_OF_LIST \