Home
last modified time | relevance | path

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

12

/linux/tools/testing/selftests/mm/
H A Dmigration.c32 int nthreads; in FIXTURE()
56 self->nthreads = numa_num_task_cpus() - 2; in FIXTURE_SETUP()
70 if (self->nthreads < 1 || self->n1 < 0 || self->n2 < 0) in migrate()
73 self->threads = malloc(self->nthreads * sizeof(*self->threads)); in migrate()
75 self->pids = malloc(self->nthreads * sizeof(*self->pids)); in migrate()
91 for (i = 0; i < self->nthreads; i++) { in migrate()
176 for (i = 0; i < self->nthreads; i++)
181 for (i = 0; i < self->nthreads; i++)
199 for (i = 0; i < self->nthreads; i++) {
240 for (i = 0; i < self->nthreads;
30 int nthreads; FIXTURE() local
[all...]
H A Dgup_test.c95 int filed, i, opt, nr_pages = 1, thp = -1, write = 1, nthreads = 1, ret; in main()
133 nthreads = atoi(optarg); in main()
217 ksft_set_plan(nthreads); in main()
261 tid = malloc(sizeof(pthread_t) * nthreads);
263 for (i = 0; i < nthreads; i++) {
267 for (i = 0; i < nthreads; i++) {
94 int filed, i, opt, nr_pages = 1, thp = -1, write = 1, nthreads = 1, ret; main() local
/linux/tools/perf/bench/
H A Dfutex-requeue.c55 OPT_UINTEGER('t', "threads", &params.nthreads, "Specify amount of threads"),
79 params.nthreads, in print_summary()
134 threads_starting = params.nthreads; in block_threads()
141 for (i = 0; i < params.nthreads; i++) { in block_threads()
194 if (!params.nthreads) in bench_futex_requeue()
195 params.nthreads = perf_cpu_map__nr(cpu); in bench_futex_requeue()
197 worker = calloc(params.nthreads, sizeof(*worker)); in bench_futex_requeue()
204 if (params.nrequeue > params.nthreads) in bench_futex_requeue()
205 params.nrequeue = params.nthreads; in bench_futex_requeue()
208 params.nrequeue = params.nthreads; in bench_futex_requeue()
[all …]
H A Dbreakpoint.c22 unsigned int nthreads; member
26 .nthreads = 1,
33 OPT_UINTEGER('t', "threads", &thread_params.nthreads, "Specify amount of threads"),
91 threads = calloc(thread_params.nthreads, sizeof(threads[0])); in breakpoint_thread()
97 for (i = 0; i < thread_params.nthreads; i++) { in breakpoint_thread()
102 futex_wake(&done, thread_params.nthreads, 0); in breakpoint_thread()
103 for (i = 0; i < thread_params.nthreads; i++) in breakpoint_thread()
111 // then starts nparallel threads which create and join bench_repeat batches of nthreads threads.
161 (double)result_usec / bench_repeat / thread_params.nthreads); in bench_breakpoint_thread()
164 thread_params.nthreads * thread_param in bench_breakpoint_thread()
200 unsigned int i, nthreads, result_usec, done = 0; bench_breakpoint_enable() local
[all...]
H A Dfutex-wake.c55 OPT_UINTEGER('t', "threads", &params.nthreads, "Specify amount of threads"),
95 params.nthreads, in print_summary()
107 threads_starting = params.nthreads; in block_threads()
114 for (i = 0; i < params.nthreads; i++) { in block_threads()
169 if (!params.nthreads) in bench_futex_wake()
170 params.nthreads = perf_cpu_map__nr(cpu); in bench_futex_wake()
172 worker = calloc(params.nthreads, sizeof(*worker)); in bench_futex_wake()
181 getpid(), params.nthreads, params.fshared ? "shared":"private", in bench_futex_wake()
208 while (nwoken != params.nthreads) in bench_futex_wake()
219 j + 1, nwoken, params.nthreads, in bench_futex_wake()
[all …]
H A Dfutex-wake-parallel.c66 OPT_UINTEGER('t', "threads", &params.nthreads, "Specify amount of threads"),
158 threads_starting = params.nthreads; in block_threads()
165 for (i = 0; i < params.nthreads; i++) { in block_threads()
206 params.nthreads, waketime_avg / USEC_PER_MSEC, in print_run()
221 params.nthreads, in print_summary()
275 if (!params.nthreads) in bench_futex_wake_parallel()
276 params.nthreads = perf_cpu_map__nr(cpu); in bench_futex_wake_parallel()
279 if (params.nwakes > params.nthreads || in bench_futex_wake_parallel()
281 params.nwakes = params.nthreads; in bench_futex_wake_parallel()
283 if (params.nthreads % params.nwakes) in bench_futex_wake_parallel()
[all …]
H A Dfutex-lock-pi.c50 OPT_UINTEGER('t', "threads", &params.nthreads, "Specify amount of threads"),
131 threads_starting = params.nthreads; in create_threads()
137 for (i = 0; i < params.nthreads; i++) { in create_threads()
192 if (!params.nthreads) in bench_futex_lock_pi()
193 params.nthreads = perf_cpu_map__nr(cpu); in bench_futex_lock_pi()
195 worker = calloc(params.nthreads, sizeof(*worker)); in bench_futex_lock_pi()
203 getpid(), params.nthreads, params.runtime); in bench_futex_lock_pi()
211 threads_starting = params.nthreads; in bench_futex_lock_pi()
225 for (i = 0; i < params.nthreads; i++) { in bench_futex_lock_pi()
236 for (i = 0; i < params.nthreads; i++) { in bench_futex_lock_pi()
H A Dfutex-hash.c59 OPT_UINTEGER('t', "threads", &params.nthreads, "Specify amount of threads"),
159 if (!params.nthreads) /* default to the number of CPUs */ in bench_futex_hash()
160 params.nthreads = perf_cpu_map__nr(cpu); in bench_futex_hash()
162 worker = calloc(params.nthreads, sizeof(*worker)); in bench_futex_hash()
171 … getpid(), params.nthreads, params.nfutexes, params.fshared ? "shared":"private", params.runtime); in bench_futex_hash()
178 threads_starting = params.nthreads; in bench_futex_hash()
187 for (i = 0; i < params.nthreads; i++) { in bench_futex_hash()
221 for (i = 0; i < params.nthreads; i++) { in bench_futex_hash()
232 for (i = 0; i < params.nthreads; i++) { in bench_futex_hash()
H A Depoll-ctl.c36 static unsigned int nthreads = 0; variable
75 OPT_UINTEGER('t', "threads", &nthreads, "Specify amount of threads"),
240 for (i = 0; i < nthreads; i++) { in do_threads()
349 if (!nthreads) in bench_epoll_ctl()
350 nthreads = perf_cpu_map__nr(cpu); in bench_epoll_ctl()
352 worker = calloc(nthreads, sizeof(*worker)); in bench_epoll_ctl()
358 rl.rlim_cur = rl.rlim_max = nfds * nthreads * 2 + 50; in bench_epoll_ctl()
366 getpid(), nthreads, nfds, nsecs); in bench_epoll_ctl()
375 threads_starting = nthreads; in bench_epoll_ctl()
391 for (i = 0; i < nthreads; i++) { in bench_epoll_ctl()
[all …]
/linux/tools/testing/selftests/bpf/prog_tests/
H A Darena_spin_lock.c52 int nthreads; in test_arena_spin_lock_size() local
55 nthreads = MIN(get_nprocs(), ARRAY_SIZE(thread_id)); in test_arena_spin_lock_size()
56 if (nthreads < 2) { in test_arena_spin_lock_size()
70 skel->bss->limit = repeat * nthreads; in test_arena_spin_lock_size()
72 ASSERT_OK(pthread_barrier_init(&barrier, NULL, nthreads), "barrier init"); in test_arena_spin_lock_size()
75 for (i = 0; i < nthreads; i++) { in test_arena_spin_lock_size()
81 for (i = 0; i < nthreads; i++) { in test_arena_spin_lock_size()
95 ASSERT_EQ(skel->bss->counter, repeat * nthreads, "check counter value"); in test_arena_spin_lock_size()
H A Dlibarena.c73 uint32_t nthreads; in run_libarena_parallel_test_workers() local
79 for (nthreads = 0; nthreads < UINT_MAX; nthreads++) { in run_libarena_parallel_test_workers()
81 name, nthreads); in run_libarena_parallel_test_workers()
98 tmp_threads = realloc(threads, (nthreads + 1) * sizeof(*threads)); in run_libarena_parallel_test_workers()
105 ret = pthread_create(&threads[nthreads], NULL, in run_libarena_parallel_test_workers()
115 for (i = 0; i < nthreads; i++) { in run_libarena_parallel_test_workers()
/linux/tools/perf/util/
H A Dcounts.c10 struct perf_counts *perf_counts__new(int ncpus, int nthreads) in perf_counts__new() argument
17 values = xyarray__new(ncpus, nthreads, sizeof(struct perf_counts_values)); in perf_counts__new()
25 values = xyarray__new(ncpus, nthreads, sizeof(bool)); in perf_counts__new()
61 int nthreads = perf_thread_map__nr(evsel->core.threads); in evsel__alloc_counts() local
63 evsel->counts = perf_counts__new(perf_cpu_map__nr(cpus), nthreads); in evsel__alloc_counts()
H A Dtool_pmu.c208 int nthreads) in evsel__tool_pmu_prepare_open()
215 xyarray__new(perf_cpu_map__nr(cpus), nthreads, sizeof(__u64)); in evsel__tool_pmu_prepare_open()
221 xyarray__new(perf_cpu_map__nr(cpus), nthreads, sizeof(__u64));
266 int pid = -1, idx = 0, thread = 0, nthreads, err = 0, old_errno; in evsel__tool_pmu_open()
288 nthreads = perf_thread_map__nr(threads); in evsel__tool_pmu_open()
290 for (thread = 0; thread < nthreads; thread++) { in evsel__tool_pmu_open()
351 thread = nthreads; in tool_pmu__read_event()
523 int thread, nthreads; in evsel__tool_pmu_read()
535 nthreads = xyarray__max_y(evsel->process_time.start_times); in evsel__tool_pmu_read()
536 for (thread = 0; thread < nthreads; threa in evsel__tool_pmu_read()
206 evsel__tool_pmu_prepare_open(struct evsel * evsel,struct perf_cpu_map * cpus,int nthreads) evsel__tool_pmu_prepare_open() argument
227 int pid = -1, idx = 0, thread = 0, nthreads, err = 0, old_errno; evsel__tool_pmu_open() local
[all...]
/linux/arch/powerpc/platforms/pseries/
H A Dhotplug-cpu.c156 static int find_cpu_id_range(unsigned int nthreads, int assigned_node, in find_cpu_id_range() argument
167 for (cpu = 0; cpu < nthreads; cpu++) in find_cpu_id_range()
196 cpumask_shift_left(*cpu_mask, *cpu_mask, nthreads); in find_cpu_id_range()
216 int len, nthreads, node, cpu, assigned_node; in pseries_add_processor() local
225 nthreads = len / sizeof(u32); in pseries_add_processor()
243 rc = find_cpu_id_range(nthreads, node, &cpu_mask); in pseries_add_processor()
249 rc = find_cpu_id_range(nthreads, NUMA_NO_NODE, &cpu_mask); in pseries_add_processor()
275 cpu, cpu + nthreads - 1); in pseries_add_processor()
299 int len, nthreads, i; in pseries_remove_processor() local
307 nthreads = len / sizeof(u32); in pseries_remove_processor()
[all …]
/linux/tools/testing/selftests/ublk/
H A Dtest_stress_03.sh45 ublk_io_and_remove 8G -t null -q 4 --auto_zc --nthreads 8 --per_io_tasks &
46 ublk_io_and_remove 256M -t loop -q 4 --auto_zc --nthreads 8 --per_io_tasks "${UBLK_BACKFILES[0]}" &
47 …ublk_io_and_remove 256M -t stripe -q 4 --auto_zc --nthreads 8 --per_io_tasks "${UBLK_BACKFILES[1]}…
48 ublk_io_and_remove 8G -t null -q 4 -z --auto_zc --auto_zc_fallback --nthreads 8 --per_io_tasks &
H A Dtest_stress_04.sh44 ublk_io_and_kill_daemon 8G -t null -q 4 --auto_zc --nthreads 8 --per_io_tasks &
45 …ublk_io_and_kill_daemon 256M -t loop -q 4 --auto_zc --nthreads 8 --per_io_tasks "${UBLK_BACKFILES[…
46 …ublk_io_and_kill_daemon 256M -t stripe -q 4 --auto_zc --nthreads 8 --per_io_tasks "${UBLK_BACKFILE…
47 …ublk_io_and_kill_daemon 8G -t null -q 4 -z --auto_zc --auto_zc_fallback --nthreads 8 --per_io_task…
H A Dtest_stress_06.sh32 ublk_io_and_remove 8G -t null -q 4 -u --nthreads 8 --per_io_tasks &
33 ublk_io_and_remove 256M -t loop -q 4 -u --nthreads 8 --per_io_tasks "${UBLK_BACKFILES[0]}" &
34 ublk_io_and_remove 256M -t stripe -q 4 -u --nthreads 8 --per_io_tasks "${UBLK_BACKFILES[1]}" "${UBL…
H A Dtest_stress_07.sh32 ublk_io_and_kill_daemon 8G -t null -q 4 -u --nthreads 8 --per_io_tasks &
33 ublk_io_and_kill_daemon 256M -t loop -q 4 -u --nthreads 8 --per_io_tasks "${UBLK_BACKFILES[0]}" &
34 ublk_io_and_kill_daemon 256M -t stripe -q 4 -u --nthreads 8 --per_io_tasks "${UBLK_BACKFILES[1]}" "…
H A Dtest_stress_05.sh76 ublk_io_and_remove 8G -t null -q 4 --nthreads 8 --per_io_tasks -r 1 -i "$reissue" &
77 …ublk_io_and_remove 256M -t loop -q 4 --nthreads 8 --per_io_tasks -r 1 -i "$reissue" "${UBLK_BACKFI…
78 ublk_io_and_remove 8G -t null -q 4 --nthreads 8 --per_io_tasks -r 1 -i "$reissue" &
/linux/kernel/
H A Dscftorture.c54 torture_param(int, nthreads, -1, "# threads, defaults to -1 for all CPUs.");
160 cpu = raw_smp_processor_id() % nthreads; in scf_add_to_free_list()
191 for (i = 0; i < nthreads; i++) { in scf_torture_stats_print()
531 "--- %s: verbose=%d holdoff=%d longwait=%d nthreads=%d onoff_holdoff=%d onoff_interval=%d shutdown_secs=%d stat_interval=%d stutter=%d use_cpus_read_lock=%d, weight_resched=%d, weight_single=%d, weight_single_rpc=%d, weight_single_wait=%d, weight_many=%d, weight_many_wait=%d, weight_all=%d, weight_all_wait=%d\n", tag,
532 verbose, holdoff, longwait, nthreads, onoff_holdoff, onoff_interval, shutdown, stat_interval, stutter, use_cpus_read_lock, weight_resched, weight_single, weight_single_rpc, weight_single_wait, weight_many, weight_many_wait, weight_all, weight_all_wait);
547 if (nthreads && scf_stats_p) in scf_torture_cleanup()
548 for (i = 0; i < nthreads; i++) in scf_torture_cleanup()
657 if (nthreads < 0) in scf_torture_init()
658 nthreads = num_online_cpus(); in scf_torture_init()
659 scf_stats_p = kzalloc_objs(scf_stats_p[0], nthreads); in scf_torture_init()
[all...]
/linux/kernel/kcsan/
H A Dkcsan_test.c1388 long nthreads = (long)prev; in nthreads_gen_params() local
1390 if (nthreads < 0 || nthreads >= 32) in nthreads_gen_params()
1391 nthreads = 0; /* stop */ in nthreads_gen_params()
1392 else if (!nthreads) in nthreads_gen_params()
1393 nthreads = 2; /* initial value */ in nthreads_gen_params()
1394 else if (nthreads < 5) in nthreads_gen_params()
1395 nthreads++; in nthreads_gen_params()
1396 else if (nthreads == 5) in nthreads_gen_params()
1397 nthreads = 8; in nthreads_gen_params()
1399 nthreads *= 2; in nthreads_gen_params()
[all …]
/linux/kernel/locking/
H A Dtest-ww_mutex.c321 static int __test_cycle(struct ww_class *class, unsigned int nthreads) in __test_cycle() argument
324 unsigned int n, last = nthreads - 1; in __test_cycle()
327 cycles = kmalloc_objs(*cycles, nthreads); in __test_cycle()
331 for (n = 0; n < nthreads; n++) { in __test_cycle()
351 for (n = 0; n < nthreads; n++) in __test_cycle()
357 for (n = 0; n < nthreads; n++) { in __test_cycle()
364 n, nthreads, cycle->result); in __test_cycle()
369 for (n = 0; n < nthreads; n++) in __test_cycle()
579 static int stress(struct ww_class *class, int nlocks, int nthreads, unsigned int flags) in stress() argument
589 stress_array = kmalloc_objs(*stress_array, nthreads); in stress()
[all …]
/linux/fs/nfsd/
H A Dnfssvc.c661 int nfsd_get_nrthreads(int n, int *nthreads, struct net *net) in nfsd_get_nrthreads() argument
669 nthreads[i] = serv->sv_pools[i].sp_nrthrmax; in nfsd_get_nrthreads()
686 int nfsd_set_nrthreads(int n, int *nthreads, struct net *net) in nfsd_set_nrthreads() argument
700 return svc_set_num_threads(nn->nfsd_serv, nn->min_threads, nthreads[0]); in nfsd_set_nrthreads()
708 nthreads[i] = min(nthreads[i], NFSD_MAXSERVS); in nfsd_set_nrthreads()
709 tot += nthreads[i]; in nfsd_set_nrthreads()
714 int new = nthreads[i] * NFSD_MAXSERVS / tot; in nfsd_set_nrthreads()
715 tot -= (nthreads[i] - new); in nfsd_set_nrthreads()
716 nthreads[i] = new; in nfsd_set_nrthreads()
719 nthreads[i]--; in nfsd_set_nrthreads()
[all …]
/linux/lib/
H A Dtest_objpool.c39 atomic_t nthreads ____cacheline_aligned_in_smp;
142 atomic_set(&data->nthreads, 1); in ot_init_data()
222 atomic_inc(&test->data.nthreads); in ot_thread_worker()
235 if (atomic_dec_and_test(&test->data.nthreads)) in ot_thread_worker()
244 int cpu, nthreads = 0; in ot_perf_report() local
265 nthreads++; in ot_perf_report()
271 pr_info("ALL: \tnthreads: %d duration: %lluus\n", nthreads, duration); in ot_perf_report()
383 if (atomic_dec_and_test(&test->data.nthreads)) in ot_start_sync()
569 if (atomic_dec_and_test(&test->data.nthreads)) in ot_start_async()
/linux/tools/lib/perf/
H A Devsel.c65 int perf_evsel__alloc_fd(struct perf_evsel *evsel, int ncpus, int nthreads) in perf_evsel__alloc_fd() argument
67 evsel->fd = xyarray__new(ncpus, nthreads, sizeof(int)); in perf_evsel__alloc_fd()
73 for (thread = 0; thread < nthreads; thread++) { in perf_evsel__alloc_fd()
85 static int perf_evsel__alloc_mmap(struct perf_evsel *evsel, int ncpus, int nthreads) in perf_evsel__alloc_mmap() argument
87 evsel->mmap = xyarray__new(ncpus, nthreads, sizeof(struct perf_mmap)); in perf_evsel__alloc_mmap()
528 int perf_evsel__alloc_id(struct perf_evsel *evsel, int ncpus, int nthreads) in perf_evsel__alloc_id()
530 if (ncpus == 0 || nthreads == 0) in perf_evsel__alloc_id()
533 evsel->sample_id = xyarray__new(ncpus, nthreads, sizeof(struct perf_sample_id)); in perf_evsel__alloc_id()
537 evsel->id = zalloc(ncpus * nthreads * sizeof(u64)); in perf_evsel__alloc_id()
526 perf_evsel__alloc_id(struct perf_evsel * evsel,int ncpus,int nthreads) perf_evsel__alloc_id() argument

12