summaryrefslogtreecommitdiff
path: root/lib/test_objpool.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/test_objpool.c')
-rw-r--r--lib/test_objpool.c22
1 files changed, 7 insertions, 15 deletions
diff --git a/lib/test_objpool.c b/lib/test_objpool.c
index bfdb81599832..896c0131c9a8 100644
--- a/lib/test_objpool.c
+++ b/lib/test_objpool.c
@@ -371,14 +371,10 @@ static int ot_start_sync(struct ot_test *test)
if (!cpu_online(cpu))
continue;
- work = kthread_create_on_node(ot_thread_worker, item,
- cpu_to_node(cpu), "ot_worker_%d", cpu);
- if (IS_ERR(work)) {
+ work = kthread_run_on_cpu(ot_thread_worker, item,
+ cpu, "ot_worker_%d");
+ if (IS_ERR(work))
pr_err("failed to create thread for cpu %d\n", cpu);
- } else {
- kthread_bind(work, cpu);
- wake_up_process(work);
- }
}
/* wait a while to make sure all threads waiting at start line */
@@ -562,14 +558,9 @@ static int ot_start_async(struct ot_test *test)
if (!cpu_online(cpu))
continue;
- work = kthread_create_on_node(ot_thread_worker, item,
- cpu_to_node(cpu), "ot_worker_%d", cpu);
- if (IS_ERR(work)) {
+ work = kthread_run_on_cpu(ot_thread_worker, item, cpu, "ot_worker_%d");
+ if (IS_ERR(work))
pr_err("failed to create thread for cpu %d\n", cpu);
- } else {
- kthread_bind(work, cpu);
- wake_up_process(work);
- }
}
/* wait a while to make sure all threads waiting at start line */
@@ -687,4 +678,5 @@ static void __exit ot_mod_exit(void)
module_init(ot_mod_init);
module_exit(ot_mod_exit);
-MODULE_LICENSE("GPL"); \ No newline at end of file
+MODULE_DESCRIPTION("Test module for lockless object pool");
+MODULE_LICENSE("GPL");