Home
last modified time | relevance | path

Searched refs:nthreads (Results 1 – 25 of 39) sorted by relevance

12

/src/sys/contrib/openzfs/lib/libspl/
H A Dtaskq.c275 taskq_create(const char *name, int nthreads, pri_t pri, in taskq_create() argument
284 ASSERT3S(nthreads, >=, 0); in taskq_create()
285 ASSERT3S(nthreads, <=, 100); in taskq_create()
286 pct = MIN(nthreads, 100); in taskq_create()
289 nthreads = (sysconf(_SC_NPROCESSORS_ONLN) * pct) / 100; in taskq_create()
290 nthreads = MAX(nthreads, 1); /* need at least 1 thread */ in taskq_create()
292 ASSERT3S(nthreads, >=, 1); in taskq_create()
302 tq->tq_active = nthreads; in taskq_create()
303 tq->tq_nthreads = nthreads; in taskq_create()
308 tq->tq_threadlist = kmem_alloc(nthreads * sizeof (kthread_t *), in taskq_create()
[all …]
/src/sys/contrib/openzfs/module/os/freebsd/spl/
H A Dspl_taskq.c207 taskq_create_impl(const char *name, int nthreads, pri_t pri, in taskq_create_impl() argument
213 nthreads = MAX((mp_ncpus * nthreads) / 100, 1); in taskq_create_impl()
216 tq->tq_nthreads = nthreads; in taskq_create_impl()
223 (void) taskqueue_start_threads_in_proc(&tq->tq_queue, nthreads, pri, in taskq_create_impl()
230 taskq_create(const char *name, int nthreads, pri_t pri, int minalloc __unused, in taskq_create() argument
233 return (taskq_create_impl(name, nthreads, pri, system_proc, flags)); in taskq_create()
237 taskq_create_proc(const char *name, int nthreads, pri_t pri, in taskq_create_proc() argument
240 return (taskq_create_impl(name, nthreads, pri, proc, flags)); in taskq_create_proc()
281 taskq_create_synced(const char *name, int nthreads, pri_t pri, in taskq_create_synced() argument
285 taskq_sync_arg_t *tqs = kmem_zalloc(sizeof (*tqs) * nthreads, KM_SLEEP); in taskq_create_synced()
[all …]
/src/tools/tools/netrate/netreceive/
H A Dnetreceive.c125 make_threads(int *s, int nsock, int nthreads) in make_threads() argument
127 int i, si, nt = nsock * nthreads; in make_threads()
157 main_thread(struct td_desc **tp, int nsock, int nthreads) in main_thread() argument
166 int i, nt = nsock * nthreads; in main_thread()
199 int error, v, nthreads = 1; in main() local
217 nthreads = strtoul(argv[2], &dummy, 10); in main()
218 if (nthreads < 1 || nthreads > 64) in main()
265 nsock, nthreads, (u_short)port); in main()
267 tp = make_threads(s, nsock, nthreads); in main()
268 main_thread(tp, nsock, nthreads); in main()
/src/contrib/libder/tests/
H A Dfuzz_parallel.c80 size_t nthreads; in LLVMFuzzerTestOneInput() local
99 for (nthreads = 0; nthreads < frame->frame_threads; nthreads++) { in LLVMFuzzerTestOneInput()
100 if (pthread_create(&threads[nthreads], NULL, thread_main, in LLVMFuzzerTestOneInput()
105 for (uint8_t i = 0; i < nthreads; i++) in LLVMFuzzerTestOneInput()
/src/sys/cddl/compat/opensolaris/kern/
H A Dopensolaris_taskq.c65 taskq_create_impl(const char *name, int nthreads, pri_t pri, proc_t *proc, in taskq_create_impl() argument
71 nthreads = MAX((mp_ncpus * nthreads) / 100, 1); in taskq_create_impl()
76 (void) taskqueue_start_threads_in_proc(&tq->tq_queue, nthreads, pri, in taskq_create_impl()
83 taskq_create(const char *name, int nthreads, pri_t pri, int minalloc __unused, in taskq_create() argument
86 return (taskq_create_impl(name, nthreads, pri, system_proc, flags)); in taskq_create()
90 taskq_create_proc(const char *name, int nthreads, pri_t pri, int minalloc, in taskq_create_proc() argument
93 return (taskq_create_impl(name, nthreads, pri, proc, flags)); in taskq_create_proc()
/src/tools/test/stress2/misc/
H A Drdgsbase.sh127 start(int nthreads)
129 pthread_t thrs[nthreads * 2];
132 for (i = 0; i < nthreads; i++) {
137 for (; i < 2 * nthreads; i++) {
148 int error, nthreads;
163 len = sizeof(nthreads);
164 error = sysctl(mib, nitems(mib), &nthreads, &len, NULL, 0);
169 start(nthreads);
/src/contrib/netbsd-tests/lib/libpthread/
H A Dh_resolv.c144 int nthreads = NTHREADS; in main() local
160 nthreads = atoi(optarg); in main()
172 if ((nleft = malloc(nthreads * sizeof(int))) == NULL) in main()
180 for (i = 0; i < nthreads; i++) { in main()
187 for (i = 0; i < nthreads; i++) { in main()
/src/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cp_files/
H A Dseekflood.c116 int nthreads = 0; in main() local
119 (nthreads = atoi(argv[2])) == 0) { in main()
127 for (int i = 0; i < nthreads; i++) { in main()
166 for (int i = 0; i < nthreads; i++) { in main()
/src/usr.bin/sort/
H A Dradixsort.c104 if (sort_left == 0 && nthreads > 1) in sort_left_dec()
150 if (nthreads > 1) { in push_ls()
633 if (nthreads < 2) { in run_top_sort_level()
640 for(i = 0; i < nthreads; ++i) { in run_top_sort_level()
662 for (i = 0; i < nthreads; ++i) in run_top_sort_level()
674 size_t nthreads_save = nthreads; in run_sort()
676 nthreads = 1; in run_sort()
678 if (nthreads > 1) { in run_sort()
709 if (nthreads > 1) { in run_sort()
713 nthreads = nthreads_save; in run_sort()
H A Dfile.c1400 if (nthreads < 2 || list->count < MT_SORT_THRESHOLD) { in mt_sort()
1401 size_t nthreads_save = nthreads; in mt_sort()
1402 nthreads = 1; in mt_sort()
1410 nthreads = nthreads_save; in mt_sort()
1417 parts = sort_malloc(sizeof(struct sort_list*) * nthreads); in mt_sort()
1419 avgsize = list->count / nthreads; in mt_sort()
1425 for (i = 0; i < nthreads; ++i) { in mt_sort()
1433 sz = (i == nthreads - 1) ? list->count - cstart : in mt_sort()
1447 for (i = 0; i < nthreads; ++i) { in mt_sort()
1471 for (i = 0; i < nthreads; ++i) { in mt_sort()
[all …]
H A Dsort.c98 size_t nthreads = 1; variable
282 nthreads = ncpu; in set_hw_params()
1121 nthreads = (size_t)(atoi(optarg)); in main()
1122 if (nthreads < 1) in main()
1123 nthreads = 1; in main()
1124 if (nthreads > 1024) in main()
1125 nthreads = 1024; in main()
1222 nthreads = 1; in main()
1265 nthreads = 1; in main()
H A Dsort.h52 extern size_t nthreads;
/src/sys/contrib/openzfs/module/os/linux/spl/
H A Dspl-taskq.c1347 int nthreads = threads_arg; in taskq_create() local
1355 ASSERT(nthreads <= 100); in taskq_create()
1356 ASSERT(nthreads >= 0); in taskq_create()
1357 nthreads = MIN(threads_arg, 100); in taskq_create()
1358 nthreads = MAX(nthreads, 0); in taskq_create()
1359 nthreads = MAX((num_online_cpus() * nthreads) /100, 1); in taskq_create()
1384 tq->tq_maxthreads = nthreads; in taskq_create()
1416 nthreads = 1; in taskq_create()
1418 for (i = 0; i < nthreads; i++) { in taskq_create()
1546 taskq_create_synced(const char *name, int nthreads, pri_t pri, in taskq_create_synced() argument
[all …]
/src/sys/contrib/openzfs/include/os/linux/spl/sys/
H A Dtaskq.h205 #define taskq_create_proc(name, nthreads, pri, min, max, proc, flags) \ argument
206 taskq_create(name, nthreads, pri, min, max, flags)
207 #define taskq_create_sysdc(name, nthreads, min, max, proc, dc, flags) \ argument
209 taskq_create(name, nthreads, maxclsyspri, min, max, flags))
/src/cddl/contrib/opensolaris/tools/ctf/cvt/
H A Dbarrier.c46 barrier_init(barrier_t *bar, int nthreads) in barrier_init() argument
51 bar->bar_nthr = nthreads; in barrier_init()
/src/sys/powerpc/powernv/
H A Dplatform_powernv.c454 int res, nthreads; in powernv_smp_probe_threads() local
466 nthreads = 1; in powernv_smp_probe_threads()
475 nthreads = res / sizeof(cell_t); in powernv_smp_probe_threads()
477 nthreads = 1; in powernv_smp_probe_threads()
481 smp_threads_per_core = nthreads; in powernv_smp_probe_threads()
482 if (mp_ncpus % nthreads == 0) in powernv_smp_probe_threads()
483 mp_ncores = mp_ncpus / nthreads; in powernv_smp_probe_threads()
/src/lib/libc/tests/resolv/
H A Dresolv_test.c254 size_t nthreads = NTHREADS; in run_tests() local
274 threads = calloc(nthreads, sizeof(pthread_t)); in run_tests()
277 for (i = 0; i < nthreads; i++) { in run_tests()
281 for (i = 0; i < nthreads; i++) { in run_tests()
/src/contrib/jemalloc/include/jemalloc/internal/
H A Darena_structs.h34 atomic_u_t nthreads[2]; member
H A Darena_externs.h38 unsigned *nthreads, const char **dss, ssize_t *dirty_decay_ms,
40 void arena_stats_merge(tsdn_t *tsdn, arena_t *arena, unsigned *nthreads,
H A Dctl.h72 unsigned nthreads; member
/src/tools/tools/netmap/
H A Dpkt-gen.c269 int nthreads; member
1403 if (targ->g->nthreads > 1) { in ping_body()
1591 if (targ->g->nthreads > 1) { in pong_body()
1683 uint64_t n = targ->g->npackets / targ->g->nthreads; in sender_body()
1931 uint64_t n = targ->g->npackets / targ->g->nthreads; in receiver_body()
2061 if (targ->g->nthreads > 1) { in txseq_body()
2621 targs = calloc(g->nthreads, sizeof(*targs)); in start_threads()
2627 for (i = 0; i < g->nthreads; i++) { in start_threads()
2698 for (i = 0; i < g->nthreads; i++) { in start_threads()
2734 for (i = 0; i < g->nthreads; i++) { in main_thread()
[all …]
/src/contrib/llvm-project/openmp/runtime/src/
H A Dkmp_tasking.cpp2093 kmp_int32 nthreads = this_thr->th.th_team_nproc; local
2094 for (int i = 0; i < nthreads; ++i) {
3382 kmp_int32 nthreads, victim_tid = -2, use_own_tasks = 1, new_victim = 0, local
3400 nthreads = task_team->tt.tt_nproc;
3414 if ((task == NULL) && (nthreads > 1)) { // Steal a task finally
3432 victim_tid = __kmp_get_random(thread) % (nthreads - 1);
3583 if (nthreads == 1 &&
3664 int nthreads, i, is_init_thread; local
3672 nthreads = task_team->tt.tt_nproc;
3673 KMP_DEBUG_ASSERT(nthreads > 0);
[all …]
/src/contrib/jemalloc/src/
H A Darena.c74 arena_basic_stats_merge(tsdn_t *tsdn, arena_t *arena, unsigned *nthreads, in arena_basic_stats_merge() argument
77 *nthreads += arena_nthreads_get(arena, false); in arena_basic_stats_merge()
85 arena_stats_merge(tsdn_t *tsdn, arena_t *arena, unsigned *nthreads, in arena_stats_merge() argument
92 arena_basic_stats_merge(tsdn, arena, nthreads, dss, dirty_decay_ms, in arena_stats_merge()
1585 return atomic_load_u(&arena->nthreads[internal], ATOMIC_RELAXED); in arena_nthreads_get()
1590 atomic_fetch_add_u(&arena->nthreads[internal], 1, ATOMIC_RELAXED); in arena_nthreads_inc()
1595 atomic_fetch_sub_u(&arena->nthreads[internal], 1, ATOMIC_RELAXED); in arena_nthreads_dec()
1620 atomic_store_u(&arena->nthreads[0], 0, ATOMIC_RELAXED); in arena_new()
1621 atomic_store_u(&arena->nthreads[1], 0, ATOMIC_RELAXED); in arena_new()
1857 atomic_store_u(&arena->nthreads[0], 0, ATOMIC_RELAXED); in arena_postfork_child()
[all …]
/src/sys/kern/
H A Dkern_thread.c165 static __exclusive_cache_line int nthreads; variable
184 nthreads_new = atomic_fetchadd_int(&nthreads, 1) + 1; in thread_count_inc_try()
188 atomic_subtract_int(&nthreads, 1); in thread_count_inc_try()
223 atomic_subtract_int(&nthreads, n); in thread_count_sub()
/src/contrib/googletest/googletest/src/
H A Dgtest-port.cc208 size_t nthreads = 0;
210 if (info[i].p_tid != -1) nthreads++;
212 return nthreads;

12