| /Linux-v5.15/tools/perf/bench/ |
| D | futex-requeue.c | 52 OPT_UINTEGER('t', "threads", ¶ms.nthreads, "Specify amount of threads"), 76 params.nthreads, in print_summary() 129 threads_starting = params.nthreads; in block_threads() 132 for (i = 0; i < params.nthreads; i++) { in block_threads() 177 if (!params.nthreads) in bench_futex_requeue() 178 params.nthreads = cpu->nr; in bench_futex_requeue() 180 worker = calloc(params.nthreads, sizeof(*worker)); 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() [all …]
|
| 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 …]
|
| D | futex-wake-parallel.c | 62 OPT_UINTEGER('t', "threads", ¶ms.nthreads, "Specify amount of threads"), 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() [all …]
|
| 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()
|
| 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()
|
| D | epoll-wait.c | 90 static unsigned int nthreads = 0; variable 127 OPT_UINTEGER('t', "threads", &nthreads, "Specify amount of threads"), 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() 472 getpid(), nthreads, oneshot ? " (EPOLLONESHOT semantics)": "", nfds, nsecs); in bench_epoll_wait() [all …]
|
| 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 …]
|
| D | futex.h | 24 unsigned int nthreads; member
|
| /Linux-v5.15/tools/perf/util/ |
| 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()
|
| 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()
|
| 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);
|
| D | evsel.c | 1752 int nthreads; in __evsel__prepare_open() local 1779 nthreads = 1; in __evsel__prepare_open() 1781 nthreads = threads->nr; in __evsel__prepare_open() 1784 perf_evsel__alloc_fd(&evsel->core, cpus->nr, nthreads) < 0) in __evsel__prepare_open() 1962 int cpu, thread, nthreads; in evsel__open_cpu() local 1977 nthreads = 1; in evsel__open_cpu() 1979 nthreads = threads->nr; in evsel__open_cpu() 1991 for (thread = 0; thread < nthreads; thread++) { in evsel__open_cpu() 1994 if (thread >= nthreads) in evsel__open_cpu() 2066 nthreads--; in evsel__open_cpu() [all …]
|
| /Linux-v5.15/arch/powerpc/platforms/pseries/ |
| D | hotplug-cpu.c | 157 static int find_cpu_id_range(unsigned int nthreads, int assigned_node, in find_cpu_id_range() argument 168 for (cpu = 0; cpu < nthreads; cpu++) in find_cpu_id_range() 197 cpumask_shift_left(*cpu_mask, *cpu_mask, nthreads); in find_cpu_id_range() 217 int len, nthreads, node, cpu, assigned_node; in pseries_add_processor() local 226 nthreads = len / sizeof(u32); in pseries_add_processor() 244 rc = find_cpu_id_range(nthreads, node, &cpu_mask); in pseries_add_processor() 250 rc = find_cpu_id_range(nthreads, NUMA_NO_NODE, &cpu_mask); in pseries_add_processor() 276 cpu, cpu + nthreads - 1); in pseries_add_processor() 300 int len, nthreads, i; in pseries_remove_processor() local 308 nthreads = len / sizeof(u32); in pseries_remove_processor() [all …]
|
| /Linux-v5.15/kernel/kcsan/ |
| D | kcsan_test.c | 995 long nthreads = (long)prev; in nthreads_gen_params() local 997 if (nthreads < 0 || nthreads >= 32) in nthreads_gen_params() 998 nthreads = 0; /* stop */ in nthreads_gen_params() 999 else if (!nthreads) in nthreads_gen_params() 1000 nthreads = 2; /* initial value */ in nthreads_gen_params() 1001 else if (nthreads < 5) in nthreads_gen_params() 1002 nthreads++; in nthreads_gen_params() 1003 else if (nthreads == 5) in nthreads_gen_params() 1004 nthreads = 8; in nthreads_gen_params() 1006 nthreads *= 2; in nthreads_gen_params() [all …]
|
| /Linux-v5.15/tools/lib/perf/ |
| 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-v5.15/tools/testing/selftests/vm/ |
| 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-v5.15/kernel/ |
| 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() 501 …verbose, holdoff, longwait, nthreads, onoff_holdoff, onoff_interval, shutdown, stat_interval, stut… in scftorture_print_module_parms() 516 if (nthreads && scf_stats_p) in scf_torture_cleanup() 517 for (i = 0; i < nthreads; i++) in scf_torture_cleanup() 623 if (nthreads < 0) in scf_torture_init() 624 nthreads = num_online_cpus(); in scf_torture_init() 625 scf_stats_p = kcalloc(nthreads, sizeof(scf_stats_p[0]), GFP_KERNEL); in scf_torture_init() 632 VERBOSE_SCFTORTOUT("Starting %d smp_call_function() threads\n", nthreads); in scf_torture_init() 634 atomic_set(&n_started, nthreads); in scf_torture_init() [all …]
|
| /Linux-v5.15/kernel/locking/ |
| D | test-ww_mutex.c | 275 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.15/fs/nfsd/ |
| 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() 712 int nfsd_set_nrthreads(int n, int *nthreads, struct net *net) in nfsd_set_nrthreads() argument 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() [all …]
|
| 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-v5.15/tools/lib/perf/include/internal/ |
| 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-v5.15/arch/powerpc/kernel/ |
| D | setup-common.c | 442 int nthreads = 1; in smp_setup_cpu_maps() local 463 nthreads); in smp_setup_cpu_maps() 475 nthreads = len / sizeof(int); in smp_setup_cpu_maps() 477 for (j = 0; j < nthreads && cpu < nr_cpu_ids; j++) { in smp_setup_cpu_maps() 503 nthreads = 1; in smp_setup_cpu_maps() 528 maxcpus *= nthreads; in smp_setup_cpu_maps() 554 cpu_init_thread_core_maps(nthreads); in smp_setup_cpu_maps()
|
| 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-v5.15/tools/testing/selftests/filesystems/binderfs/ |
| 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-v5.15/tools/testing/selftests/mount_setattr/ |
| 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()
|