projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3d40e44
)
rhashtable-test: add cond_resched() to thread test
author
Phil Sutter
<
[email protected]
>
Fri, 20 Nov 2015 17:17:17 +0000
(18:17 +0100)
committer
David S. Miller
<
[email protected]
>
Mon, 23 Nov 2015 17:36:08 +0000
(12:36 -0500)
This should fix for soft lockup bugs triggered on slow systems.
Signed-off-by: Phil Sutter <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
lib/test_rhashtable.c
patch
|
blob
|
history
diff --git
a/lib/test_rhashtable.c
b/lib/test_rhashtable.c
index 8c1ad1ced72cc1deaed9439a789ec5e672e65ccf..63654e359256cebf987e153e545ca2f29b0889e8 100644
(file)
--- a/
lib/test_rhashtable.c
+++ b/
lib/test_rhashtable.c
@@
-236,6
+236,8
@@
static int thread_lookup_test(struct thread_data *tdata)
obj->value, key);
err++;
}
+
+ cond_resched();
}
return err;
}
@@
-251,6
+253,7
@@
static int threadfunc(void *data)
for (i = 0; i < entries; i++) {
tdata->objs[i].value = (tdata->id << 16) | i;
+ cond_resched();
err = rhashtable_insert_fast(&ht, &tdata->objs[i].node,
test_rht_params);
if (err == -ENOMEM || err == -EBUSY) {
@@
-285,6
+288,8
@@
static int threadfunc(void *data)
goto out;
}
tdata->objs[i].value = TEST_INSERT_FAIL;
+
+ cond_resched();
}
err = thread_lookup_test(tdata);
if (err) {