From: "Nelson, Shannon" <shannon.nelson@amd.com>
To: Simon Horman <horms@kernel.org>
Cc: andrew+netdev@lunn.ch, brett.creeley@amd.com,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, michal.swiatkowski@linux.intel.com,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH net 1/6] pds_core: Prevent possible adminq overflow/stuck condition
Date: Wed, 9 Apr 2025 16:32:26 -0700 [thread overview]
Message-ID: <15f8ff56-0359-450b-9fa3-cbb57781985b@amd.com> (raw)
In-Reply-To: <20250409093730.GJ395307@horms.kernel.org>
On 4/9/2025 2:37 AM, Simon Horman wrote:
>
> On Mon, Apr 07, 2025 at 03:51:08PM -0700, Shannon Nelson wrote:
>> From: Brett Creeley <brett.creeley@amd.com>
>>
>> The pds_core's adminq is protected by the adminq_lock, which prevents
>> more than 1 command to be posted onto it at any one time. This makes it
>> so the client drivers cannot simultaneously post adminq commands.
>> However, the completions happen in a different context, which means
>> multiple adminq commands can be posted sequentially and all waiting
>> on completion.
>>
>> On the FW side, the backing adminq request queue is only 16 entries
>> long and the retry mechanism and/or overflow/stuck prevention is
>> lacking. This can cause the adminq to get stuck, so commands are no
>> longer processed and completions are no longer sent by the FW.
>>
>> As an initial fix, prevent more than 16 outstanding adminq commands so
>> there's no way to cause the adminq from getting stuck. This works
>> because the backing adminq request queue will never have more than 16
>> pending adminq commands, so it will never overflow. This is done by
>> reducing the adminq depth to 16.
>>
>> Fixes: 792d36ccc163 ("pds_core: Clean up init/uninit flows to be more readable")
>
> Hi Brett and Shannon,
>
> I see that the cited commit added the lines that are being updated
> to pdsc_core_init(). But it seems to me that it did so by moving
> them from pdsc_setup(). So I wonder if it is actually the commit
> that added the code to pdsc_setup() that is being fixed.
>
> If so, perhaps:
>
> Fixes: 45d76f492938 ("pds_core: set up device and adminq")
Perhaps... is it better to call out the older commit even tho' lines
have moved around and this possibly won't apply?
sln
>
>> Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
>> Signed-off-by: Brett Creeley <brett.creeley@amd.com>
>> Signed-off-by: Shannon Nelson <shannon.nelson@amd.com>
>
> ...
next prev parent reply other threads:[~2025-04-09 23:32 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-07 22:51 [PATCH net 0/6] pds_core: updates and fixes Shannon Nelson
2025-04-07 22:51 ` [PATCH net 1/6] pds_core: Prevent possible adminq overflow/stuck condition Shannon Nelson
2025-04-09 9:37 ` Simon Horman
2025-04-09 23:32 ` Nelson, Shannon [this message]
2025-04-11 18:59 ` Simon Horman
2025-04-07 22:51 ` [PATCH net 2/6] pds_core: remove extra name description Shannon Nelson
2025-04-09 9:41 ` Simon Horman
2025-04-07 22:51 ` [PATCH net 3/6] pds_core: handle unsupported PDS_CORE_CMD_FW_CONTROL result Shannon Nelson
2025-04-09 16:34 ` Simon Horman
2025-04-09 23:35 ` Nelson, Shannon
2025-04-07 22:51 ` [PATCH net 4/6] pds_core: Remove unnecessary check in pds_client_adminq_cmd() Shannon Nelson
2025-04-09 17:07 ` Simon Horman
2025-04-07 22:51 ` [PATCH net 5/6] pds_core: smaller adminq poll starting interval Shannon Nelson
2025-04-09 16:50 ` Simon Horman
2025-04-09 23:28 ` Nelson, Shannon
2025-04-07 22:51 ` [PATCH net 6/6] pds_core: make wait_context part of q_info Shannon Nelson
2025-04-09 17:06 ` Simon Horman
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=15f8ff56-0359-450b-9fa3-cbb57781985b@amd.com \
--to=shannon.nelson@amd.com \
--cc=andrew+netdev@lunn.ch \
--cc=brett.creeley@amd.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.swiatkowski@linux.intel.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox