Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1208277
| From | Phil Sutter <phil@nwl.cc> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] rhashtable-test: extend to test concurrency |
| Date | 2015-08-16 23:50 +0200 |
| Message-ID | <pYdYu-46c-13@gated-at.bofh.it> (permalink) |
| References | <pXvNM-7b2-9@gated-at.bofh.it> <pYaHf-7UB-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] rhashtable-test: extend to test concurrency Phil Sutter <phil@nwl.cc> - 2015-08-15 00:40 +0200
Re: [PATCH] rhashtable-test: extend to test concurrency Thomas Graf <tgraf@suug.ch> - 2015-08-16 17:10 +0200
Re: [PATCH] rhashtable-test: extend to test concurrency Florian Westphal <fw@strlen.de> - 2015-08-16 20:20 +0200
Re: [PATCH] rhashtable-test: extend to test concurrency Phil Sutter <phil@nwl.cc> - 2015-08-16 23:50 +0200
Re: [PATCH] rhashtable-test: extend to test concurrency David Miller <davem@davemloft.net> - 2015-08-17 23:40 +0200
csiph-web