public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: Cheng Xu <chengyou@linux.alibaba.com>
Cc: leon@kernel.org, linux-rdma@vger.kernel.org, KaiShen@linux.alibaba.com
Subject: Re: [PATCH for-next 0/3] RDMA/erdma: Support flushing all WRs after QP state changed to ERROR
Date: Thu, 24 Nov 2022 15:00:53 -0400	[thread overview]
Message-ID: <Y3+/ZS5O19aHWgHc@nvidia.com> (raw)
In-Reply-To: <20221116023107.82835-1-chengyou@linux.alibaba.com>

On Wed, Nov 16, 2022 at 10:31:04AM +0800, Cheng Xu wrote:
> Hi,
> 
> This series introduces the support of flushing all WRs posted to hardware
> after QP state changed to ERROR.
> 
> Old Firmware may not flush the newly posted WRs after QP state chagned to
> ERROR, because it's a little difficult for firmware to get the realtime
> PI (producer index) of QPs, especially for the RQs.
> 
> Previously we want to avoid this issue by implementing custom
> drain_{sq/rq} [1], but this has falw, as Tom and Jason pointed out, which
> we also meet in some scenarios, for example, NoF fatal recovery.
> 
> So, we introduce a new mechanism to fix this. When registering the ibdev,
> we create a workqueue for reflushing (we name it "reflush", because
> hardware is already start flushing for the QPs at that time, and it's used
> for hardware to flush newly posted WRs). Once QP needs to flush WRs, or
> new WRs posted after flushing, we post a delay work to the workqueue or
> modify the delay time if is already posted. In the work, driver notifies
> the lastest PIs to firmware by CMDQ, so that firmware can flush all the
> newly posted WRs. This applies to kernel QP first.
> 
> - #1 adds a workqueue for WRs reflushing.
> - #2 adds a reflushing work for each QP.
> - #4 notifies the lastest PIs to firmware for reflushing.
> 
> [1] https://lore.kernel.org/all/20220824094251.23190-3-chengyou@linux.alibaba.com/t/
> 
> Thanks,
> Cheng Xu
> 
> Cheng Xu (3):
>   RDMA/erdma: Add a workqueue for WRs reflushing
>   RDMA/erdma: Implement the lifecycle of reflushing work for each QP
>   RDMA/erdma: Notify the latest PI to FW for reflushing when necessary

Applied to for-next, thanks

Jason

      parent reply	other threads:[~2022-11-24 19:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-16  2:31 [PATCH for-next 0/3] RDMA/erdma: Support flushing all WRs after QP state changed to ERROR Cheng Xu
2022-11-16  2:31 ` [PATCH for-next 1/3] RDMA/erdma: Add a workqueue for WRs reflushing Cheng Xu
2022-11-16  2:31 ` [PATCH for-next 2/3] RDMA/erdma: Implement the lifecycle of reflushing work for each QP Cheng Xu
2022-11-16  2:31 ` [PATCH for-next 3/3] RDMA/erdma: Notify the latest PI to FW for reflushing when necessary Cheng Xu
2022-11-24 19:00 ` Jason Gunthorpe [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=Y3+/ZS5O19aHWgHc@nvidia.com \
    --to=jgg@nvidia.com \
    --cc=KaiShen@linux.alibaba.com \
    --cc=chengyou@linux.alibaba.com \
    --cc=leon@kernel.org \
    --cc=linux-rdma@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox