/linux-6.12.1/tools/perf/bench/ |
D | futex-requeue.c | 53 OPT_UINTEGER('t', "threads", ¶ms.nthreads, "Specify amount of threads"), 77 params.nthreads, in print_summary() 131 threads_starting = params.nthreads; in block_threads() 138 for (i = 0; i < params.nthreads; i++) { in block_threads() 191 if (!params.nthreads) in bench_futex_requeue() 192 params.nthreads = perf_cpu_map__nr(cpu); in bench_futex_requeue() 194 worker = calloc(params.nthreads, sizeof(*worker)); in bench_futex_requeue() 201 if (params.nrequeue > params.nthreads) in bench_futex_requeue() 202 params.nrequeue = params.nthreads; in bench_futex_requeue() 205 params.nrequeue = params.nthreads; in bench_futex_requeue() [all …]
|
D | breakpoint.c | 22 unsigned int nthreads; member 26 .nthreads = 1, 33 OPT_UINTEGER('t', "threads", &thread_params.nthreads, "Specify amount of threads"), 91 threads = calloc(thread_params.nthreads, sizeof(threads[0])); in breakpoint_thread() 97 for (i = 0; i < thread_params.nthreads; i++) { in breakpoint_thread() 102 futex_wake(&done, thread_params.nthreads, 0); in breakpoint_thread() 103 for (i = 0; i < thread_params.nthreads; i++) in breakpoint_thread() 161 (double)result_usec / bench_repeat / thread_params.nthreads); in bench_breakpoint_thread() 164 thread_params.nthreads * thread_params.nparallel); in bench_breakpoint_thread() 200 unsigned int i, nthreads, result_usec, done = 0; in bench_breakpoint_enable() local [all …]
|
D | futex-wake.c | 53 OPT_UINTEGER('t', "threads", ¶ms.nthreads, "Specify amount of threads"), 93 params.nthreads, in print_summary() 104 threads_starting = params.nthreads; in block_threads() 111 for (i = 0; i < params.nthreads; i++) { in block_threads() 166 if (!params.nthreads) in bench_futex_wake() 167 params.nthreads = perf_cpu_map__nr(cpu); in bench_futex_wake() 169 worker = calloc(params.nthreads, sizeof(*worker)); in bench_futex_wake() 178 getpid(), params.nthreads, params.fshared ? "shared":"private", in bench_futex_wake() 205 while (nwoken != params.nthreads) in bench_futex_wake() 216 j + 1, nwoken, params.nthreads, in bench_futex_wake() [all …]
|
D | futex-wake-parallel.c | 63 OPT_UINTEGER('t', "threads", ¶ms.nthreads, "Specify amount of threads"), 155 threads_starting = params.nthreads; in block_threads() 162 for (i = 0; i < params.nthreads; i++) { in block_threads() 203 params.nthreads, waketime_avg / USEC_PER_MSEC, in print_run() 218 params.nthreads, in print_summary() 271 if (!params.nthreads) in bench_futex_wake_parallel() 272 params.nthreads = perf_cpu_map__nr(cpu); in bench_futex_wake_parallel() 275 if (params.nwakes > params.nthreads || in bench_futex_wake_parallel() 277 params.nwakes = params.nthreads; in bench_futex_wake_parallel() 279 if (params.nthreads % params.nwakes) in bench_futex_wake_parallel() [all …]
|
D | futex-lock-pi.c | 48 OPT_UINTEGER('t', "threads", ¶ms.nthreads, "Specify amount of threads"), 128 threads_starting = params.nthreads; in create_threads() 134 for (i = 0; i < params.nthreads; i++) { in create_threads() 189 if (!params.nthreads) in bench_futex_lock_pi() 190 params.nthreads = perf_cpu_map__nr(cpu); in bench_futex_lock_pi() 192 worker = calloc(params.nthreads, sizeof(*worker)); in bench_futex_lock_pi() 200 getpid(), params.nthreads, params.runtime); in bench_futex_lock_pi() 207 threads_starting = params.nthreads; in bench_futex_lock_pi() 221 for (i = 0; i < params.nthreads; i++) { in bench_futex_lock_pi() 232 for (i = 0; i < params.nthreads; i++) { in bench_futex_lock_pi()
|
D | futex-hash.c | 56 OPT_UINTEGER('t', "threads", ¶ms.nthreads, "Specify amount of threads"), 155 if (!params.nthreads) /* default to the number of CPUs */ in bench_futex_hash() 156 params.nthreads = perf_cpu_map__nr(cpu); in bench_futex_hash() 158 worker = calloc(params.nthreads, sizeof(*worker)); in bench_futex_hash() 166 … getpid(), params.nthreads, params.nfutexes, params.fshared ? "shared":"private", params.runtime); in bench_futex_hash() 173 threads_starting = params.nthreads; in bench_futex_hash() 182 for (i = 0; i < params.nthreads; i++) { in bench_futex_hash() 216 for (i = 0; i < params.nthreads; i++) { in bench_futex_hash() 227 for (i = 0; i < params.nthreads; i++) { in bench_futex_hash()
|
D | epoll-wait.c | 91 static unsigned int nthreads = 0; variable 128 OPT_UINTEGER('t', "threads", &nthreads, "Specify amount of threads"), 317 for (i = 0; i < nthreads; i++) { in do_threads() 394 shuffle((void *)worker, nthreads, sizeof(*worker)); in writerfn() 397 for (i = 0; i < nthreads; i++) { in writerfn() 468 if (!nthreads) in bench_epoll_wait() 469 nthreads = perf_cpu_map__nr(cpu) - 1; in bench_epoll_wait() 471 worker = calloc(nthreads, sizeof(*worker)); in bench_epoll_wait() 478 rl.rlim_cur = rl.rlim_max = nfds * nthreads * 2 + 50; in bench_epoll_wait() 486 getpid(), nthreads, oneshot ? " (EPOLLONESHOT semantics)": "", nfds, nsecs); in bench_epoll_wait() [all …]
|
D | epoll-ctl.c | 36 static unsigned int nthreads = 0; variable 75 OPT_UINTEGER('t', "threads", &nthreads, "Specify amount of threads"), 240 for (i = 0; i < nthreads; i++) { in do_threads() 349 if (!nthreads) in bench_epoll_ctl() 350 nthreads = perf_cpu_map__nr(cpu); in bench_epoll_ctl() 352 worker = calloc(nthreads, sizeof(*worker)); in bench_epoll_ctl() 358 rl.rlim_cur = rl.rlim_max = nfds * nthreads * 2 + 50; in bench_epoll_ctl() 366 getpid(), nthreads, nfds, nsecs); in bench_epoll_ctl() 375 threads_starting = nthreads; in bench_epoll_ctl() 391 for (i = 0; i < nthreads; i++) { in bench_epoll_ctl() [all …]
|
/linux-6.12.1/tools/testing/selftests/mm/ |
D | migration.c | 27 int nthreads; in FIXTURE() local 37 self->nthreads = numa_num_task_cpus() - 1; in FIXTURE_SETUP() 51 self->threads = malloc(self->nthreads * sizeof(*self->threads)); in FIXTURE_SETUP() 53 self->pids = malloc(self->nthreads * sizeof(*self->pids)); in FIXTURE_SETUP() 128 if (self->nthreads < 2 || self->n1 < 0 || self->n2 < 0) 136 for (i = 0; i < self->nthreads - 1; i++) 141 for (i = 0; i < self->nthreads - 1; i++) 154 if (self->nthreads < 2 || self->n1 < 0 || self->n2 < 0) 162 for (i = 0; i < self->nthreads - 1; i++) { 176 for (i = 0; i < self->nthreads - 1; i++) [all …]
|
D | gup_test.c | 95 int filed, i, opt, nr_pages = 1, thp = -1, write = 1, nthreads = 1, ret; in main() local 132 nthreads = atoi(optarg); in main() 205 ksft_set_plan(nthreads); in main() 258 tid = malloc(sizeof(pthread_t) * nthreads); in main() 260 for (i = 0; i < nthreads; i++) { in main() 264 for (i = 0; i < nthreads; i++) { in main()
|
D | pagemap_ioctl.c | 1304 static const unsigned int nthreads = 6, pages_per_thread = 32, access_per_thread = 8; variable 1391 if (pthread_barrier_init(&start_barrier, NULL, nthreads + 1)) in transact_test() 1394 if (pthread_barrier_init(&end_barrier, NULL, nthreads + 1)) in transact_test() 1397 mem = mmap(NULL, 0x1000 * nthreads * pages_per_thread, PROT_READ | PROT_WRITE, in transact_test() 1402 wp_init(mem, 0x1000 * nthreads * pages_per_thread); in transact_test() 1403 wp_addr_range(mem, 0x1000 * nthreads * pages_per_thread); in transact_test() 1405 memset(mem, 0, 0x1000 * nthreads * pages_per_thread); in transact_test() 1407 count = get_dirty_pages_reset(mem, nthreads * pages_per_thread, 1, page_size); in transact_test() 1409 count = get_dirty_pages_reset(mem, nthreads * pages_per_thread, 1, page_size); in transact_test() 1413 for (i = 0; i < nthreads; ++i) in transact_test() [all …]
|
/linux-6.12.1/tools/perf/util/ |
D | counts.c | 10 struct perf_counts *perf_counts__new(int ncpus, int nthreads) in perf_counts__new() argument 17 values = xyarray__new(ncpus, nthreads, sizeof(struct perf_counts_values)); in perf_counts__new() 25 values = xyarray__new(ncpus, nthreads, sizeof(bool)); in perf_counts__new() 61 int nthreads = perf_thread_map__nr(evsel->core.threads); in evsel__alloc_counts() local 63 evsel->counts = perf_counts__new(perf_cpu_map__nr(cpus), nthreads); in evsel__alloc_counts()
|
/linux-6.12.1/arch/powerpc/platforms/pseries/ |
D | hotplug-cpu.c | 153 static int find_cpu_id_range(unsigned int nthreads, int assigned_node, in find_cpu_id_range() argument 164 for (cpu = 0; cpu < nthreads; cpu++) in find_cpu_id_range() 193 cpumask_shift_left(*cpu_mask, *cpu_mask, nthreads); in find_cpu_id_range() 213 int len, nthreads, node, cpu, assigned_node; in pseries_add_processor() local 222 nthreads = len / sizeof(u32); in pseries_add_processor() 240 rc = find_cpu_id_range(nthreads, node, &cpu_mask); in pseries_add_processor() 246 rc = find_cpu_id_range(nthreads, NUMA_NO_NODE, &cpu_mask); in pseries_add_processor() 272 cpu, cpu + nthreads - 1); in pseries_add_processor() 296 int len, nthreads, i; in pseries_remove_processor() local 304 nthreads = len / sizeof(u32); in pseries_remove_processor() [all …]
|
/linux-6.12.1/kernel/ |
D | scftorture.c | 54 torture_param(int, nthreads, -1, "# threads, defaults to -1 for all CPUs."); 162 for (i = 0; i < nthreads; i++) { in scf_torture_stats_print() 506 …verbose, holdoff, longwait, nthreads, onoff_holdoff, onoff_interval, shutdown, stat_interval, stut… in scftorture_print_module_parms() 521 if (nthreads && scf_stats_p) in scf_torture_cleanup() 522 for (i = 0; i < nthreads; i++) in scf_torture_cleanup() 628 if (nthreads < 0) in scf_torture_init() 629 nthreads = num_online_cpus(); in scf_torture_init() 630 scf_stats_p = kcalloc(nthreads, sizeof(scf_stats_p[0]), GFP_KERNEL); in scf_torture_init() 637 VERBOSE_SCFTORTOUT("Starting %d smp_call_function() threads", nthreads); in scf_torture_init() 639 atomic_set(&n_started, nthreads); in scf_torture_init() [all …]
|
/linux-6.12.1/kernel/locking/ |
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() 574 static int stress(int nlocks, int nthreads, unsigned int flags) in stress() argument 584 stress_array = kmalloc_array(nthreads, sizeof(*stress_array), in stress() [all …]
|
/linux-6.12.1/fs/nfsd/ |
D | nfssvc.c | 703 int nfsd_get_nrthreads(int n, int *nthreads, struct net *net) in nfsd_get_nrthreads() argument 711 nthreads[i] = serv->sv_pools[i].sp_nrthreads; in nfsd_get_nrthreads() 728 int nfsd_set_nrthreads(int n, int *nthreads, struct net *net) in nfsd_set_nrthreads() argument 745 return svc_set_num_threads(nn->nfsd_serv, NULL, nthreads[0]); in nfsd_set_nrthreads() 753 nthreads[i] = min(nthreads[i], NFSD_MAXSERVS); in nfsd_set_nrthreads() 754 tot += nthreads[i]; in nfsd_set_nrthreads() 759 int new = nthreads[i] * NFSD_MAXSERVS / tot; in nfsd_set_nrthreads() 760 tot -= (nthreads[i] - new); in nfsd_set_nrthreads() 761 nthreads[i] = new; in nfsd_set_nrthreads() 764 nthreads[i]--; in nfsd_set_nrthreads() [all …]
|
D | nfsctl.c | 459 int *nthreads; in write_pool_threads() local 475 nthreads = kcalloc(npools, sizeof(int), GFP_KERNEL); in write_pool_threads() 477 if (nthreads == NULL) in write_pool_threads() 482 rv = get_int(&mesg, &nthreads[i]); in write_pool_threads() 488 if (nthreads[i] < 0) in write_pool_threads() 490 trace_nfsd_ctl_pool_threads(net, i, nthreads[i]); in write_pool_threads() 497 if (nthreads[0] == 0) in write_pool_threads() 498 nthreads[0] = 1; in write_pool_threads() 500 rv = nfsd_set_nrthreads(i, nthreads, net); in write_pool_threads() 505 rv = nfsd_get_nrthreads(npools, nthreads, net); in write_pool_threads() [all …]
|
/linux-6.12.1/kernel/kcsan/ |
D | kcsan_test.c | 1388 long nthreads = (long)prev; in nthreads_gen_params() local 1390 if (nthreads < 0 || nthreads >= 32) in nthreads_gen_params() 1391 nthreads = 0; /* stop */ in nthreads_gen_params() 1392 else if (!nthreads) in nthreads_gen_params() 1393 nthreads = 2; /* initial value */ in nthreads_gen_params() 1394 else if (nthreads < 5) in nthreads_gen_params() 1395 nthreads++; in nthreads_gen_params() 1396 else if (nthreads == 5) in nthreads_gen_params() 1397 nthreads = 8; in nthreads_gen_params() 1399 nthreads *= 2; in nthreads_gen_params() [all …]
|
/linux-6.12.1/arch/powerpc/kernel/ |
D | setup-common.c | 415 static int assign_threads(unsigned int cpu, unsigned int nthreads, bool present, in assign_threads() argument 418 for (int i = 0; i < nthreads && cpu < nr_cpu_ids; i++) { in assign_threads() 456 int nthreads = 1; in smp_setup_cpu_maps() local 489 nthreads = len / sizeof(int); in smp_setup_cpu_maps() 499 cpu = nthreads; in smp_setup_cpu_maps() 505 assign_threads(0, nthreads, avail, intserv); in smp_setup_cpu_maps() 515 cpu = assign_threads(cpu, nthreads, avail, intserv); in smp_setup_cpu_maps() 521 nthreads = 1; in smp_setup_cpu_maps() 546 maxcpus *= nthreads; in smp_setup_cpu_maps() 572 cpu_init_thread_core_maps(nthreads); in smp_setup_cpu_maps()
|
/linux-6.12.1/tools/lib/perf/ |
D | evsel.c | 52 int perf_evsel__alloc_fd(struct perf_evsel *evsel, int ncpus, int nthreads) in perf_evsel__alloc_fd() argument 54 evsel->fd = xyarray__new(ncpus, nthreads, sizeof(int)); in perf_evsel__alloc_fd() 60 for (thread = 0; thread < nthreads; thread++) { in perf_evsel__alloc_fd() 72 static int perf_evsel__alloc_mmap(struct perf_evsel *evsel, int ncpus, int nthreads) in perf_evsel__alloc_mmap() argument 74 evsel->mmap = xyarray__new(ncpus, nthreads, sizeof(struct perf_mmap)); in perf_evsel__alloc_mmap() 513 int perf_evsel__alloc_id(struct perf_evsel *evsel, int ncpus, int nthreads) in perf_evsel__alloc_id() argument 515 if (ncpus == 0 || nthreads == 0) in perf_evsel__alloc_id() 518 evsel->sample_id = xyarray__new(ncpus, nthreads, sizeof(struct perf_sample_id)); in perf_evsel__alloc_id() 522 evsel->id = zalloc(ncpus * nthreads * sizeof(u64)); in perf_evsel__alloc_id()
|
/linux-6.12.1/lib/ |
D | test_objpool.c | 39 atomic_t nthreads ____cacheline_aligned_in_smp; 142 atomic_set(&data->nthreads, 1); in ot_init_data() 223 atomic_inc(&test->data.nthreads); in ot_thread_worker() 236 if (atomic_dec_and_test(&test->data.nthreads)) in ot_thread_worker() 245 int cpu, nthreads = 0; in ot_perf_report() local 266 nthreads++; in ot_perf_report() 272 pr_info("ALL: \tnthreads: %d duration: %lluus\n", nthreads, duration); in ot_perf_report() 388 if (atomic_dec_and_test(&test->data.nthreads)) in ot_start_sync() 579 if (atomic_dec_and_test(&test->data.nthreads)) in ot_start_async()
|
/linux-6.12.1/arch/x86/kernel/cpu/ |
D | debugfs.c | 61 unsigned int dom, nthreads = 1; in dom_debug_show() local 64 nthreads *= x86_topo_system.dom_size[dom]; in dom_debug_show() 67 x86_topo_system.dom_size[dom], nthreads); in dom_debug_show()
|
D | topology_amd.c | 94 unsigned int nthreads = leaf.core_nthreads + 1; in parse_8000_001e() local 96 topology_update_dom(tscan, TOPO_SMT_DOMAIN, get_count_order(nthreads), nthreads); in parse_8000_001e()
|
/linux-6.12.1/tools/lib/perf/include/internal/ |
D | evsel.h | 82 int perf_evsel__alloc_fd(struct perf_evsel *evsel, int ncpus, int nthreads); 88 int perf_evsel__alloc_id(struct perf_evsel *evsel, int ncpus, int nthreads);
|
/linux-6.12.1/tools/testing/selftests/filesystems/binderfs/ |
D | binderfs_test.c | 404 int i, j, k, nthreads; in TEST() local 454 nthreads = get_nprocs_conf(); in TEST() 455 if (nthreads > DEFAULT_THREADS) in TEST() 456 nthreads = DEFAULT_THREADS; in TEST() 461 for (i = 0; i < nthreads; i++) { in TEST()
|