Home
last modified time | relevance | path

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

/Linux-v4.19/tools/perf/bench/
Dfutex-requeue.c44 static unsigned int threads_starting, nthreads = 0; variable
48 OPT_UINTEGER('t', "threads", &nthreads, "Specify amount of threads"),
68 nthreads, in print_summary()
92 threads_starting = nthreads; in block_threads()
95 for (i = 0; i < nthreads; i++) { in block_threads()
134 if (!nthreads) in bench_futex_requeue()
135 nthreads = cpu->nr; in bench_futex_requeue()
137 worker = calloc(nthreads, sizeof(*worker)); in bench_futex_requeue()
144 if (nrequeue > nthreads) in bench_futex_requeue()
145 nrequeue = nthreads; in bench_futex_requeue()
[all …]
Dfutex-wake.c45 static unsigned int ncpus, threads_starting, nthreads = 0; variable
49 OPT_UINTEGER('t', "threads", &nthreads, "Specify amount of threads"),
87 nthreads, in print_summary()
98 threads_starting = nthreads; in block_threads()
101 for (i = 0; i < nthreads; i++) { in block_threads()
142 if (!nthreads) in bench_futex_wake()
143 nthreads = ncpus; in bench_futex_wake()
145 worker = calloc(nthreads, sizeof(*worker)); in bench_futex_wake()
154 getpid(), nthreads, fshared ? "shared":"private", &futex1, nwakes); in bench_futex_wake()
181 while (nwoken != nthreads) in bench_futex_wake()
[all …]
Dfutex-lock-pi.c36 static unsigned int nthreads = 0; variable
45 OPT_UINTEGER('t', "threads", &nthreads, "Specify amount of threads"),
123 threads_starting = nthreads; in create_threads()
125 for (i = 0; i < nthreads; i++) { in create_threads()
166 if (!nthreads) in bench_futex_lock_pi()
167 nthreads = cpu->nr; in bench_futex_lock_pi()
169 worker = calloc(nthreads, sizeof(*worker)); in bench_futex_lock_pi()
177 getpid(), nthreads, nsecs); in bench_futex_lock_pi()
184 threads_starting = nthreads; in bench_futex_lock_pi()
200 for (i = 0; i < nthreads; i++) { in bench_futex_lock_pi()
[all …]
Dfutex-hash.c31 static unsigned int nthreads = 0; variable
52 OPT_UINTEGER('t', "threads", &nthreads, "Specify amount of threads"),
142 if (!nthreads) /* default to the number of CPUs */ in bench_futex_hash()
143 nthreads = cpu->nr; in bench_futex_hash()
145 worker = calloc(nthreads, sizeof(*worker)); in bench_futex_hash()
153 getpid(), nthreads, nfutexes, fshared ? "shared":"private", nsecs); in bench_futex_hash()
160 threads_starting = nthreads; in bench_futex_hash()
163 for (i = 0; i < nthreads; i++) { in bench_futex_hash()
193 for (i = 0; i < nthreads; i++) { in bench_futex_hash()
204 for (i = 0; i < nthreads; i++) { in bench_futex_hash()
/Linux-v4.19/tools/perf/util/
Dcounts.c8 struct perf_counts *perf_counts__new(int ncpus, int nthreads) in perf_counts__new() argument
15 values = xyarray__new(ncpus, nthreads, sizeof(struct perf_counts_values)); in perf_counts__new()
45 int perf_evsel__alloc_counts(struct perf_evsel *evsel, int ncpus, int nthreads) in perf_evsel__alloc_counts() argument
47 evsel->counts = perf_counts__new(ncpus, nthreads); in perf_evsel__alloc_counts()
Dstat.c140 int ncpus, int nthreads) in perf_evsel__alloc_prev_raw_counts() argument
144 counts = perf_counts__new(ncpus, nthreads); in perf_evsel__alloc_prev_raw_counts()
160 int nthreads = thread_map__nr(evsel->threads); in perf_evsel__alloc_stats() local
163 perf_evsel__alloc_counts(evsel, ncpus, nthreads) < 0 || in perf_evsel__alloc_stats()
164 (alloc_raw && perf_evsel__alloc_prev_raw_counts(evsel, ncpus, nthreads) < 0)) in perf_evsel__alloc_stats()
309 int nthreads = thread_map__nr(counter->threads); in process_counter_maps() local
314 nthreads = 1; in process_counter_maps()
316 for (thread = 0; thread < nthreads; thread++) { in process_counter_maps()
Dcounts.h32 struct perf_counts *perf_counts__new(int ncpus, int nthreads);
36 int perf_evsel__alloc_counts(struct perf_evsel *evsel, int ncpus, int nthreads);
Devsel.c1120 static int perf_evsel__alloc_fd(struct perf_evsel *evsel, int ncpus, int nthreads) in perf_evsel__alloc_fd() argument
1123 nthreads = 1; in perf_evsel__alloc_fd()
1125 evsel->fd = xyarray__new(ncpus, nthreads, sizeof(int)); in perf_evsel__alloc_fd()
1130 for (thread = 0; thread < nthreads; thread++) { in perf_evsel__alloc_fd()
1218 int perf_evsel__alloc_id(struct perf_evsel *evsel, int ncpus, int nthreads) in perf_evsel__alloc_id() argument
1220 if (ncpus == 0 || nthreads == 0) in perf_evsel__alloc_id()
1224 nthreads = 1; in perf_evsel__alloc_id()
1226 evsel->sample_id = xyarray__new(ncpus, nthreads, sizeof(struct perf_sample_id)); in perf_evsel__alloc_id()
1230 evsel->id = zalloc(ncpus * nthreads * sizeof(u64)); in perf_evsel__alloc_id()
1736 int cpu, thread, nthreads; in perf_evsel__open() local
[all …]
Devsel.h252 int perf_evsel__alloc_id(struct perf_evsel *evsel, int ncpus, int nthreads);
/Linux-v4.19/arch/powerpc/platforms/pseries/
Dhotplug-cpu.c251 int err = -ENOSPC, len, nthreads, i; in pseries_add_processor() local
261 nthreads = len / sizeof(u32); in pseries_add_processor()
262 for (i = 0; i < nthreads; i++) in pseries_add_processor()
286 cpumask_shift_left(tmp, tmp, nthreads); in pseries_add_processor()
291 nthreads); in pseries_add_processor()
316 int len, nthreads, i; in pseries_remove_processor() local
324 nthreads = len / sizeof(u32); in pseries_remove_processor()
327 for (i = 0; i < nthreads; i++) { in pseries_remove_processor()
349 int len, nthreads, i; in dlpar_online_cpu() local
357 nthreads = len / sizeof(u32); in dlpar_online_cpu()
[all …]
/Linux-v4.19/fs/nfsd/
Dnfssvc.c542 int nfsd_get_nrthreads(int n, int *nthreads, struct net *net) in nfsd_get_nrthreads() argument
549 nthreads[i] = nn->nfsd_serv->sv_pools[i].sp_nrthreads; in nfsd_get_nrthreads()
567 int nfsd_set_nrthreads(int n, int *nthreads, struct net *net) in nfsd_set_nrthreads() argument
585 nthreads[i] = min(nthreads[i], NFSD_MAXSERVS); in nfsd_set_nrthreads()
586 tot += nthreads[i]; in nfsd_set_nrthreads()
591 int new = nthreads[i] * NFSD_MAXSERVS / tot; in nfsd_set_nrthreads()
592 tot -= (nthreads[i] - new); in nfsd_set_nrthreads()
593 nthreads[i] = new; in nfsd_set_nrthreads()
596 nthreads[i]--; in nfsd_set_nrthreads()
605 if (nthreads[0] == 0) in nfsd_set_nrthreads()
[all …]
Dnfsctl.c483 int *nthreads; in write_pool_threads() local
499 nthreads = kcalloc(npools, sizeof(int), GFP_KERNEL); in write_pool_threads()
501 if (nthreads == NULL) in write_pool_threads()
506 rv = get_int(&mesg, &nthreads[i]); in write_pool_threads()
512 if (nthreads[i] < 0) in write_pool_threads()
515 rv = nfsd_set_nrthreads(i, nthreads, net); in write_pool_threads()
520 rv = nfsd_get_nrthreads(npools, nthreads, net); in write_pool_threads()
527 snprintf(mesg, size, "%d%c", nthreads[i], (i == npools-1 ? '\n' : ' ')); in write_pool_threads()
534 kfree(nthreads); in write_pool_threads()
/Linux-v4.19/kernel/locking/
Dtest-ww_mutex.c288 static int __test_cycle(unsigned int nthreads) in __test_cycle() argument
291 unsigned int n, last = nthreads - 1; in __test_cycle()
294 cycles = kmalloc_array(nthreads, sizeof(*cycles), GFP_KERNEL); in __test_cycle()
298 for (n = 0; n < nthreads; n++) { in __test_cycle()
317 for (n = 0; n < nthreads; n++) in __test_cycle()
323 for (n = 0; n < nthreads; n++) { in __test_cycle()
330 n, nthreads, cycle->result); in __test_cycle()
335 for (n = 0; n < nthreads; n++) in __test_cycle()
537 static int stress(int nlocks, int nthreads, unsigned int flags) in stress() argument
549 for (n = 0; nthreads; n++) { in stress()
[all …]
/Linux-v4.19/arch/powerpc/kernel/
Dsetup-common.c458 int nthreads = 1; in smp_setup_cpu_maps() local
477 nthreads); in smp_setup_cpu_maps()
489 nthreads = len / sizeof(int); in smp_setup_cpu_maps()
491 for (j = 0; j < nthreads && cpu < nr_cpu_ids; j++) { in smp_setup_cpu_maps()
517 nthreads = 1; in smp_setup_cpu_maps()
542 maxcpus *= nthreads; in smp_setup_cpu_maps()
568 cpu_init_thread_core_maps(nthreads); in smp_setup_cpu_maps()
Dprom.c313 int i, nthreads; in early_init_dt_scan_cpus() local
327 nthreads = len / sizeof(int); in early_init_dt_scan_cpus()
333 for (i = 0; i < nthreads; i++) { in early_init_dt_scan_cpus()
385 if (nthreads == 1) in early_init_dt_scan_cpus()
/Linux-v4.19/tools/perf/
Dbuiltin-stat.c341 int nthreads = thread_map__nr(evsel_list->threads); in read_counter() local
353 nthreads = 1; in read_counter()
355 for (thread = 0; thread < nthreads; thread++) { in read_counter()
1412 int nthreads, int ncpus, in sort_aggr_thread() argument
1419 buf = calloc(nthreads, sizeof(struct perf_aggr_thread_value)); in sort_aggr_thread()
1423 for (thread = 0; thread < nthreads; thread++) { in sort_aggr_thread()
1461 int nthreads = thread_map__nr(counter->threads); in print_aggr_thread() local
1466 buf = sort_aggr_thread(counter, nthreads, ncpus, &sorted_threads); in print_aggr_thread()
2711 static int runtime_stat_new(struct perf_stat_config *config, int nthreads) in runtime_stat_new() argument
2715 config->stats = calloc(nthreads, sizeof(struct runtime_stat)); in runtime_stat_new()
[all …]
Dbuiltin-script.c1719 int nthreads = thread_map__nr(counter->threads); in __process_stat() local
1725 nthreads = 1; in __process_stat()
1733 for (thread = 0; thread < nthreads; thread++) { in __process_stat()
/Linux-v4.19/arch/powerpc/kvm/
Dbook3s_hv.c1001 int thr, cpu, pcpu, nthreads; in kvmppc_read_dpdes() local
1005 nthreads = vcpu->kvm->arch.emul_smt_mode; in kvmppc_read_dpdes()
1007 cpu = vcpu->vcpu_id & ~(nthreads - 1); in kvmppc_read_dpdes()
1008 for (thr = 0; thr < nthreads; ++thr, ++cpu) { in kvmppc_read_dpdes()