From: Sasha Levin <sashal@kernel.org>
To: stable@vger.kernel.org
Cc: alvalan9@foxmail.com, Sasha Levin <sashal@kernel.org>
Subject: Re: [PATCH 6.6.y] RDMA/bnxt_re: Avoid CPU lockups due fifo occupancy check loop
Date: Wed, 22 Jan 2025 09:16:30 -0500 [thread overview]
Message-ID: <20250122090206-42a50ceed708cf59@stable.kernel.org> (raw)
In-Reply-To: <tencent_ABAD564DE407BF249EF53E0E184C5CC30006@qq.com>
[ Sasha's backport helper bot ]
Hi,
The upstream commit SHA1 provided is correct: 8be3e5b0c96beeefe9d5486b96575d104d3e7d17
WARNING: Author mismatch between patch and upstream commit:
Backport author: alvalan9@foxmail.com
Commit author: Selvin Xavier<selvin.xavier@broadcom.com>
Status in newer kernel trees:
6.12.y | Present (exact SHA1)
6.6.y | Not found
Note: The patch differs from the upstream commit:
---
1: 8be3e5b0c96be ! 1: ee8c4af490b25 RDMA/bnxt_re: Avoid CPU lockups due fifo occupancy check loop
@@ Metadata
## Commit message ##
RDMA/bnxt_re: Avoid CPU lockups due fifo occupancy check loop
+ [ Upstream commit 8be3e5b0c96beeefe9d5486b96575d104d3e7d17 ]
+
Driver waits indefinitely for the fifo occupancy to go below a threshold
as soon as the pacing interrupt is received. This can cause soft lockup on
one of the processors, if the rate of DB is very high.
@@ Commit message
Reviewed-by: Chandramohan Akula <chandramohan.akula@broadcom.com>
Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
+ [ Add the declaration of variable pacing_data to make it work on 6.6.y ]
+ Signed-off-by: Alva Lan <alvalan9@foxmail.com>
## drivers/infiniband/hw/bnxt_re/main.c ##
-@@ drivers/infiniband/hw/bnxt_re/main.c: static bool is_dbr_fifo_full(struct bnxt_re_dev *rdev)
+@@ drivers/infiniband/hw/bnxt_re/main.c: static void bnxt_re_set_default_pacing_data(struct bnxt_re_dev *rdev)
static void __wait_for_fifo_occupancy_below_th(struct bnxt_re_dev *rdev)
{
- struct bnxt_qplib_db_pacing_data *pacing_data = rdev->qplib_res.pacing_data;
+ u32 read_val, fifo_occup;
++ struct bnxt_qplib_db_pacing_data *pacing_data = rdev->qplib_res.pacing_data;
+ u32 retry_fifo_check = 1000;
- u32 fifo_occup;
/* loop shouldn't run infintely as the occupancy usually goes
+ * below pacing algo threshold as soon as pacing kicks in.
@@ drivers/infiniband/hw/bnxt_re/main.c: static void __wait_for_fifo_occupancy_below_th(struct bnxt_re_dev *rdev)
- if (fifo_occup < pacing_data->pacing_th)
+ if (fifo_occup < rdev->qplib_res.pacing_data->pacing_th)
break;
+ if (!retry_fifo_check--) {
+ dev_info_once(rdev_to_dev(rdev),
---
Results of testing on various branches:
| Branch | Patch Apply | Build Test |
|---------------------------|-------------|------------|
| stable/linux-6.6.y | Success | Success |
prev parent reply other threads:[~2025-01-22 14:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-22 11:37 [PATCH 6.6.y] RDMA/bnxt_re: Avoid CPU lockups due fifo occupancy check loop alvalan9
2025-01-22 14:16 ` Sasha Levin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250122090206-42a50ceed708cf59@stable.kernel.org \
--to=sashal@kernel.org \
--cc=alvalan9@foxmail.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.