From: Herbert Xu <herbert@gondor.apana.org.au>
To: Arnd Bergmann <arnd@arndb.de>
Cc: netdev@vger.kernel.org, "Acked-by : Phil Sutter" <phil@nwl.cc>,
Thomas Graf <tgraf@suug.ch>,
"David S. Miller" <davem@davemloft.net>,
NeilBrown <neilb@suse.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] [v2] test_rhashtable: remove semaphore usage
Date: Mon, 17 Dec 2018 22:25:04 +0800 [thread overview]
Message-ID: <20181217142503.tylhv4l5rbtthc2g@gondor.apana.org.au> (raw)
In-Reply-To: <20181216194836.1310998-1-arnd@arndb.de>
On Sun, Dec 16, 2018 at 08:48:21PM +0100, Arnd Bergmann wrote:
> This is one of only two files that initialize a semaphore to a negative
> value. We don't really need the two semaphores here at all, but can do
> the same thing in more conventional and more effient way, by using a
> single waitqueue and an atomic thread counter.
>
> This gets us a little bit closer to eliminating classic semaphores from
> the kernel. It also fixes a corner case where we fail to continue after
> one of the threads fails to start up.
>
> An alternative would be to use a split kthread_create()+wake_up_process()
> and completely eliminate the separate synchronization.
>
> Acked-by: Phil Sutter <phil@nwl.cc>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
next prev parent reply other threads:[~2018-12-17 14:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-16 19:48 [PATCH] [v2] test_rhashtable: remove semaphore usage Arnd Bergmann
2018-12-17 14:25 ` Herbert Xu [this message]
2018-12-18 23:36 ` David Miller
2019-01-02 10:05 ` Geert Uytterhoeven
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=20181217142503.tylhv4l5rbtthc2g@gondor.apana.org.au \
--to=herbert@gondor.apana.org.au \
--cc=arnd@arndb.de \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=neilb@suse.com \
--cc=netdev@vger.kernel.org \
--cc=phil@nwl.cc \
--cc=tgraf@suug.ch \
/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;
as well as URLs for NNTP newsgroup(s).