Thread (5 messages) flat view 5 messages, 4 authors, 2015-08-17

Re: [PATCH] rhashtable-test: extend to test concurrency

From: Phil Sutter <phil@nwl.cc>
Date: 2015-08-16 21:45:59
Also in: lkml

On Sun, Aug 16, 2015 at 08:12:35PM +0200, Florian Westphal wrote:
Phil Sutter [off-list ref] wrote:
quoted
After having tested insertion, lookup, table walk and removal, spawn a
number of threads running operations on the same rhashtable. Each of
them will:
[..]
quoted
+	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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help