Home
last modified time | relevance | path

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

12

/Linux-v5.10/tools/perf/bench/
Dfutex-requeue.c45 static unsigned int threads_starting, nthreads = 0; variable
49 OPT_UINTEGER('t', "threads", &nthreads, "Specify amount of threads"),
69 nthreads, in print_summary()
93 threads_starting = nthreads; in block_threads()
96 for (i = 0; i < nthreads; i++) { in block_threads()
136 if (!nthreads) in bench_futex_requeue()
137 nthreads = cpu->nr; in bench_futex_requeue()
139 worker = calloc(nthreads, sizeof(*worker)); in bench_futex_requeue()
146 if (nrequeue > nthreads) in bench_futex_requeue()
147 nrequeue = nthreads; in bench_futex_requeue()
[all …]
Dfutex-wake.c46 static unsigned int threads_starting, nthreads = 0; variable
50 OPT_UINTEGER('t', "threads", &nthreads, "Specify amount of threads"),
88 nthreads, in print_summary()
99 threads_starting = nthreads; in block_threads()
102 for (i = 0; i < nthreads; i++) { in block_threads()
144 if (!nthreads) in bench_futex_wake()
145 nthreads = cpu->nr; in bench_futex_wake()
147 worker = calloc(nthreads, sizeof(*worker)); in bench_futex_wake()
156 getpid(), nthreads, fshared ? "shared":"private", &futex1, nwakes); in bench_futex_wake()
183 while (nwoken != nthreads) in bench_futex_wake()
[all …]
Dfutex-lock-pi.c38 static unsigned int nthreads = 0; variable
46 OPT_UINTEGER('t', "threads", &nthreads, "Specify amount of threads"),
124 threads_starting = nthreads; in create_threads()
126 for (i = 0; i < nthreads; i++) { in create_threads()
168 if (!nthreads) in bench_futex_lock_pi()
169 nthreads = cpu->nr; in bench_futex_lock_pi()
171 worker = calloc(nthreads, sizeof(*worker)); in bench_futex_lock_pi()
179 getpid(), nthreads, nsecs); in bench_futex_lock_pi()
186 threads_starting = nthreads; in bench_futex_lock_pi()
202 for (i = 0; i < nthreads; i++) { in bench_futex_lock_pi()
[all …]
Dfutex-hash.c33 static unsigned int nthreads = 0; variable
54 OPT_UINTEGER('t', "threads", &nthreads, "Specify amount of threads"),
145 if (!nthreads) /* default to the number of CPUs */ in bench_futex_hash()
146 nthreads = cpu->nr; in bench_futex_hash()
148 worker = calloc(nthreads, sizeof(*worker)); in bench_futex_hash()
156 getpid(), nthreads, nfutexes, fshared ? "shared":"private", nsecs); in bench_futex_hash()
163 threads_starting = nthreads; in bench_futex_hash()
166 for (i = 0; i < nthreads; i++) { in bench_futex_hash()
196 for (i = 0; i < nthreads; i++) { in bench_futex_hash()
207 for (i = 0; i < nthreads; i++) { in bench_futex_hash()
Depoll-wait.c91 static unsigned int nthreads = 0; variable
128 OPT_UINTEGER('t', "threads", &nthreads, "Specify amount of threads"),
310 for (i = 0; i < nthreads; i++) { in do_threads()
381 shuffle((void *)worker, nthreads, sizeof(*worker)); in writerfn()
384 for (i = 0; i < nthreads; i++) { in writerfn()
455 if (!nthreads) in bench_epoll_wait()
456 nthreads = cpu->nr - 1; in bench_epoll_wait()
458 worker = calloc(nthreads, sizeof(*worker)); in bench_epoll_wait()
465 rl.rlim_cur = rl.rlim_max = nfds * nthreads * 2 + 50; in bench_epoll_wait()
473 getpid(), nthreads, oneshot ? " (EPOLLONESHOT semantics)": "", nfds, nsecs); in bench_epoll_wait()
[all …]
Depoll-ctl.c36 static unsigned int nthreads = 0; variable
75 OPT_UINTEGER('t', "threads", &nthreads, "Specify amount of threads"),
233 for (i = 0; i < nthreads; i++) { in do_threads()
336 if (!nthreads) in bench_epoll_ctl()
337 nthreads = cpu->nr; in bench_epoll_ctl()
339 worker = calloc(nthreads, sizeof(*worker)); in bench_epoll_ctl()
345 rl.rlim_cur = rl.rlim_max = nfds * nthreads * 2 + 50; in bench_epoll_ctl()
353 getpid(), nthreads, nfds, nsecs); in bench_epoll_ctl()
362 threads_starting = nthreads; in bench_epoll_ctl()
378 for (i = 0; i < nthreads; i++) { in bench_epoll_ctl()
[all …]
/Linux-v5.10/tools/perf/util/
Dcounts.c9 struct perf_counts *perf_counts__new(int ncpus, int nthreads) in perf_counts__new() argument
16 values = xyarray__new(ncpus, nthreads, sizeof(struct perf_counts_values)); in perf_counts__new()
24 values = xyarray__new(ncpus, nthreads, sizeof(bool)); in perf_counts__new()
58 int evsel__alloc_counts(struct evsel *evsel, int ncpus, int nthreads) in evsel__alloc_counts() argument
60 evsel->counts = perf_counts__new(ncpus, nthreads); in evsel__alloc_counts()
Dstat.c151 static int evsel__alloc_prev_raw_counts(struct evsel *evsel, int ncpus, int nthreads) in evsel__alloc_prev_raw_counts() argument
155 counts = perf_counts__new(ncpus, nthreads); in evsel__alloc_prev_raw_counts()
177 int nthreads = perf_thread_map__nr(evsel->core.threads); in evsel__alloc_stats() local
180 evsel__alloc_counts(evsel, ncpus, nthreads) < 0 || in evsel__alloc_stats()
181 (alloc_raw && evsel__alloc_prev_raw_counts(evsel, ncpus, nthreads) < 0)) in evsel__alloc_stats()
235 int nthreads = perf_thread_map__nr(evsel->core.threads); in perf_evsel__copy_prev_raw_counts() local
237 for (int thread = 0; thread < nthreads; thread++) { in perf_evsel__copy_prev_raw_counts()
380 int nthreads = perf_thread_map__nr(counter->core.threads); in process_counter_maps() local
385 nthreads = 1; in process_counter_maps()
387 for (thread = 0; thread < nthreads; thread++) { in process_counter_maps()
Dcounts.h38 struct perf_counts *perf_counts__new(int ncpus, int nthreads);
43 int evsel__alloc_counts(struct evsel *evsel, int ncpus, int nthreads);
Dstat-display.c700 int nthreads, int ncpus, in sort_aggr_thread() argument
708 buf = calloc(nthreads, sizeof(struct perf_aggr_thread_value)); in sort_aggr_thread()
712 for (thread = 0; thread < nthreads; thread++) { in sort_aggr_thread()
752 int nthreads = perf_thread_map__nr(counter->core.threads); in print_aggr_thread() local
757 buf = sort_aggr_thread(counter, nthreads, ncpus, &sorted_threads, _target); in print_aggr_thread()
Devsel.c1697 int cpu, thread, nthreads; in evsel__open_cpu() local
1731 nthreads = 1; in evsel__open_cpu()
1733 nthreads = threads->nr; in evsel__open_cpu()
1736 perf_evsel__alloc_fd(&evsel->core, cpus->nr, nthreads) < 0) in evsel__open_cpu()
1776 for (thread = 0; thread < nthreads; thread++) { in evsel__open_cpu()
1805 nthreads--; in evsel__open_cpu()
1959 thread = nthreads; in evsel__open_cpu()
/Linux-v5.10/tools/lib/perf/
Devsel.c42 int perf_evsel__alloc_fd(struct perf_evsel *evsel, int ncpus, int nthreads) in perf_evsel__alloc_fd() argument
44 evsel->fd = xyarray__new(ncpus, nthreads, sizeof(int)); in perf_evsel__alloc_fd()
49 for (thread = 0; thread < nthreads; thread++) { in perf_evsel__alloc_fd()
273 int perf_evsel__alloc_id(struct perf_evsel *evsel, int ncpus, int nthreads) in perf_evsel__alloc_id() argument
275 if (ncpus == 0 || nthreads == 0) in perf_evsel__alloc_id()
279 nthreads = 1; in perf_evsel__alloc_id()
281 evsel->sample_id = xyarray__new(ncpus, nthreads, sizeof(struct perf_sample_id)); in perf_evsel__alloc_id()
285 evsel->id = zalloc(ncpus * nthreads * sizeof(u64)); in perf_evsel__alloc_id()
/Linux-v5.10/arch/powerpc/platforms/pseries/
Dhotplug-cpu.c156 int err = -ENOSPC, len, nthreads, i; in pseries_add_processor() local
166 nthreads = len / sizeof(u32); in pseries_add_processor()
167 for (i = 0; i < nthreads; i++) in pseries_add_processor()
191 cpumask_shift_left(tmp, tmp, nthreads); in pseries_add_processor()
196 nthreads); in pseries_add_processor()
221 int len, nthreads, i; in pseries_remove_processor() local
229 nthreads = len / sizeof(u32); in pseries_remove_processor()
232 for (i = 0; i < nthreads; i++) { in pseries_remove_processor()
254 int len, nthreads, i; in dlpar_offline_cpu() local
262 nthreads = len / sizeof(u32); in dlpar_offline_cpu()
[all …]
/Linux-v5.10/kernel/
Dscftorture.c57 torture_param(int, nthreads, -1, "# threads, defaults to -1 for all CPUs.");
150 for (i = 0; i < nthreads; i++) { in scf_torture_stats_print()
437 …verbose, holdoff, longwait, nthreads, onoff_holdoff, onoff_interval, shutdown, stat_interval, stut… in scftorture_print_module_parms()
452 if (nthreads) in scf_torture_cleanup()
453 for (i = 0; i < nthreads; i++) in scf_torture_cleanup()
540 if (nthreads < 0) in scf_torture_init()
541 nthreads = num_online_cpus(); in scf_torture_init()
542 scf_stats_p = kcalloc(nthreads, sizeof(scf_stats_p[0]), GFP_KERNEL); in scf_torture_init()
549 VERBOSE_SCFTORTOUT("Starting %d smp_call_function() threads\n", nthreads); in scf_torture_init()
551 atomic_set(&n_started, nthreads); in scf_torture_init()
[all …]
/Linux-v5.10/kernel/locking/
Dtest-ww_mutex.c275 static int __test_cycle(unsigned int nthreads) in __test_cycle() argument
278 unsigned int n, last = nthreads - 1; in __test_cycle()
281 cycles = kmalloc_array(nthreads, sizeof(*cycles), GFP_KERNEL); in __test_cycle()
285 for (n = 0; n < nthreads; n++) { in __test_cycle()
304 for (n = 0; n < nthreads; n++) in __test_cycle()
310 for (n = 0; n < nthreads; n++) { in __test_cycle()
317 n, nthreads, cycle->result); in __test_cycle()
322 for (n = 0; n < nthreads; n++) in __test_cycle()
524 static int stress(int nlocks, int nthreads, unsigned int flags) in stress() argument
536 for (n = 0; nthreads; n++) { in stress()
[all …]
/Linux-v5.10/fs/nfsd/
Dnfssvc.c657 int nfsd_get_nrthreads(int n, int *nthreads, struct net *net) in nfsd_get_nrthreads() argument
664 nthreads[i] = nn->nfsd_serv->sv_pools[i].sp_nrthreads; in nfsd_get_nrthreads()
682 int nfsd_set_nrthreads(int n, int *nthreads, struct net *net) in nfsd_set_nrthreads() argument
700 nthreads[i] = min(nthreads[i], NFSD_MAXSERVS); in nfsd_set_nrthreads()
701 tot += nthreads[i]; in nfsd_set_nrthreads()
706 int new = nthreads[i] * NFSD_MAXSERVS / tot; in nfsd_set_nrthreads()
707 tot -= (nthreads[i] - new); in nfsd_set_nrthreads()
708 nthreads[i] = new; in nfsd_set_nrthreads()
711 nthreads[i]--; in nfsd_set_nrthreads()
720 if (nthreads[0] == 0) in nfsd_set_nrthreads()
[all …]
Dnfsctl.c487 int *nthreads; in write_pool_threads() local
503 nthreads = kcalloc(npools, sizeof(int), GFP_KERNEL); in write_pool_threads()
505 if (nthreads == NULL) in write_pool_threads()
510 rv = get_int(&mesg, &nthreads[i]); in write_pool_threads()
516 if (nthreads[i] < 0) in write_pool_threads()
519 rv = nfsd_set_nrthreads(i, nthreads, net); in write_pool_threads()
524 rv = nfsd_get_nrthreads(npools, nthreads, net); in write_pool_threads()
531 snprintf(mesg, size, "%d%c", nthreads[i], (i == npools-1 ? '\n' : ' ')); in write_pool_threads()
538 kfree(nthreads); in write_pool_threads()
/Linux-v5.10/kernel/kcsan/
Dkcsan-test.c1001 get_num_threads(const char *test, int *nthreads) in get_num_threads() argument
1008 *nthreads = test[len - 1] - '0'; in get_num_threads()
1009 *nthreads += (test[len - 2] - '0') * 10; in get_num_threads()
1011 if (WARN_ON(*nthreads < 0)) in get_num_threads()
1067 int nthreads; in test_init() local
1079 if (!get_num_threads(test->name, &nthreads)) in test_init()
1103 } else if (nthreads > num_online_cpus() - min_unused_cpus) { in test_init()
1104 nthreads = num_online_cpus() - min_unused_cpus; in test_init()
1106 test->name, nthreads); in test_init()
1110 if (nthreads) { in test_init()
[all …]
/Linux-v5.10/tools/lib/perf/include/internal/
Devsel.h54 int perf_evsel__alloc_fd(struct perf_evsel *evsel, int ncpus, int nthreads);
60 int perf_evsel__alloc_id(struct perf_evsel *evsel, int ncpus, int nthreads);
/Linux-v5.10/arch/powerpc/kernel/
Dsetup-common.c447 int nthreads = 1; in smp_setup_cpu_maps() local
468 nthreads); in smp_setup_cpu_maps()
480 nthreads = len / sizeof(int); in smp_setup_cpu_maps()
482 for (j = 0; j < nthreads && cpu < nr_cpu_ids; j++) { in smp_setup_cpu_maps()
508 nthreads = 1; in smp_setup_cpu_maps()
533 maxcpus *= nthreads; in smp_setup_cpu_maps()
559 cpu_init_thread_core_maps(nthreads); in smp_setup_cpu_maps()
Dprom.c315 int i, nthreads; in early_init_dt_scan_cpus() local
329 nthreads = len / sizeof(int); in early_init_dt_scan_cpus()
335 for (i = 0; i < nthreads; i++) { in early_init_dt_scan_cpus()
387 if (nthreads == 1) in early_init_dt_scan_cpus()
/Linux-v5.10/tools/testing/selftests/filesystems/binderfs/
Dbinderfs_test.c385 int i, j, k, nthreads; in TEST() local
434 nthreads = get_nprocs_conf(); in TEST()
435 if (nthreads > DEFAULT_THREADS) in TEST()
436 nthreads = DEFAULT_THREADS; in TEST()
441 for (i = 0; i < nthreads; i++) { in TEST()
/Linux-v5.10/tools/perf/
Dbuiltin-stat.c335 int nthreads = perf_thread_map__nr(evsel_list->core.threads); in read_counter_cpu() local
342 nthreads = 1; in read_counter_cpu()
344 for (thread = 0; thread < nthreads; thread++) { in read_counter_cpu()
428 static int runtime_stat_new(struct perf_stat_config *config, int nthreads) in runtime_stat_new() argument
432 config->stats = calloc(nthreads, sizeof(struct runtime_stat)); in runtime_stat_new()
436 config->stats_num = nthreads; in runtime_stat_new()
438 for (i = 0; i < nthreads; i++) in runtime_stat_new()
/Linux-v5.10/drivers/net/ethernet/marvell/mvpp2/
Dmvpp2_main.c91 return cpu % priv->nthreads; in mvpp2_cpu_to_thread()
1138 if (smp_processor_id() > port->priv->nthreads) in mvpp2_interrupts_mask()
1156 if (smp_processor_id() > port->priv->nthreads) in mvpp2_interrupts_unmask()
2192 for (thread = 0; thread < port->priv->nthreads; thread++) { in mvpp2_txq_reserved_desc_num_proc()
2290 if (smp_processor_id() > port->priv->nthreads) in mvpp2_txq_sent_counter_clear()
2770 for (thread = 0; thread < port->priv->nthreads; thread++) { in mvpp2_txq_init()
2807 for (thread = 0; thread < port->priv->nthreads; thread++) { in mvpp2_txq_deinit()
2877 for (thread = 0; thread < port->priv->nthreads; thread++) { in mvpp2_txq_clean()
4473 for (thread = 0; thread < port->priv->nthreads; thread++) { in mvpp2_stop()
5372 port->nqvecs = priv->nthreads + 1; in mvpp2_multi_queue_vectors_init()
[all …]
Dmvpp2.h952 unsigned int nthreads; member

12