Home
last modified time | relevance | path

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

/linux-4.1.27/tools/perf/bench/
Dfutex-requeue.c37 static unsigned int ncpus, threads_starting, nthreads = 0; variable
41 OPT_UINTEGER('t', "threads", &nthreads, "Specify amount of threads"),
61 nthreads, in print_summary()
85 threads_starting = nthreads; in block_threads()
88 for (i = 0; i < nthreads; i++) { in block_threads()
125 if (!nthreads) in bench_futex_requeue()
126 nthreads = ncpus; in bench_futex_requeue()
128 worker = calloc(nthreads, sizeof(*worker)); in bench_futex_requeue()
135 if (nrequeue > nthreads) in bench_futex_requeue()
136 nrequeue = nthreads; in bench_futex_requeue()
[all …]
Dfutex-wake.c38 static unsigned int ncpus, threads_starting, nthreads = 0; variable
42 OPT_UINTEGER('t', "threads", &nthreads, "Specify amount of threads"),
75 nthreads, in print_summary()
86 threads_starting = nthreads; in block_threads()
89 for (i = 0; i < nthreads; i++) { in block_threads()
128 if (!nthreads) in bench_futex_wake()
129 nthreads = ncpus; in bench_futex_wake()
131 worker = calloc(nthreads, sizeof(*worker)); in bench_futex_wake()
140 getpid(), nthreads, fshared ? "shared":"private", &futex1, nwakes); in bench_futex_wake()
167 while (nwoken != nthreads) in bench_futex_wake()
[all …]
Dfutex-hash.c24 static unsigned int nthreads = 0; variable
45 OPT_UINTEGER('t', "threads", &nthreads, "Specify amount of threads"),
131 if (!nthreads) /* default to the number of CPUs */ in bench_futex_hash()
132 nthreads = ncpus; in bench_futex_hash()
134 worker = calloc(nthreads, sizeof(*worker)); in bench_futex_hash()
142 getpid(), nthreads, nfutexes, fshared ? "shared":"private", nsecs); in bench_futex_hash()
149 threads_starting = nthreads; in bench_futex_hash()
152 for (i = 0; i < nthreads; i++) { in bench_futex_hash()
182 for (i = 0; i < nthreads; i++) { in bench_futex_hash()
193 for (i = 0; i < nthreads; i++) { in bench_futex_hash()
/linux-4.1.27/arch/powerpc/platforms/pseries/
Dhotplug-cpu.c249 int err = -ENOSPC, len, nthreads, i; in pseries_add_processor() local
259 nthreads = len / sizeof(u32); in pseries_add_processor()
260 for (i = 0; i < nthreads; i++) in pseries_add_processor()
284 cpumask_shift_left(tmp, tmp, nthreads); in pseries_add_processor()
289 nthreads); in pseries_add_processor()
314 int len, nthreads, i; in pseries_remove_processor() local
322 nthreads = len / sizeof(u32); in pseries_remove_processor()
325 for (i = 0; i < nthreads; i++) { in pseries_remove_processor()
Ddlpar.c368 int len, nthreads, i; in dlpar_online_cpu() local
376 nthreads = len / sizeof(u32); in dlpar_online_cpu()
379 for (i = 0; i < nthreads; i++) { in dlpar_online_cpu()
447 int len, nthreads, i; in dlpar_offline_cpu() local
455 nthreads = len / sizeof(u32); in dlpar_offline_cpu()
458 for (i = 0; i < nthreads; i++) { in dlpar_offline_cpu()
/linux-4.1.27/fs/nfsd/
Dnfssvc.c434 int nfsd_get_nrthreads(int n, int *nthreads, struct net *net) in nfsd_get_nrthreads() argument
441 nthreads[i] = nn->nfsd_serv->sv_pools[i].sp_nrthreads; in nfsd_get_nrthreads()
459 int nfsd_set_nrthreads(int n, int *nthreads, struct net *net) in nfsd_set_nrthreads() argument
477 nthreads[i] = min(nthreads[i], NFSD_MAXSERVS); in nfsd_set_nrthreads()
478 tot += nthreads[i]; in nfsd_set_nrthreads()
483 int new = nthreads[i] * NFSD_MAXSERVS / tot; in nfsd_set_nrthreads()
484 tot -= (nthreads[i] - new); in nfsd_set_nrthreads()
485 nthreads[i] = new; in nfsd_set_nrthreads()
488 nthreads[i]--; in nfsd_set_nrthreads()
497 if (nthreads[0] == 0) in nfsd_set_nrthreads()
[all …]
Dnfsctl.c486 int *nthreads; in write_pool_threads() local
502 nthreads = kcalloc(npools, sizeof(int), GFP_KERNEL); in write_pool_threads()
504 if (nthreads == NULL) in write_pool_threads()
509 rv = get_int(&mesg, &nthreads[i]); in write_pool_threads()
515 if (nthreads[i] < 0) in write_pool_threads()
518 rv = nfsd_set_nrthreads(i, nthreads, net); in write_pool_threads()
523 rv = nfsd_get_nrthreads(npools, nthreads, net); in write_pool_threads()
530 snprintf(mesg, size, "%d%c", nthreads[i], (i == npools-1 ? '\n' : ' ')); in write_pool_threads()
537 kfree(nthreads); in write_pool_threads()
/linux-4.1.27/drivers/staging/lustre/lustre/ptlrpc/
Dptlrpcd.c727 int nthreads = num_online_cpus(); in ptlrpcd_init() local
731 if (max_ptlrpcds > 0 && max_ptlrpcds < nthreads) in ptlrpcd_init()
732 nthreads = max_ptlrpcds; in ptlrpcd_init()
733 if (nthreads < 2) in ptlrpcd_init()
734 nthreads = 2; in ptlrpcd_init()
735 if (nthreads < 3 && ptlrpcd_bind_policy == PDB_POLICY_NEIGHBOR) in ptlrpcd_init()
737 else if (nthreads % 2 != 0 && ptlrpcd_bind_policy == PDB_POLICY_PAIR) in ptlrpcd_init()
738 nthreads &= ~1; /* make sure it is even */ in ptlrpcd_init()
740 size = offsetof(struct ptlrpcd, pd_threads[nthreads]); in ptlrpcd_init()
749 rc = ptlrpcd_start(-1, nthreads, name, &ptlrpcds->pd_thread_rcv); in ptlrpcd_init()
[all …]
/linux-4.1.27/tools/perf/util/
Devsel.c776 static int perf_evsel__alloc_fd(struct perf_evsel *evsel, int ncpus, int nthreads) in perf_evsel__alloc_fd() argument
781 nthreads = 1; in perf_evsel__alloc_fd()
783 evsel->fd = xyarray__new(ncpus, nthreads, sizeof(int)); in perf_evsel__alloc_fd()
787 for (thread = 0; thread < nthreads; thread++) { in perf_evsel__alloc_fd()
796 static int perf_evsel__run_ioctl(struct perf_evsel *evsel, int ncpus, int nthreads, in perf_evsel__run_ioctl() argument
802 nthreads = 1; in perf_evsel__run_ioctl()
805 for (thread = 0; thread < nthreads; thread++) { in perf_evsel__run_ioctl()
817 int perf_evsel__set_filter(struct perf_evsel *evsel, int ncpus, int nthreads, in perf_evsel__set_filter() argument
820 return perf_evsel__run_ioctl(evsel, ncpus, nthreads, in perf_evsel__set_filter()
825 int perf_evsel__enable(struct perf_evsel *evsel, int ncpus, int nthreads) in perf_evsel__enable() argument
[all …]
Devsel.h172 int perf_evsel__alloc_id(struct perf_evsel *evsel, int ncpus, int nthreads);
176 void perf_evsel__close_fd(struct perf_evsel *evsel, int ncpus, int nthreads);
192 int perf_evsel__set_filter(struct perf_evsel *evsel, int ncpus, int nthreads,
194 int perf_evsel__enable(struct perf_evsel *evsel, int ncpus, int nthreads);
202 void perf_evsel__close(struct perf_evsel *evsel, int ncpus, int nthreads);
Devlist.c1058 nthreads = thread_map__nr(evlist->threads); in perf_evlist__apply_filters() local
1064 err = perf_evsel__set_filter(evsel, ncpus, nthreads, evsel->filter); in perf_evlist__apply_filters()
1079 nthreads = thread_map__nr(evlist->threads); in perf_evlist__set_filter() local
1082 err = perf_evsel__set_filter(evsel, ncpus, nthreads, filter); in perf_evlist__set_filter()
1247 int nthreads = thread_map__nr(evlist->threads); in perf_evlist__close() local
1252 perf_evsel__close(evsel, n, nthreads); in perf_evlist__close()
/linux-4.1.27/arch/powerpc/kernel/
Dsetup-common.c446 int nthreads = 1; in smp_setup_cpu_maps() local
461 nthreads); in smp_setup_cpu_maps()
472 nthreads = len / sizeof(int); in smp_setup_cpu_maps()
474 for (j = 0; j < nthreads && cpu < nr_cpu_ids; j++) { in smp_setup_cpu_maps()
495 nthreads = 1; in smp_setup_cpu_maps()
520 maxcpus *= nthreads; in smp_setup_cpu_maps()
546 cpu_init_thread_core_maps(nthreads); in smp_setup_cpu_maps()
Dprom.c309 int i, nthreads; in early_init_dt_scan_cpus() local
323 nthreads = len / sizeof(int); in early_init_dt_scan_cpus()
329 for (i = 0; i < nthreads; i++) { in early_init_dt_scan_cpus()
390 if (nthreads > 1) in early_init_dt_scan_cpus()
/linux-4.1.27/tools/perf/
Dbuiltin-stat.c511 int nthreads = thread_map__nr(evsel_list->threads); in read_counter() local
519 nthreads = 1; in read_counter()
524 for (thread = 0; thread < nthreads; thread++) { in read_counter()
604 nthreads = thread_map__nr(evsel_list->threads); in handle_initial_delay() local
608 perf_evsel__enable(counter, ncpus, nthreads); in handle_initial_delay()