From: Arnd Bergmann <arnd@arndb.de>
To: Binoy Jayan <binoy.jayan@linaro.org>
Cc: Doug Ledford <dledford@redhat.com>,
Sean Hefty <sean.hefty@intel.com>,
Hal Rosenstock <hal.rosenstock@gmail.com>,
linux-rdma@vger.kernel.org,
Linux kernel mailing list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 6/8] IB/hns: Replace counting semaphore event_sem with wait condition
Date: Wed, 19 Oct 2016 17:15:10 +0200 [thread overview]
Message-ID: <4225681.X40Xeo72dr@wuerfel> (raw)
In-Reply-To: <CAHv-k__KG4wZ+dCEALRjw1U_eS2eQA63Qy=mzFjXD5SqFz85ew@mail.gmail.com>
On Tuesday, October 18, 2016 10:46:45 AM CEST Binoy Jayan wrote:
> Thank you for replying for the questions. I''ll look for alternatives
> for patches 6,7 and 8 and resend the series.
Ok, thanks!
I also looked at patch 8 some more and noticed that those four
functions all do the exact same sequence:
- initialize a mlx5_ib_umr_context on the stack
- assign "umrwr.wr.wr_cqe = &umr_context.cqe"
- take the semaphore
- call ib_post_send with a single ib_send_wr
- wait for the mlx5_ib_umr_done() function to get called
- if we get back a failure, print a warning and return -EFAULT.
- release the semaphore
Moving all of these into a shared helper function would be
a good cleanup, and it leaves only a single function using
the semaphore, which can then be rewritten to use something
else.
The existing completion in there can be simplified to a
wait_event, since we are waiting for the return value to
be filled.
Arnd
next prev parent reply other threads:[~2016-10-19 15:15 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-17 16:30 [PATCH 0/8] infiniband: Remove semaphores Binoy Jayan
[not found] ` <1476721862-7070-1-git-send-email-binoy.jayan-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2016-10-17 16:30 ` [PATCH 1/8] IB/core: iwpm_nlmsg_request: Replace semaphore with completion Binoy Jayan
2016-10-17 16:30 ` Binoy Jayan
2016-10-17 16:30 ` [PATCH 3/8] IB/hns: Replace semaphore poll_sem with mutex Binoy Jayan
2016-10-17 16:30 ` Binoy Jayan
2016-10-17 16:30 ` [PATCH 5/8] IB/isert: Replace semaphore sem with completion Binoy Jayan
2016-10-17 16:30 ` Binoy Jayan
2016-10-17 16:57 ` [PATCH 0/8] infiniband: Remove semaphores Bart Van Assche
2016-10-17 16:57 ` Bart Van Assche
[not found] ` <216461f1-3070-c93a-a560-7560a727cb8d-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2016-10-17 20:06 ` Arnd Bergmann
2016-10-17 20:06 ` Arnd Bergmann
2016-10-17 20:28 ` Bart Van Assche
2016-10-17 20:28 ` Bart Van Assche
[not found] ` <8c560960-5498-57b5-6da6-218b71d9eef9-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2016-10-17 20:37 ` Arnd Bergmann
2016-10-17 20:37 ` Arnd Bergmann
2016-10-17 16:30 ` [PATCH 2/8] IB/core: Replace semaphore sm_sem with completion Binoy Jayan
2016-10-17 16:30 ` [PATCH 4/8] IB/mthca: Replace semaphore poll_sem with mutex Binoy Jayan
2016-10-17 16:31 ` [PATCH 6/8] IB/hns: Replace counting semaphore event_sem with wait condition Binoy Jayan
[not found] ` <1476721862-7070-7-git-send-email-binoy.jayan-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2016-10-17 16:39 ` Christoph Hellwig
2016-10-17 16:39 ` Christoph Hellwig
2016-10-17 20:29 ` Arnd Bergmann
2016-10-17 20:29 ` Arnd Bergmann
2016-10-18 5:16 ` Binoy Jayan
2016-10-18 5:16 ` Binoy Jayan
2016-10-19 15:15 ` Arnd Bergmann [this message]
2016-10-17 16:31 ` [PATCH 7/8] IB/mthca: " Binoy Jayan
2016-10-17 16:39 ` Christoph Hellwig
[not found] ` <20161017163954.GB7207-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2016-10-17 20:32 ` Arnd Bergmann
2016-10-17 20:32 ` Arnd Bergmann
2016-10-17 16:31 ` [PATCH 8/8] IB/mlx5: Replace counting semaphore sem " Binoy Jayan
[not found] ` <1476721862-7070-9-git-send-email-binoy.jayan-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2016-10-17 16:40 ` Christoph Hellwig
2016-10-17 16:40 ` Christoph Hellwig
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=4225681.X40Xeo72dr@wuerfel \
--to=arnd@arndb.de \
--cc=binoy.jayan@linaro.org \
--cc=dledford@redhat.com \
--cc=hal.rosenstock@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=sean.hefty@intel.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.