Home
last modified time | relevance | path

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

12

/OK3568_Linux_fs/kernel/tools/perf/bench/
H A 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 …]
H A 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 …]
H A 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 …]
H A 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()
H A 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 …]
H A 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 …]
/OK3568_Linux_fs/kernel/tools/perf/util/
H A 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()
H A 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()
H A Dcounts.h38 struct perf_counts *perf_counts__new(int ncpus, int nthreads);
43 int evsel__alloc_counts(struct evsel *evsel, int ncpus, int nthreads);
/OK3568_Linux_fs/kernel/arch/powerpc/platforms/pseries/
H A Dhotplug-cpu.c153 int err = -ENOSPC, len, nthreads, i; in pseries_add_processor() local
163 nthreads = len / sizeof(u32); in pseries_add_processor()
164 for (i = 0; i < nthreads; i++) in pseries_add_processor()
188 cpumask_shift_left(tmp, tmp, nthreads); in pseries_add_processor()
193 nthreads); in pseries_add_processor()
218 int len, nthreads, i; in pseries_remove_processor() local
226 nthreads = len / sizeof(u32); in pseries_remove_processor()
229 for (i = 0; i < nthreads; i++) { in pseries_remove_processor()
251 int len, nthreads, i; in dlpar_offline_cpu() local
259 nthreads = len / sizeof(u32); in dlpar_offline_cpu()
[all …]
/OK3568_Linux_fs/kernel/tools/lib/perf/
H A 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()
/OK3568_Linux_fs/kernel/kernel/
H A 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()
438 …verbose, holdoff, longwait, nthreads, onoff_holdoff, onoff_interval, shutdown, stat_interval, stut… in scftorture_print_module_parms()
453 if (nthreads) in scf_torture_cleanup()
454 for (i = 0; i < nthreads; i++) in scf_torture_cleanup()
541 if (nthreads < 0) in scf_torture_init()
542 nthreads = num_online_cpus(); in scf_torture_init()
543 scf_stats_p = kcalloc(nthreads, sizeof(scf_stats_p[0]), GFP_KERNEL); in scf_torture_init()
550 VERBOSE_SCFTORTOUT("Starting %d smp_call_function() threads\n", nthreads); in scf_torture_init()
552 atomic_set(&n_started, nthreads); in scf_torture_init()
[all …]
/OK3568_Linux_fs/kernel/kernel/locking/
H A 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 …]
/OK3568_Linux_fs/kernel/fs/nfsd/
H A Dnfssvc.c656 int nfsd_get_nrthreads(int n, int *nthreads, struct net *net) in nfsd_get_nrthreads() argument
663 nthreads[i] = nn->nfsd_serv->sv_pools[i].sp_nrthreads; in nfsd_get_nrthreads()
681 int nfsd_set_nrthreads(int n, int *nthreads, struct net *net) in nfsd_set_nrthreads() argument
699 nthreads[i] = min(nthreads[i], NFSD_MAXSERVS); in nfsd_set_nrthreads()
700 tot += nthreads[i]; in nfsd_set_nrthreads()
705 int new = nthreads[i] * NFSD_MAXSERVS / tot; in nfsd_set_nrthreads()
706 tot -= (nthreads[i] - new); in nfsd_set_nrthreads()
707 nthreads[i] = new; in nfsd_set_nrthreads()
710 nthreads[i]--; in nfsd_set_nrthreads()
719 if (nthreads[0] == 0) in nfsd_set_nrthreads()
[all …]
H A 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()
/OK3568_Linux_fs/kernel/kernel/kcsan/
H A 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 …]
/OK3568_Linux_fs/kernel/arch/powerpc/kernel/
H A 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()
H A 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()
/OK3568_Linux_fs/external/mpp/test/
H A Dmpi_dec_multi_test.c594 cmd->nthreads = 1; in main()
605 ctxs = mpp_calloc(MpiDecMultiCtxInfo, cmd->nthreads); in main()
611 for (i = 0; i < cmd->nthreads; i++) { in main()
628 for (i = 0; i < cmd->nthreads; i++) in main()
632 for (i = 0; i < cmd->nthreads; i++) in main()
635 for (i = 0; i < cmd->nthreads; i++) { in main()
647 total_rate /= cmd->nthreads; in main()
H A Dmpi_enc_test.c1005 ctxs = mpp_calloc(MpiEncMultiCtxInfo, cmd->nthreads); in enc_test_multi()
1011 for (i = 0; i < cmd->nthreads; i++) { in enc_test_multi()
1030 for (i = 0; i < cmd->nthreads; i++) in enc_test_multi()
1034 for (i = 0; i < cmd->nthreads; i++) in enc_test_multi()
1037 for (i = 0; i < cmd->nthreads; i++) { in enc_test_multi()
1049 total_rate /= cmd->nthreads; in enc_test_multi()
H A Dmpi_enc_mt_test.cpp1017 ctxs = mpp_calloc(MpiEncMtCtxInfo, cmd->nthreads); in enc_test_mt()
1023 for (i = 0; i < cmd->nthreads; i++) { in enc_test_mt()
1061 for (i = 0; i < cmd->nthreads; i++) in enc_test_mt()
1065 for (i = 0; i < cmd->nthreads; i++) { in enc_test_mt()
1082 for (i = 0; i < cmd->nthreads; i++) { in enc_test_mt()
1094 total_rate /= cmd->nthreads; in enc_test_mt()
/OK3568_Linux_fs/kernel/tools/lib/perf/include/internal/
H A 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);
/OK3568_Linux_fs/kernel/tools/testing/selftests/filesystems/binderfs/
H A 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()
/OK3568_Linux_fs/external/mpp/utils/
H A Dmpi_dec_utils.c550 cmd->nthreads = -1; in mpi_dec_opt_s()
552 cmd->nthreads = atoi(next); in mpi_dec_opt_s()
553 if (cmd->nthreads >= 1) in mpi_dec_opt_s()
557 mpp_err("invalid nthreads %d\n", cmd->nthreads); in mpi_dec_opt_s()
558 cmd->nthreads = 1; in mpi_dec_opt_s()
H A Dmpi_enc_utils.c97 args->nthreads = 1; in mpi_enc_test_cmd_get()
391 cmd->nthreads = -1; in mpi_enc_opt_s()
393 cmd->nthreads = atoi(next); in mpi_enc_opt_s()
394 if (cmd->nthreads >= 1) in mpi_enc_opt_s()
398 mpp_err("invalid nthreads %d\n", cmd->nthreads); in mpi_enc_opt_s()
399 cmd->nthreads = 1; in mpi_enc_opt_s()

12