Home
last modified time | relevance | path

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

/Linux-v5.4/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()
135 if (!nthreads) in bench_futex_requeue()
136 nthreads = cpu->nr; in bench_futex_requeue()
138 worker = calloc(nthreads, sizeof(*worker)); in bench_futex_requeue()
145 if (nrequeue > nthreads) in bench_futex_requeue()
146 nrequeue = nthreads; in bench_futex_requeue()
[all …]
Dfutex-wake.c46 static unsigned int ncpus, 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()
143 if (!nthreads) in bench_futex_wake()
144 nthreads = ncpus; in bench_futex_wake()
146 worker = calloc(nthreads, sizeof(*worker)); in bench_futex_wake()
155 getpid(), nthreads, fshared ? "shared":"private", &futex1, nwakes); in bench_futex_wake()
182 while (nwoken != nthreads) in bench_futex_wake()
[all …]
Dfutex-lock-pi.c38 static unsigned int nthreads = 0; variable
47 OPT_UINTEGER('t', "threads", &nthreads, "Specify amount of threads"),
125 threads_starting = nthreads; in create_threads()
127 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"),
144 if (!nthreads) /* default to the number of CPUs */ in bench_futex_hash()
145 nthreads = cpu->nr; in bench_futex_hash()
147 worker = calloc(nthreads, sizeof(*worker)); in bench_futex_hash()
155 getpid(), nthreads, nfutexes, fshared ? "shared":"private", nsecs); in bench_futex_hash()
162 threads_starting = nthreads; in bench_futex_hash()
165 for (i = 0; i < nthreads; i++) { in bench_futex_hash()
195 for (i = 0; i < nthreads; i++) { in bench_futex_hash()
206 for (i = 0; i < nthreads; i++) { in bench_futex_hash()
Depoll-wait.c91 static unsigned int nthreads = 0; variable
129 OPT_UINTEGER('t', "threads", &nthreads, "Specify amount of threads"),
311 for (i = 0; i < nthreads; i++) { in do_threads()
382 shuffle((void *)worker, nthreads, sizeof(*worker)); in writerfn()
385 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
76 OPT_UINTEGER('t', "threads", &nthreads, "Specify amount of threads"),
234 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.4/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()
23 values = xyarray__new(ncpus, nthreads, sizeof(bool)); in perf_counts__new()
56 int perf_evsel__alloc_counts(struct evsel *evsel, int ncpus, int nthreads) in perf_evsel__alloc_counts() argument
58 evsel->counts = perf_counts__new(ncpus, nthreads); in perf_evsel__alloc_counts()
Dstat.c148 int ncpus, int nthreads) in perf_evsel__alloc_prev_raw_counts() argument
152 counts = perf_counts__new(ncpus, nthreads); in perf_evsel__alloc_prev_raw_counts()
177 int nthreads = perf_thread_map__nr(evsel->core.threads); in perf_evsel__alloc_stats() local
180 perf_evsel__alloc_counts(evsel, ncpus, nthreads) < 0 || in perf_evsel__alloc_stats()
181 (alloc_raw && perf_evsel__alloc_prev_raw_counts(evsel, ncpus, nthreads) < 0)) in perf_evsel__alloc_stats()
335 int nthreads = perf_thread_map__nr(counter->core.threads); in process_counter_maps() local
340 nthreads = 1; in process_counter_maps()
342 for (thread = 0; thread < nthreads; thread++) { in process_counter_maps()
Dcounts.h38 struct perf_counts *perf_counts__new(int ncpus, int nthreads);
42 int perf_evsel__alloc_counts(struct evsel *evsel, int ncpus, int nthreads);
Dstat-display.c696 int nthreads, int ncpus, in sort_aggr_thread() argument
704 buf = calloc(nthreads, sizeof(struct perf_aggr_thread_value)); in sort_aggr_thread()
708 for (thread = 0; thread < nthreads; thread++) { in sort_aggr_thread()
748 int nthreads = perf_thread_map__nr(counter->core.threads); in print_aggr_thread() local
753 buf = sort_aggr_thread(counter, nthreads, ncpus, &sorted_threads, _target); in print_aggr_thread()
Devsel.c1575 int cpu, thread, nthreads; in evsel__open() local
1609 nthreads = 1; in evsel__open()
1611 nthreads = threads->nr; in evsel__open()
1614 perf_evsel__alloc_fd(&evsel->core, cpus->nr, nthreads) < 0) in evsel__open()
1652 for (thread = 0; thread < nthreads; thread++) { in evsel__open()
1676 nthreads--; in evsel__open()
1820 thread = nthreads; in evsel__open()
/Linux-v5.4/tools/perf/lib/
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()
234 int perf_evsel__alloc_id(struct perf_evsel *evsel, int ncpus, int nthreads) in perf_evsel__alloc_id() argument
236 if (ncpus == 0 || nthreads == 0) in perf_evsel__alloc_id()
240 nthreads = 1; in perf_evsel__alloc_id()
242 evsel->sample_id = xyarray__new(ncpus, nthreads, sizeof(struct perf_sample_id)); in perf_evsel__alloc_id()
246 evsel->id = zalloc(ncpus * nthreads * sizeof(u64)); in perf_evsel__alloc_id()
/Linux-v5.4/arch/powerpc/platforms/pseries/
Dhotplug-cpu.c247 int err = -ENOSPC, len, nthreads, i; in pseries_add_processor() local
257 nthreads = len / sizeof(u32); in pseries_add_processor()
258 for (i = 0; i < nthreads; i++) in pseries_add_processor()
282 cpumask_shift_left(tmp, tmp, nthreads); in pseries_add_processor()
287 nthreads); in pseries_add_processor()
312 int len, nthreads, i; in pseries_remove_processor() local
320 nthreads = len / sizeof(u32); in pseries_remove_processor()
323 for (i = 0; i < nthreads; i++) { in pseries_remove_processor()
345 int len, nthreads, i; in dlpar_online_cpu() local
353 nthreads = len / sizeof(u32); in dlpar_online_cpu()
[all …]
/Linux-v5.4/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.4/fs/nfsd/
Dnfssvc.c642 int nfsd_get_nrthreads(int n, int *nthreads, struct net *net) in nfsd_get_nrthreads() argument
649 nthreads[i] = nn->nfsd_serv->sv_pools[i].sp_nrthreads; in nfsd_get_nrthreads()
667 int nfsd_set_nrthreads(int n, int *nthreads, struct net *net) in nfsd_set_nrthreads() argument
685 nthreads[i] = min(nthreads[i], NFSD_MAXSERVS); in nfsd_set_nrthreads()
686 tot += nthreads[i]; in nfsd_set_nrthreads()
691 int new = nthreads[i] * NFSD_MAXSERVS / tot; in nfsd_set_nrthreads()
692 tot -= (nthreads[i] - new); in nfsd_set_nrthreads()
693 nthreads[i] = new; in nfsd_set_nrthreads()
696 nthreads[i]--; in nfsd_set_nrthreads()
705 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.4/tools/perf/lib/include/internal/
Devsel.h53 int perf_evsel__alloc_fd(struct perf_evsel *evsel, int ncpus, int nthreads);
59 int perf_evsel__alloc_id(struct perf_evsel *evsel, int ncpus, int nthreads);
/Linux-v5.4/arch/powerpc/kernel/
Dsetup-common.c450 int nthreads = 1; in smp_setup_cpu_maps() local
471 nthreads); in smp_setup_cpu_maps()
483 nthreads = len / sizeof(int); in smp_setup_cpu_maps()
485 for (j = 0; j < nthreads && cpu < nr_cpu_ids; j++) { in smp_setup_cpu_maps()
511 nthreads = 1; in smp_setup_cpu_maps()
536 maxcpus *= nthreads; in smp_setup_cpu_maps()
562 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-v5.4/tools/perf/
Dbuiltin-stat.c270 int nthreads = perf_thread_map__nr(evsel_list->core.threads); in read_counter() local
282 nthreads = 1; in read_counter()
284 for (thread = 0; thread < nthreads; thread++) { in read_counter()
1561 static int runtime_stat_new(struct perf_stat_config *config, int nthreads) in runtime_stat_new() argument
1565 config->stats = calloc(nthreads, sizeof(struct runtime_stat)); in runtime_stat_new()
1569 config->stats_num = nthreads; in runtime_stat_new()
1571 for (i = 0; i < nthreads; i++) in runtime_stat_new()
Dbuiltin-script.c1921 int nthreads = perf_thread_map__nr(counter->core.threads); in __process_stat() local
1927 nthreads = 1; in __process_stat()
1935 for (thread = 0; thread < nthreads; thread++) { in __process_stat()
/Linux-v5.4/drivers/net/ethernet/marvell/mvpp2/
Dmvpp2_main.c92 return cpu % priv->nthreads; in mvpp2_cpu_to_thread()
1058 if (smp_processor_id() > port->priv->nthreads) in mvpp2_interrupts_mask()
1076 if (smp_processor_id() > port->priv->nthreads) in mvpp2_interrupts_unmask()
1983 for (thread = 0; thread < port->priv->nthreads; thread++) { in mvpp2_txq_reserved_desc_num_proc()
2081 if (smp_processor_id() > port->priv->nthreads) in mvpp2_txq_sent_counter_clear()
2514 for (thread = 0; thread < port->priv->nthreads; thread++) { in mvpp2_txq_init()
2551 for (thread = 0; thread < port->priv->nthreads; thread++) { in mvpp2_txq_deinit()
2621 for (thread = 0; thread < port->priv->nthreads; thread++) { in mvpp2_txq_clean()
3742 for (thread = 0; thread < port->priv->nthreads; thread++) { in mvpp2_stop()
4434 port->nqvecs = priv->nthreads + 1; in mvpp2_multi_queue_vectors_init()
[all …]
Dmvpp2.h784 unsigned int nthreads; member
/Linux-v5.4/arch/powerpc/kvm/
Dbook3s_hv.c1163 int thr, cpu, pcpu, nthreads; in kvmppc_read_dpdes() local
1167 nthreads = vcpu->kvm->arch.emul_smt_mode; in kvmppc_read_dpdes()
1169 cpu = vcpu->vcpu_id & ~(nthreads - 1); in kvmppc_read_dpdes()
1170 for (thr = 0; thr < nthreads; ++thr, ++cpu) { in kvmppc_read_dpdes()