Lines Matching refs:tdata

602 static int thread_lookup_test(struct thread_data *tdata)  in thread_lookup_test()  argument
604 unsigned int entries = tdata->entries; in thread_lookup_test()
611 .tid = tdata->id, in thread_lookup_test()
615 if (obj && (tdata->objs[i].value.id == TEST_INSERT_FAIL)) { in thread_lookup_test()
618 } else if (!obj && (tdata->objs[i].value.id != TEST_INSERT_FAIL)) { in thread_lookup_test()
635 struct thread_data *tdata = data; in threadfunc() local
640 pr_err(" thread[%d]: interrupted\n", tdata->id); in threadfunc()
644 for (i = 0; i < tdata->entries; i++) { in threadfunc()
645 tdata->objs[i].value.id = i; in threadfunc()
646 tdata->objs[i].value.tid = tdata->id; in threadfunc()
647 err = insert_retry(&ht, &tdata->objs[i], test_rht_params); in threadfunc()
652 tdata->id); in threadfunc()
658 tdata->id, insert_retries); in threadfunc()
660 err = thread_lookup_test(tdata); in threadfunc()
663 tdata->id); in threadfunc()
668 for (i = 0; i < tdata->entries; i += step) { in threadfunc()
669 if (tdata->objs[i].value.id == TEST_INSERT_FAIL) in threadfunc()
671 err = rhashtable_remove_fast(&ht, &tdata->objs[i].node, in threadfunc()
675 tdata->id); in threadfunc()
678 tdata->objs[i].value.id = TEST_INSERT_FAIL; in threadfunc()
682 err = thread_lookup_test(tdata); in threadfunc()
685 tdata->id); in threadfunc()
702 struct thread_data *tdata; in test_rht_init() local
762 tdata = vzalloc(array_size(tcount, sizeof(struct thread_data))); in test_rht_init()
763 if (!tdata) in test_rht_init()
767 vfree(tdata); in test_rht_init()
777 vfree(tdata); in test_rht_init()
782 tdata[i].id = i; in test_rht_init()
783 tdata[i].entries = entries; in test_rht_init()
784 tdata[i].objs = objs + i * entries; in test_rht_init()
785 tdata[i].task = kthread_run(threadfunc, &tdata[i], in test_rht_init()
787 if (IS_ERR(tdata[i].task)) { in test_rht_init()
800 if (IS_ERR(tdata[i].task)) in test_rht_init()
802 if ((err = kthread_stop(tdata[i].task))) { in test_rht_init()
809 vfree(tdata); in test_rht_init()