From: Jason Gunthorpe <jgg@ziepe.ca>
To: Tom Talpey <tom@talpey.com>
Cc: Gal Pressman <galpress@amazon.com>,
RDMA mailing list <linux-rdma@vger.kernel.org>
Subject: Re: ibv_req_notify_cq clarification
Date: Thu, 18 Feb 2021 20:45:55 -0400 [thread overview]
Message-ID: <20210219004555.GC2643399@ziepe.ca> (raw)
In-Reply-To: <4b38c6fa-0a18-9f32-4dce-af8e3e39cb8e@talpey.com>
On Thu, Feb 18, 2021 at 06:07:13PM -0500, Tom Talpey wrote:
> > > If the consumer doesn't provide a large-enough CQ, then it reaps the
> > > consequences. Same thing for WQ depth, although I am aware that some
> > > verbs implementations attempt to return a kind of EAGAIN when posting
> > > to a send WQ.
> > >
> > > What can the provider do if the CQ is "full" anyway? Buffer the CQE
> > > and go into some type of polling loop attempting to redeliver? Ouch!
> >
> > QP goes to error, CQE is discarded, IIRC.
>
> What!? There might be many QP's all sharing the same CQ. Put them
> *all* into error? And for what, because the CQ is trash anyway. This
> sounds like optimizing the error case. Uselessly.
No, only the QPs that need to push a CQE and can't.
> > Wrapping and overflowing the CQ is not acceptable, it would mean
> > reading CQEs could never be done reliably.
>
> But the provider never reads the CQ, only the consumer can read.
> The provider writes to head, ignoring tail. Consumer reads from
> tail, and it goes empty when tail == head. And if head overruns
> tail, that was the consumer's fault for posting too many WQEs.
Yes, but if the app makes a mistake you don't want to trash the whole
system. Resiliency says you contain the failure as much as possible
and the app at least has some chance to pick up the pieces.
If the HW corrupts the CQEs while the CPU is reading them then the
whole machine is toast, high chance the kernel will corrupt memory.
Jason
next prev parent reply other threads:[~2021-02-19 0:46 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-18 9:13 ibv_req_notify_cq clarification Gal Pressman
2021-02-18 12:38 ` Bernard Metzler
2021-02-18 12:47 ` Gal Pressman
2021-02-18 13:59 ` Bernard Metzler
2021-02-18 12:53 ` Jason Gunthorpe
2021-02-18 15:52 ` Gal Pressman
2021-02-18 16:23 ` Jason Gunthorpe
2021-02-18 18:47 ` Bernard Metzler
2021-02-18 22:22 ` Tom Talpey
2021-02-18 22:51 ` Jason Gunthorpe
2021-02-18 23:07 ` Tom Talpey
2021-02-19 0:45 ` Jason Gunthorpe [this message]
2021-02-19 14:31 ` Tom Talpey
2021-02-19 14:42 ` Jason Gunthorpe
2021-02-21 9:25 ` Gal Pressman
2021-02-22 13:46 ` Jason Gunthorpe
2021-02-22 15:36 ` Gal Pressman
2021-02-22 15:55 ` Jason Gunthorpe
2021-02-22 19:24 ` Gal Pressman
2021-02-22 19:37 ` Jason Gunthorpe
2021-02-23 12:18 ` Gal Pressman
2021-02-23 12:38 ` Jason Gunthorpe
2021-02-22 22:41 ` Hefty, Sean
2021-02-23 12:23 ` Gal Pressman
2021-02-23 20:48 ` Hefty, Sean
2021-02-22 18:38 ` Hefty, Sean
2021-02-22 19:26 ` Gal Pressman
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=20210219004555.GC2643399@ziepe.ca \
--to=jgg@ziepe.ca \
--cc=galpress@amazon.com \
--cc=linux-rdma@vger.kernel.org \
--cc=tom@talpey.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