From: Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Jason Gunthorpe
<jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Chuck Lever <chuck.lever-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>,
Sagi Grimberg <sagig-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
Chien Yen <chien.yen-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Subject: Re: [PATCH] IB/core: Make ib_dealloc_pd return void
Date: Fri, 14 Aug 2015 21:05:07 -0400 [thread overview]
Message-ID: <55CE9043.1030804@redhat.com> (raw)
In-Reply-To: <20150805203431.GB30271-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 2451 bytes --]
On 08/05/2015 04:34 PM, Jason Gunthorpe wrote:
> The majority of callers never check the return value, and even if they
> did, they can't do anything about a failure.
>
> All possible failure cases represent a bug in the caller, so just
> WARN_ON inside the function instead.
>
> This fixes a few random errors:
> net/rd/iw.c infinite loops while it fails. (racing with EBUSY?)
>
> This also lays the ground work to get rid of error return from the
> drivers. Most drivers do not error, the few that do are broken since
> it cannot be handled.
>
> Since uverbs can legitimately make use of EBUSY, open code the
> check.
>
> Signed-off-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
> ---
> drivers/infiniband/core/uverbs_cmd.c | 22 ++++++++++++++++------
> drivers/infiniband/core/verbs.c | 26 ++++++++++++++++++++------
> drivers/infiniband/ulp/ipoib/ipoib_verbs.c | 4 +---
> drivers/infiniband/ulp/iser/iser_verbs.c | 2 +-
> include/rdma/ib_verbs.h | 6 +-----
> net/rds/iw.c | 5 +----
> net/sunrpc/xprtrdma/verbs.c | 2 +-
> 7 files changed, 41 insertions(+), 26 deletions(-)
>
> Doug, this applies after the local_dma_lkey cleanup series.
>
> Lightly tested with ipoib/uverbs/umad on mlx4.
>
> This patch will expose buggy ULPs, I would not be too surprised to see
> a report of the WARN_ON triggering...
I'm not sure I like this patch. I have my concerns that this will make
debugging and catching problems more difficult. In particular, in the
recent past when I was working on the IPoIB driver and its
startup/shutdown sequence, I wrote this changelog:
This factoring is needed in preparation for having per-device work
queues. The original per-device workqueue code resulted in the
following error message:
<ibdev>: ib_dealloc_pd failed
The change you put in here will make note of the driver that fails to
return a clean return, but the error happens elsewhere. This obscures
the source of the error. And it's not out of the question (or even
unlikely) that shifts in how people do transfer engines might result in
lost allocations and this warning popping up. It serves as a final
check on the ULP, and to me that has value.
--
Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
GPG KeyID: 0E572FDD
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 884 bytes --]
next prev parent reply other threads:[~2015-08-15 1:05 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-05 20:34 [PATCH] IB/core: Make ib_dealloc_pd return void Jason Gunthorpe
[not found] ` <20150805203431.GB30271-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-08-05 20:50 ` Chuck Lever
[not found] ` <C771535C-C9AD-4AC1-81BF-2A4122D5EDAE-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2015-08-05 21:00 ` Anna Schumaker
[not found] ` <55C2795C.7060700-ZwjVKphTwtPQT0dZR+AlfA@public.gmane.org>
2015-08-05 21:08 ` Chuck Lever
2015-08-06 17:56 ` Chuck Lever
2015-08-06 17:56 ` Chuck Lever
2015-08-06 17:31 ` Sagi Grimberg
[not found] ` <55C39A0E.6020008-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2015-08-11 5:57 ` Jason Gunthorpe
[not found] ` <20150811055731.GD13314-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-08-11 6:57 ` Sagi Grimberg
2015-08-15 1:05 ` Doug Ledford [this message]
[not found] ` <55CE9043.1030804-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-08-15 2:27 ` Jason Gunthorpe
[not found] ` <20150815022747.GA30693-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-08-15 3:13 ` Doug Ledford
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=55CE9043.1030804@redhat.com \
--to=dledford-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
--cc=chien.yen-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org \
--cc=chuck.lever-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org \
--cc=jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=sagig-VPRAkNaXOzVWk0Htik3J/w@public.gmane.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.