From: Leon Romanovsky <leon@kernel.org>
To: Yamin Friedman <yaminf@mellanox.com>
Cc: Jason Gunthorpe <jgg@mellanox.com>,
Sagi Grimberg <sagi@grimberg.me>, Christoph Hellwig <hch@lst.de>,
linux-rdma@vger.kernel.org
Subject: Re: [PATCH 1/4] infiniband/core: Add protection for shared CQs used by ULPs
Date: Mon, 11 May 2020 19:45:01 +0300 [thread overview]
Message-ID: <20200511164501.GE356445@unreal> (raw)
In-Reply-To: <892bf273-b343-0ca5-ba96-b0c02bdb510d@mellanox.com>
On Mon, May 11, 2020 at 02:59:44PM +0300, Yamin Friedman wrote:
>
> On 5/11/2020 7:37 AM, Leon Romanovsky wrote:
> > On Sun, May 10, 2020 at 05:55:54PM +0300, Yamin Friedman wrote:
> > > A pre-step for adding shared CQs. Add the infra-structure to prevent
> > > shared CQ users from altering the CQ configurations. For now all cqs are
> > > marked as private (non-shared). The core driver should use the new force
> > > functions to perform resize/destroy/moderation changes that are not
> > > allowed for users of shared CQs.
> > >
> > > Signed-off-by: Yamin Friedman <yaminf@mellanox.com>
> > > Reviewed-by: Or Gerlitz <ogerlitz@mellanox.com>
> > > ---
> > > drivers/infiniband/core/cq.c | 25 ++++++++++++++++++-------
> > > drivers/infiniband/core/verbs.c | 37 ++++++++++++++++++++++++++++++++++---
> > > include/rdma/ib_verbs.h | 20 +++++++++++++++++++-
> > > 3 files changed, 71 insertions(+), 11 deletions(-)
> > infiniband/core -> RDMA/core
> Will fix.
> >
> > > diff --git a/drivers/infiniband/core/cq.c b/drivers/infiniband/core/cq.c
> > > index 4f25b24..443a9cd 100644
> > > --- a/drivers/infiniband/core/cq.c
> > > +++ b/drivers/infiniband/core/cq.c
> > > @@ -37,6 +37,7 @@ static void ib_cq_rdma_dim_work(struct work_struct *w)
> > > {
> > > struct dim *dim = container_of(w, struct dim, work);
> > > struct ib_cq *cq = dim->priv;
> > > + int ret;
> > >
> > > u16 usec = rdma_dim_prof[dim->profile_ix].usec;
> > > u16 comps = rdma_dim_prof[dim->profile_ix].comps;
> > > @@ -44,7 +45,10 @@ static void ib_cq_rdma_dim_work(struct work_struct *w)
> > > dim->state = DIM_START_MEASURE;
> > >
> > > trace_cq_modify(cq, comps, usec);
> > > - cq->device->ops.modify_cq(cq, comps, usec);
> > > + ret = rdma_set_cq_moderation_force(cq, comps, usec);
> > > + if (ret)
> > > + WARN_ONCE(1, "Failed set moderation for CQ 0x%p\n", cq);
> > First WARN_ONCE(ret, ...), second no to pointer address print and third
> > this dump stack won't help, because CQ moderation will fail for many
> > reasons unrelated to the caller.
> Would it be better to not include any warning for failed calls?
At least for most of the places, the answer is yes, you are better to
delete WARN_*s.
WARN_*s are good thing to catch programmers errors, something that can't
be but happened. It is wrong to use them inform about the failures.
Thanks
next prev parent reply other threads:[~2020-05-11 16:45 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-10 14:55 [PATCH 0/4] Introducing RDMA shared CQ pool Yamin Friedman
2020-05-10 14:55 ` [PATCH 1/4] infiniband/core: Add protection for shared CQs used by ULPs Yamin Friedman
2020-05-11 4:37 ` Leon Romanovsky
2020-05-11 8:39 ` Sagi Grimberg
2020-05-11 11:52 ` Yamin Friedman
2020-05-11 11:59 ` Yamin Friedman
2020-05-11 16:45 ` Leon Romanovsky [this message]
2020-05-10 14:55 ` [PATCH 2/4] RDMA/core: Introduce shared CQ pool API Yamin Friedman
2020-05-11 5:07 ` Leon Romanovsky
2020-05-11 12:08 ` Yamin Friedman
2020-05-11 16:39 ` Leon Romanovsky
2020-05-12 7:00 ` Yamin Friedman
2020-05-12 8:08 ` Leon Romanovsky
2020-05-11 8:49 ` Sagi Grimberg
2020-05-11 12:03 ` Yamin Friedman
2020-05-12 6:55 ` Sagi Grimberg
2020-05-12 8:40 ` Yamin Friedman
2020-05-12 3:08 ` [RDMA/core] 7b491b3fb2: BUG:kernel_hang_in_test_stage kernel test robot
2020-05-12 3:08 ` kernel test robot
2020-05-10 14:55 ` [PATCH 3/4] nvme-rdma: use new shared CQ mechanism Yamin Friedman
2020-05-11 8:50 ` Sagi Grimberg
2020-05-11 16:29 ` Max Gurtovoy
2020-05-10 14:55 ` [PATCH 4/4] nvmet-rdma: " Yamin Friedman
2020-05-11 8:50 ` Sagi Grimberg
2020-05-10 15:04 ` [PATCH 0/4] Introducing RDMA shared CQ pool Gal Pressman
2020-05-10 15:17 ` Yamin Friedman
2020-05-11 8:34 ` Sagi Grimberg
2020-05-11 12:24 ` Yamin Friedman
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=20200511164501.GE356445@unreal \
--to=leon@kernel.org \
--cc=hch@lst.de \
--cc=jgg@mellanox.com \
--cc=linux-rdma@vger.kernel.org \
--cc=sagi@grimberg.me \
--cc=yaminf@mellanox.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 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.