/linux/tools/perf/bench/ |
A D | futex-requeue.c | 76 params.nthreads, in print_summary() 129 threads_starting = params.nthreads; in block_threads() 177 if (!params.nthreads) in bench_futex_requeue() 178 params.nthreads = cpu->nr; in bench_futex_requeue() 187 if (params.nrequeue > params.nthreads) in bench_futex_requeue() 188 params.nrequeue = params.nthreads; in bench_futex_requeue() 191 params.nrequeue = params.nthreads; in bench_futex_requeue() 260 params.nthreads, in bench_futex_requeue() 267 params.nthreads, in bench_futex_requeue() 276 if (params.nthreads != nrequeued) in bench_futex_requeue() [all …]
|
A D | futex-wake.c | 52 OPT_UINTEGER('t', "threads", ¶ms.nthreads, "Specify amount of threads"), 92 params.nthreads, in print_summary() 103 threads_starting = params.nthreads; in block_threads() 106 for (i = 0; i < params.nthreads; i++) { in block_threads() 153 if (!params.nthreads) in bench_futex_wake() 154 params.nthreads = cpu->nr; in bench_futex_wake() 156 worker = calloc(params.nthreads, sizeof(*worker)); in bench_futex_wake() 165 getpid(), params.nthreads, params.fshared ? "shared":"private", in bench_futex_wake() 193 while (nwoken != params.nthreads) in bench_futex_wake() 204 j + 1, nwoken, params.nthreads, in bench_futex_wake() [all …]
|
A D | futex-wake-parallel.c | 150 threads_starting = params.nthreads; in block_threads() 153 for (i = 0; i < params.nthreads; i++) { in block_threads() 185 params.nthreads, waketime_avg / USEC_PER_MSEC, in print_run() 200 params.nthreads, in print_summary() 254 if (!params.nthreads) in bench_futex_wake_parallel() 255 params.nthreads = cpu->nr; in bench_futex_wake_parallel() 258 if (params.nwakes > params.nthreads || in bench_futex_wake_parallel() 260 params.nwakes = params.nthreads; in bench_futex_wake_parallel() 262 if (params.nthreads % params.nwakes) in bench_futex_wake_parallel() 268 nwakes = params.nthreads/params.nwakes; in bench_futex_wake_parallel() [all …]
|
A D | futex-lock-pi.c | 47 OPT_UINTEGER('t', "threads", ¶ms.nthreads, "Specify amount of threads"), 126 threads_starting = params.nthreads; in create_threads() 128 for (i = 0; i < params.nthreads; i++) { in create_threads() 175 if (!params.nthreads) in bench_futex_lock_pi() 176 params.nthreads = cpu->nr; in bench_futex_lock_pi() 178 worker = calloc(params.nthreads, sizeof(*worker)); in bench_futex_lock_pi() 186 getpid(), params.nthreads, params.runtime); in bench_futex_lock_pi() 193 threads_starting = params.nthreads; in bench_futex_lock_pi() 209 for (i = 0; i < params.nthreads; i++) { in bench_futex_lock_pi() 220 for (i = 0; i < params.nthreads; i++) { in bench_futex_lock_pi()
|
A D | futex-hash.c | 55 OPT_UINTEGER('t', "threads", ¶ms.nthreads, "Specify amount of threads"), 152 if (!params.nthreads) /* default to the number of CPUs */ in bench_futex_hash() 153 params.nthreads = cpu->nr; in bench_futex_hash() 155 worker = calloc(params.nthreads, sizeof(*worker)); in bench_futex_hash() 163 … getpid(), params.nthreads, params.nfutexes, params.fshared ? "shared":"private", params.runtime); in bench_futex_hash() 170 threads_starting = params.nthreads; in bench_futex_hash() 173 for (i = 0; i < params.nthreads; i++) { in bench_futex_hash() 203 for (i = 0; i < params.nthreads; i++) { in bench_futex_hash() 214 for (i = 0; i < params.nthreads; i++) { in bench_futex_hash()
|
A D | epoll-wait.c | 90 static unsigned int nthreads = 0; variable 309 for (i = 0; i < nthreads; i++) { in do_threads() 380 shuffle((void *)worker, nthreads, sizeof(*worker)); in writerfn() 383 for (i = 0; i < nthreads; i++) { in writerfn() 454 if (!nthreads) in bench_epoll_wait() 455 nthreads = cpu->nr - 1; in bench_epoll_wait() 457 worker = calloc(nthreads, sizeof(*worker)); in bench_epoll_wait() 464 rl.rlim_cur = rl.rlim_max = nfds * nthreads * 2 + 50; in bench_epoll_wait() 479 threads_starting = nthreads; in bench_epoll_wait() 518 qsort(worker, nthreads, sizeof(struct worker), cmpworker); in bench_epoll_wait() [all …]
|
A D | epoll-ctl.c | 35 static unsigned int nthreads = 0; variable 74 OPT_UINTEGER('t', "threads", &nthreads, "Specify amount of threads"), 232 for (i = 0; i < nthreads; i++) { in do_threads() 335 if (!nthreads) in bench_epoll_ctl() 336 nthreads = cpu->nr; in bench_epoll_ctl() 338 worker = calloc(nthreads, sizeof(*worker)); in bench_epoll_ctl() 344 rl.rlim_cur = rl.rlim_max = nfds * nthreads * 2 + 50; in bench_epoll_ctl() 352 getpid(), nthreads, nfds, nsecs); in bench_epoll_ctl() 361 threads_starting = nthreads; in bench_epoll_ctl() 377 for (i = 0; i < nthreads; i++) { in bench_epoll_ctl() [all …]
|
A D | futex.h | 24 unsigned int nthreads; member
|
/linux/arch/powerpc/platforms/pseries/ |
A D | hotplug-cpu.c | 221 nthreads = len / sizeof(u32); in pseries_add_processor() 271 cpu, cpu + nthreads - 1); in pseries_add_processor() 295 int len, nthreads, i; in pseries_remove_processor() local 303 nthreads = len / sizeof(u32); in pseries_remove_processor() 306 for (i = 0; i < nthreads; i++) { in pseries_remove_processor() 328 int len, nthreads, i; in dlpar_offline_cpu() local 336 nthreads = len / sizeof(u32); in dlpar_offline_cpu() 339 for (i = 0; i < nthreads; i++) { in dlpar_offline_cpu() 384 int len, nthreads, i; in dlpar_online_cpu() local 392 nthreads = len / sizeof(u32); in dlpar_online_cpu() [all …]
|
/linux/tools/perf/util/ |
A D | counts.c | 9 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()
|
A D | stat.c | 155 static int evsel__alloc_prev_raw_counts(struct evsel *evsel, int ncpus, int nthreads) in evsel__alloc_prev_raw_counts() argument 159 counts = perf_counts__new(ncpus, nthreads); in evsel__alloc_prev_raw_counts() 181 int nthreads = perf_thread_map__nr(evsel->core.threads); in evsel__alloc_stats() local 184 evsel__alloc_counts(evsel, ncpus, nthreads) < 0 || in evsel__alloc_stats() 185 (alloc_raw && evsel__alloc_prev_raw_counts(evsel, ncpus, nthreads) < 0)) in evsel__alloc_stats() 239 int nthreads = perf_thread_map__nr(evsel->core.threads); in evsel__copy_prev_raw_counts() local 241 for (int thread = 0; thread < nthreads; thread++) { in evsel__copy_prev_raw_counts() 412 int nthreads = perf_thread_map__nr(counter->core.threads); in process_counter_maps() local 417 nthreads = 1; in process_counter_maps() 419 for (thread = 0; thread < nthreads; thread++) { in process_counter_maps()
|
A D | counts.h | 38 struct perf_counts *perf_counts__new(int ncpus, int nthreads); 43 int evsel__alloc_counts(struct evsel *evsel, int ncpus, int nthreads);
|
A D | evsel.c | 1771 int nthreads; in __evsel__prepare_open() local 1798 nthreads = 1; in __evsel__prepare_open() 1800 nthreads = threads->nr; in __evsel__prepare_open() 1803 perf_evsel__alloc_fd(&evsel->core, cpus->nr, nthreads) < 0) in __evsel__prepare_open() 1998 int cpu, thread, nthreads; in evsel__open_cpu() local 2013 nthreads = 1; in evsel__open_cpu() 2015 nthreads = threads->nr; in evsel__open_cpu() 2027 for (thread = 0; thread < nthreads; thread++) { in evsel__open_cpu() 2030 if (thread >= nthreads) in evsel__open_cpu() 2102 nthreads--; in evsel__open_cpu() [all …]
|
/linux/kernel/kcsan/ |
A D | kcsan_test.c | 1019 if (nthreads < 0 || nthreads >= 32) in nthreads_gen_params() 1021 else if (!nthreads) in nthreads_gen_params() 1023 else if (nthreads < 5) in nthreads_gen_params() 1024 nthreads++; in nthreads_gen_params() 1025 else if (nthreads == 5) in nthreads_gen_params() 1026 nthreads = 8; in nthreads_gen_params() 1028 nthreads *= 2; in nthreads_gen_params() 1042 nthreads = 0; in nthreads_gen_params() 1052 return (void *)nthreads; in nthreads_gen_params() 1136 int nthreads; in test_init() local [all …]
|
/linux/tools/lib/perf/ |
A D | evsel.c | 49 int perf_evsel__alloc_fd(struct perf_evsel *evsel, int ncpus, int nthreads) in perf_evsel__alloc_fd() argument 51 evsel->fd = xyarray__new(ncpus, nthreads, sizeof(int)); in perf_evsel__alloc_fd() 56 for (thread = 0; thread < nthreads; thread++) { in perf_evsel__alloc_fd() 68 static int perf_evsel__alloc_mmap(struct perf_evsel *evsel, int ncpus, int nthreads) in perf_evsel__alloc_mmap() argument 70 evsel->mmap = xyarray__new(ncpus, nthreads, sizeof(struct perf_mmap)); in perf_evsel__alloc_mmap() 405 int perf_evsel__alloc_id(struct perf_evsel *evsel, int ncpus, int nthreads) in perf_evsel__alloc_id() argument 407 if (ncpus == 0 || nthreads == 0) in perf_evsel__alloc_id() 411 nthreads = 1; in perf_evsel__alloc_id() 413 evsel->sample_id = xyarray__new(ncpus, nthreads, sizeof(struct perf_sample_id)); in perf_evsel__alloc_id() 417 evsel->id = zalloc(ncpus * nthreads * sizeof(u64)); in perf_evsel__alloc_id()
|
/linux/kernel/ |
A D | scftorture.c | 57 torture_param(int, nthreads, -1, "# threads, defaults to -1 for all CPUs."); 165 for (i = 0; i < nthreads; i++) { in scf_torture_stats_print() 502 …verbose, holdoff, longwait, nthreads, onoff_holdoff, onoff_interval, shutdown, stat_interval, stut… in scftorture_print_module_parms() 517 if (nthreads && scf_stats_p) in scf_torture_cleanup() 518 for (i = 0; i < nthreads; i++) in scf_torture_cleanup() 624 if (nthreads < 0) in scf_torture_init() 625 nthreads = num_online_cpus(); in scf_torture_init() 626 scf_stats_p = kcalloc(nthreads, sizeof(scf_stats_p[0]), GFP_KERNEL); in scf_torture_init() 633 VERBOSE_SCFTORTOUT("Starting %d smp_call_function() threads\n", nthreads); in scf_torture_init() 635 atomic_set(&n_started, nthreads); in scf_torture_init() [all …]
|
/linux/tools/testing/selftests/vm/ |
A D | gup_test.c | 87 int filed, i, opt, nr_pages = 1, thp = -1, write = 1, nthreads = 1, ret; in main() local 124 nthreads = atoi(optarg); in main() 237 tid = malloc(sizeof(pthread_t) * nthreads); in main() 239 for (i = 0; i < nthreads; i++) { in main() 243 for (i = 0; i < nthreads; i++) { in main()
|
/linux/kernel/locking/ |
A D | test-ww_mutex.c | 315 static int __test_cycle(unsigned int nthreads) in __test_cycle() argument 318 unsigned int n, last = nthreads - 1; in __test_cycle() 321 cycles = kmalloc_array(nthreads, sizeof(*cycles), GFP_KERNEL); in __test_cycle() 325 for (n = 0; n < nthreads; n++) { in __test_cycle() 344 for (n = 0; n < nthreads; n++) in __test_cycle() 350 for (n = 0; n < nthreads; n++) { in __test_cycle() 357 n, nthreads, cycle->result); in __test_cycle() 362 for (n = 0; n < nthreads; n++) in __test_cycle() 564 static int stress(int nlocks, int nthreads, unsigned int flags) in stress() argument 576 for (n = 0; nthreads; n++) { in stress() [all …]
|
/linux/fs/nfsd/ |
A D | nfssvc.c | 687 int nfsd_get_nrthreads(int n, int *nthreads, struct net *net) in nfsd_get_nrthreads() argument 694 nthreads[i] = nn->nfsd_serv->sv_pools[i].sp_nrthreads; in nfsd_get_nrthreads() 730 nthreads[i] = min(nthreads[i], NFSD_MAXSERVS); in nfsd_set_nrthreads() 731 tot += nthreads[i]; in nfsd_set_nrthreads() 736 int new = nthreads[i] * NFSD_MAXSERVS / tot; in nfsd_set_nrthreads() 737 tot -= (nthreads[i] - new); in nfsd_set_nrthreads() 738 nthreads[i] = new; in nfsd_set_nrthreads() 741 nthreads[i]--; in nfsd_set_nrthreads() 750 if (nthreads[0] == 0) in nfsd_set_nrthreads() 751 nthreads[0] = 1; in nfsd_set_nrthreads() [all …]
|
A D | nfsctl.c | 488 int *nthreads; in write_pool_threads() local 504 nthreads = kcalloc(npools, sizeof(int), GFP_KERNEL); in write_pool_threads() 506 if (nthreads == NULL) in write_pool_threads() 511 rv = get_int(&mesg, &nthreads[i]); in write_pool_threads() 517 if (nthreads[i] < 0) in write_pool_threads() 520 rv = nfsd_set_nrthreads(i, nthreads, net); in write_pool_threads() 525 rv = nfsd_get_nrthreads(npools, nthreads, net); in write_pool_threads() 532 snprintf(mesg, size, "%d%c", nthreads[i], (i == npools-1 ? '\n' : ' ')); in write_pool_threads() 539 kfree(nthreads); in write_pool_threads()
|
/linux/arch/powerpc/kernel/ |
A D | setup-common.c | 439 int nthreads = 1; in smp_setup_cpu_maps() local 460 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() 500 nthreads = 1; in smp_setup_cpu_maps() 525 maxcpus *= nthreads; in smp_setup_cpu_maps() 551 cpu_init_thread_core_maps(nthreads); in smp_setup_cpu_maps()
|
A D | prom.c | 315 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/tools/lib/perf/include/internal/ |
A D | evsel.h | 58 int perf_evsel__alloc_fd(struct perf_evsel *evsel, int ncpus, int nthreads); 64 int perf_evsel__alloc_id(struct perf_evsel *evsel, int ncpus, int nthreads);
|
/linux/tools/testing/selftests/filesystems/binderfs/ |
A D | binderfs_test.c | 402 int i, j, k, nthreads; in TEST() local 451 nthreads = get_nprocs_conf(); in TEST() 452 if (nthreads > DEFAULT_THREADS) in TEST() 453 nthreads = DEFAULT_THREADS; in TEST() 458 for (i = 0; i < nthreads; i++) { in TEST()
|
/linux/tools/testing/selftests/mount_setattr/ |
A D | mount_setattr_test.c | 911 int i, j, nthreads, ret = 0; in TEST_F() local 923 nthreads = get_nprocs_conf(); in TEST_F() 924 if (nthreads > DEFAULT_THREADS) in TEST_F() 925 nthreads = DEFAULT_THREADS; in TEST_F() 928 for (i = 0; i < nthreads; i++) in TEST_F()
|