All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Hefty, Sean" <sean.hefty@intel.com>
To: Gal Pressman <galpress@amazon.com>, Jason Gunthorpe <jgg@ziepe.ca>
Cc: RDMA mailing list <linux-rdma@vger.kernel.org>
Subject: RE: ibv_req_notify_cq clarification
Date: Tue, 23 Feb 2021 20:48:42 +0000	[thread overview]
Message-ID: <MW3PR11MB4651E18E0D74699538E37E6F9E809@MW3PR11MB4651.namprd11.prod.outlook.com> (raw)
In-Reply-To: <47a7c3a3-ebe1-7fa1-b47e-650ad4d6e736@amazon.com>

> I agree that this behavior is most likely better, but it contradicts the api
> agreement.
> It seems like you should write your app according to the provider you're using
> in order to get it right.

The app should code for edge triggered behavior for correctness.  I'm saying if the NIC actually uses level triggering (I don't know if they do or not), the app can't tell and will just work.

> > The app can do:
> >
> > Wakeup
> > While read cqe succeeds
> > 	Process cqe
> > Read cq event
> > Arm cq
> > /* cqe's may have been written between the last read and arming */
> > While read cqe succeeds
> > 	Process cqe
> > Sleep
> >
> > Or shorten this to:
> >
> > Wakeup
> > Read cq event
> > Arm cq
> > While read cqe succeeds
> > 	Process cqe
> > Sleep
> >
> > In both cases, all cqe's must be processed after calling arm, and it's possible to
> read a cq event only to find the cq empty.  One could argue which is more efficient,
> but we're talking about a sleeping thread in either case.
> 
> Yea, this seems correct.
> But as I said in my reply to Jason, libibverbs examples, pyverbs tests and
> perftest all go from "Read cq event" to "Arm cq" immediately.

Both options provide correct behavior, regardless of how signaling works.  The issue is that perftest does:

For I = 1 to 16
	If read cqe succeeds
		Process cqe

Instead of

While read cqe succeeds
	Process cqe

Perftest will only work if it's lucky or with level signaling.  I would not assume perftest is correct just because no one has reported the problem before.  :)

- Sean

  reply	other threads:[~2021-02-23 20:49 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 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
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 [this message]
2021-02-22 18:38             ` Hefty, Sean
2021-02-22 19:26               ` Gal Pressman
2021-02-18 18:47     ` Bernard Metzler

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=MW3PR11MB4651E18E0D74699538E37E6F9E809@MW3PR11MB4651.namprd11.prod.outlook.com \
    --to=sean.hefty@intel.com \
    --cc=galpress@amazon.com \
    --cc=jgg@ziepe.ca \
    --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 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.