<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:PMingLiU;
        panose-1:2 2 5 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"\@PMingLiU";
        panose-1:2 1 6 1 0 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:10.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;
        mso-ligatures:none;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt">Hi Tim,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Thanks, I will create new LP bug.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">William<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<div id="mail-editor-reference-message-container">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><span style="font-size:12.0pt;color:black">From:
</span></b><span style="font-size:12.0pt;color:black">Tim Gardner <tim.gardner@canonical.com><br>
<b>Date: </b>Thursday, October 19, 2023 at 9:07 AM<br>
<b>To: </b>William Tu <witu@nvidia.com>, kernel-team@lists.ubuntu.com <kernel-team@lists.ubuntu.com><br>
<b>Cc: </b>Majd Dibbiny <majd@nvidia.com>, Bodong Wang <bodong@nvidia.com>, Jiri Pirko <jiri@nvidia.com>, Vladimir Sokolovsky <vlad@nvidia.com><br>
<b>Subject: </b>Re: NAK: [SRU][J:linux-bluefield][PATCH 0/1] Devlink backport: fix race and lock issue<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:11.0pt">External email: Use caution opening links or attachments<br>
<br>
<br>
On 10/19/23 10:03 AM, Tim Gardner wrote:<br>
> On 10/19/23 9:09 AM, William Tu wrote:<br>
>> BugLink: <a href="https://bugs.launchpad.net/bugs/2032378">https://bugs.launchpad.net/bugs/2032378</a><br>
>><br>
>> The patch is a follow-up from the previous devlink backport series.<br>
>> We've found that devlink reload hangs the system when testing against<br>
>> OFED 2307.<br>
>><br>
>> [ 1089.747409] INFO: task devlink:8753 blocked for more than 120 seconds.<br>
>> [ 1089.760560]       Tainted: G           OE     5.15.0-1027-bluefield<br>
>> #29-Ubuntu<br>
>> [ 1089.775086] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs"<br>
>> disables this message.<br>
>> [ 1089.790829] task:devlink         state:D stack:    0 pid: 8753<br>
>> ppid:  5090 flags:0x00000004<br>
>> [ 1089.790838] Call trace:<br>
>> [ 1089.790840]  __switch_to+0xf8/0x150<br>
>> [ 1089.790857]  __schedule+0x2b8/0x790<br>
>> [ 1089.790865]  schedule+0x64/0x140<br>
>> [ 1089.790870]  schedule_preempt_disabled+0x18/0x24<br>
>> [ 1089.790874]  __mutex_lock.constprop.0+0x1a0/0x680<br>
>> [ 1089.790878]  __mutex_lock_slowpath+0x40/0x90<br>
>> [ 1089.790883]  mutex_lock+0x64/0x70<br>
>> [ 1089.790887]  devl_lock+0x1c/0x30<br>
>> [ 1089.790893]  mlx5_detach_device+0x58/0x190 [mlx5_core]<br>
>> [ 1089.791055]  mlx5_unload_one+0x40/0xe4 [mlx5_core]<br>
>> [ 1089.791177]  mlx5_devlink_reload_down+0x184/0x270 [mlx5_core]<br>
>> [ 1089.791318]  devlink_reload+0x214/0x290<br>
>><br>
>> Checking the OFED source code, we found this missing devl trap group<br>
>> also need to be backported to avoid deadlock.<br>
>><br>
>> void mlx5_detach_device(struct mlx5_core_dev *dev, bool suspend)<br>
>> {<br>
>> ...<br>
>> #ifdef HAVE_DEVL_PORT_REGISTER<br>
>> #ifdef HAVE_DEVL_TRAP_GROUPS_REGISTER<br>
>>          devl_assert_locked(priv_to_devlink(dev));<br>
>> #else<br>
>>          devl_lock(devlink);<br>
>> #endif /* HAVE_DEVL_TRAP_GROUPS_REGISTER */<br>
>> #endif /* HAVE_DEVL_PORT_REGISTER */<br>
>>          mutex_lock(&mlx5_intf_mutex);<br>
>> #ifdef HAVE_DEVL_PORT_REGISTER<br>
>><br>
>> I'm re-using the same BugLink as it is relevant issue.<br>
>><br>
>> Jiri Pirko (1):<br>
>>    net: devlink: add unlocked variants of devling_trap*() functions<br>
>><br>
>>   include/net/devlink.h |  20 +++++<br>
>>   net/core/devlink.c    | 180 ++++++++++++++++++++++++++++++++++--------<br>
>>   2 files changed, 168 insertions(+), 32 deletions(-)<br>
>><br>
><br>
> This needs a new LP bug since 00371808 is already fix committed. Also,<br>
> there was no patch or PR attached to this email. What are we supposed to<br>
> do with it ?<br>
><br>
<br>
Never mind that last part. It was in my SPAM for some reason.<br>
Nevertheless, you need a new LP bug.<br>
--<br>
-----------<br>
Tim Gardner<br>
Canonical, Inc<o:p></o:p></span></p>
</div>
</div>
</div>
</div>
</body>
</html>