public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
To: Bart Van Assche <bart.vanassche-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
Cc: Binoy Jayan <binoy.jayan-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	Sean Hefty <sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	Hal Rosenstock
	<hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	"linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH 0/8] infiniband: Remove semaphores
Date: Mon, 17 Oct 2016 22:37:38 +0200	[thread overview]
Message-ID: <11072595.MMy2tvNZxU@wuerfel> (raw)
In-Reply-To: <8c560960-5498-57b5-6da6-218b71d9eef9-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>

On Monday, October 17, 2016 1:28:01 PM CEST Bart Van Assche wrote:
> On 10/17/2016 01:06 PM, Arnd Bergmann wrote:
> > Using an open-coded semaphore as a replacement is probably just
> > the last resort that we can consider once we are down to the
> > last handful of users. I haven't looked at drivers/infiniband/
> > yet for this, but I believe that drivers/acpi/ is a case for
> > which I see no better alternative (the AML bytecode requires
> > counting semaphore semantics).
> 
> Hello Arnd,
> 
> Thanks for the detailed reply. However, I doubt that removing and 
> open-coding counting semaphores is the best alternative. Counting 
> semaphores are a useful abstraction. I think open-coding counting 
> semaphores everywhere counting semaphores are used would be a step back 
> instead of a step forward.

Absolutely agreed, that's why I said 'last resort' above. I don't
think that we need to go there for infiniband. See my reply
for patch 6 for one idea on how to handle hns and mthca. There
might be better ways.

These fall into the general category of using the counting semaphore
to count something that we already know in the code that uses
the semaphore, so we can remove the count and just need some other
waiting primitive.

	Arnd

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2016-10-17 20:37 UTC|newest]

Thread overview: 20+ 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   ` [PATCH 3/8] IB/hns: Replace semaphore poll_sem with mutex Binoy Jayan
2016-10-17 16:30   ` [PATCH 5/8] IB/isert: Replace semaphore sem with completion Binoy Jayan
2016-10-17 16:57   ` [PATCH 0/8] infiniband: Remove semaphores 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:28         ` Bart Van Assche
     [not found]           ` <8c560960-5498-57b5-6da6-218b71d9eef9-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2016-10-17 20:37             ` Arnd Bergmann [this message]
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 20:29     ` Arnd Bergmann
2016-10-18  5:16       ` Binoy Jayan
2016-10-19 15:15         ` Arnd Bergmann
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 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

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=11072595.MMy2tvNZxU@wuerfel \
    --to=arnd-r2ngtmty4d4@public.gmane.org \
    --cc=bart.vanassche-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org \
    --cc=binoy.jayan-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=sean.hefty-ral2JQCrhuEAvxtiuMwx3w@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox