From: Phil Sutter <phil@nwl.cc>
To: Florian Westphal <fw@strlen.de>
Cc: Thomas Graf <tgraf@suug.ch>,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
davem@davemloft.net
Subject: Re: [PATCH] rhashtable-test: extend to test concurrency
Date: Sun, 16 Aug 2015 23:46:28 +0200 [thread overview]
Message-ID: <20150816214555.958D121475@mail.nwl.cc> (raw)
In-Reply-To: <20150816181234.GC31357@breakpoint.cc>
On Sun, Aug 16, 2015 at 08:12:35PM +0200, Florian Westphal wrote:
> Phil Sutter <phil@nwl.cc> wrote:
> > After having tested insertion, lookup, table walk and removal, spawn a
> > number of threads running operations on the same rhashtable. Each of
> > them will:
>
> [..]
>
> > + if (down_interruptible(&startup_sem))
> > + pr_err(" thread[%d]: down_interruptible failed\n", tdata->id);
>
> Why _interruptible?
>
> Seems this should use down() instead.
According to the comment in kernel/locking/semaphore.c, down() is
deprecated and one should use down_interruptible() or down_killable()
instead. Apart from that, I don't see any problem with using down()
here. If the call fails, the code is pointless if not even broken
anyway.
Cheers, Phil
next prev parent reply other threads:[~2015-08-16 21:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-14 22:37 [PATCH] rhashtable-test: extend to test concurrency Phil Sutter
2015-08-16 15:02 ` Thomas Graf
2015-08-16 18:12 ` Florian Westphal
2015-08-16 21:46 ` Phil Sutter [this message]
2015-08-17 21:32 ` David Miller
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=20150816214555.958D121475@mail.nwl.cc \
--to=phil@nwl.cc \
--cc=davem@davemloft.net \
--cc=fw@strlen.de \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--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