Home
last modified time | relevance | path

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

12

/linux-6.15/tools/testing/selftests/mm/
H A Dmigration.c27 int nthreads; in FIXTURE() local
37 self->nthreads = numa_num_task_cpus() - 1; in FIXTURE_SETUP()
136 for (i = 0; i < self->nthreads - 1; i++)
141 for (i = 0; i < self->nthreads - 1; i++)
176 for (i = 0; i < self->nthreads - 1; i++)
198 for (i = 0; i < self->nthreads - 1; i++)
203 for (i = 0; i < self->nthreads - 1; i++)
242 for (i = 0; i < self->nthreads - 1; i++)
262 for (i = 0; i < self->nthreads - 1; i++)
267 for (i = 0; i < self->nthreads - 1; i++)
[all …]
H A Dgup_test.c95 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()
H A Dpagemap_ioctl.c1409 wp_init(mem, 0x1000 * nthreads * pages_per_thread); in transact_test()
1410 wp_addr_range(mem, 0x1000 * nthreads * pages_per_thread); in transact_test()
1412 memset(mem, 0, 0x1000 * nthreads * pages_per_thread); in transact_test()
1420 for (i = 0; i < nthreads; ++i) in transact_test()
1438 if (count > nthreads * access_per_thread) in transact_test()
1440 count, nthreads * access_per_thread, i); in transact_test()
1445 if (c > nthreads * access_per_thread) { in transact_test()
1450 if (count != nthreads * access_per_thread) { in transact_test()
1463 if (count < nthreads * access_per_thread) { in transact_test()
1465 nthreads * access_per_thread); in transact_test()
[all …]
/linux-6.15/tools/perf/bench/
H A Dfutex-requeue.c77 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()
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()
273 params.nthreads, in bench_futex_requeue()
280 params.nthreads, in bench_futex_requeue()
289 if (params.nthreads != nrequeued) in bench_futex_requeue()
[all …]
H A Dbreakpoint.c22 unsigned int nthreads; member
26 .nthreads = 1,
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()
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
219 nthreads = enable_params.npassive + enable_params.nactive; in bench_breakpoint_enable()
220 threads = calloc(nthreads, sizeof(threads[0])); in bench_breakpoint_enable()
224 for (i = 0; i < nthreads; i++) { in bench_breakpoint_enable()
[all …]
H A Dfutex-wake.c53 OPT_UINTEGER('t', "threads", &params.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 …]
H A Dfutex-wake-parallel.c155 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()
285 nwakes = params.nthreads/params.nwakes; in bench_futex_wake_parallel()
[all …]
H A Dfutex-lock-pi.c48 OPT_UINTEGER('t', "threads", &params.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()
H A Dfutex-hash.c56 OPT_UINTEGER('t', "threads", &params.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()
H A Depoll-wait.c91 static unsigned int nthreads = 0; variable
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()
473 if (!nthreads) in bench_epoll_wait()
474 nthreads = perf_cpu_map__nr(cpu) - 1; in bench_epoll_wait()
476 worker = calloc(nthreads, sizeof(*worker)); in bench_epoll_wait()
483 rl.rlim_cur = rl.rlim_max = nfds * nthreads * 2 + 50; in bench_epoll_wait()
498 threads_starting = nthreads; in bench_epoll_wait()
539 for (i = 0; i < nthreads; i++) { in bench_epoll_wait()
[all …]
H A Depoll-ctl.c36 static unsigned int nthreads = 0; variable
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()
402 for (i = 0; i < nthreads; i++) { in bench_epoll_ctl()
[all …]
/linux-6.15/tools/perf/util/
H A Dcounts.c10 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()
H A Dtool_pmu.c203 int nthreads) in evsel__tool_pmu_prepare_open() argument
209 nthreads, in evsel__tool_pmu_prepare_open()
224 int pid = -1, idx = 0, thread = 0, nthreads, err = 0, old_errno; in evsel__tool_pmu_open() local
239 nthreads = perf_thread_map__nr(threads); in evsel__tool_pmu_open()
241 for (thread = 0; thread < nthreads; thread++) { in evsel__tool_pmu_open()
242 if (thread >= nthreads) in evsel__tool_pmu_open()
301 thread = nthreads; in evsel__tool_pmu_open()
/linux-6.15/arch/powerpc/platforms/pseries/
H A Dhotplug-cpu.c225 nthreads = len / sizeof(u32); in pseries_add_processor()
275 cpu, cpu + nthreads - 1); in pseries_add_processor()
299 int len, nthreads, i; in pseries_remove_processor() local
307 nthreads = len / sizeof(u32); in pseries_remove_processor()
310 for (i = 0; i < nthreads; i++) { in pseries_remove_processor()
332 int len, nthreads, i; in dlpar_offline_cpu() local
340 nthreads = len / sizeof(u32); in dlpar_offline_cpu()
343 for (i = 0; i < nthreads; i++) { in dlpar_offline_cpu()
388 int len, nthreads, i; in dlpar_online_cpu() local
396 nthreads = len / sizeof(u32); in dlpar_online_cpu()
[all …]
/linux-6.15/kernel/
H A Dscftorture.c54 torture_param(int, nthreads, -1, "# threads, defaults to -1 for all CPUs.");
160 cpu = raw_smp_processor_id() % nthreads; in scf_add_to_free_list()
191 for (i = 0; i < nthreads; i++) { in scf_torture_stats_print()
552 if (nthreads && scf_stats_p) in scf_torture_cleanup()
553 for (i = 0; i < nthreads; i++) in scf_torture_cleanup()
662 if (nthreads < 0) in scf_torture_init()
663 nthreads = num_online_cpus(); in scf_torture_init()
664 scf_stats_p = kcalloc(nthreads, sizeof(scf_stats_p[0]), GFP_KERNEL); in scf_torture_init()
671 VERBOSE_SCFTORTOUT("Starting %d smp_call_function() threads", nthreads); in scf_torture_init()
673 atomic_set(&n_started, nthreads); in scf_torture_init()
[all …]
/linux-6.15/kernel/locking/
H A Dtest-ww_mutex.c317 static int __test_cycle(unsigned int nthreads) in __test_cycle() argument
320 unsigned int n, last = nthreads - 1; in __test_cycle()
323 cycles = kmalloc_array(nthreads, sizeof(*cycles), GFP_KERNEL); in __test_cycle()
327 for (n = 0; n < nthreads; n++) { in __test_cycle()
346 for (n = 0; n < nthreads; n++) in __test_cycle()
352 for (n = 0; n < nthreads; n++) { in __test_cycle()
359 n, nthreads, cycle->result); in __test_cycle()
364 for (n = 0; n < nthreads; n++) in __test_cycle()
583 stress_array = kmalloc_array(nthreads, sizeof(*stress_array), in stress()
594 for (n = 0; nthreads; n++) { in stress()
[all …]
/linux-6.15/tools/testing/selftests/mm/page_frag/
H A Dpage_frag_test.c20 static atomic_t nthreads; variable
68 if (atomic_dec_and_test(&nthreads)) in page_frag_pop_thread()
115 if (atomic_dec_and_test(&nthreads)) in page_frag_push_thread()
130 atomic_set(&nthreads, 2); in page_frag_test_init()
/linux-6.15/fs/nfsd/
H A Dnfssvc.c672 int nfsd_get_nrthreads(int n, int *nthreads, struct net *net) in nfsd_get_nrthreads() argument
680 nthreads[i] = serv->sv_pools[i].sp_nrthreads; in nfsd_get_nrthreads()
697 int nfsd_set_nrthreads(int n, int *nthreads, struct net *net) in nfsd_set_nrthreads() argument
722 nthreads[i] = min(nthreads[i], NFSD_MAXSERVS); in nfsd_set_nrthreads()
723 tot += nthreads[i]; in nfsd_set_nrthreads()
728 int new = nthreads[i] * NFSD_MAXSERVS / tot; in nfsd_set_nrthreads()
729 tot -= (nthreads[i] - new); in nfsd_set_nrthreads()
730 nthreads[i] = new; in nfsd_set_nrthreads()
733 nthreads[i]--; in nfsd_set_nrthreads()
742 nthreads[i]); in nfsd_set_nrthreads()
[all …]
/linux-6.15/kernel/kcsan/
H A Dkcsan_test.c1390 if (nthreads < 0 || nthreads >= 32) in nthreads_gen_params()
1392 else if (!nthreads) 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()
1414 nthreads = 0; in nthreads_gen_params()
1424 return (void *)nthreads; in nthreads_gen_params()
1514 int nthreads; in test_init() local
[all …]
/linux-6.15/arch/powerpc/kernel/
H A Dsetup-common.c416 static int assign_threads(unsigned int cpu, unsigned int nthreads, bool present, in assign_threads() argument
419 for (int i = 0; i < nthreads && cpu < nr_cpu_ids; i++) { in assign_threads()
457 int nthreads = 1; in smp_setup_cpu_maps() local
487 nthreads = len / sizeof(int); in smp_setup_cpu_maps()
497 cpu = nthreads; in smp_setup_cpu_maps()
503 assign_threads(0, nthreads, avail, intserv); in smp_setup_cpu_maps()
513 cpu = assign_threads(cpu, nthreads, avail, intserv); in smp_setup_cpu_maps()
519 nthreads = 1; in smp_setup_cpu_maps()
544 maxcpus *= nthreads; in smp_setup_cpu_maps()
572 cpu_init_thread_core_maps(nthreads); in smp_setup_cpu_maps()
/linux-6.15/lib/
H A Dtest_objpool.c39 atomic_t nthreads ____cacheline_aligned_in_smp;
142 atomic_set(&data->nthreads, 1); in ot_init_data()
222 atomic_inc(&test->data.nthreads); in ot_thread_worker()
235 if (atomic_dec_and_test(&test->data.nthreads)) in ot_thread_worker()
244 int cpu, nthreads = 0; in ot_perf_report() local
265 nthreads++; in ot_perf_report()
271 pr_info("ALL: \tnthreads: %d duration: %lluus\n", nthreads, duration); in ot_perf_report()
383 if (atomic_dec_and_test(&test->data.nthreads)) in ot_start_sync()
569 if (atomic_dec_and_test(&test->data.nthreads)) in ot_start_async()
/linux-6.15/tools/lib/perf/
H A Devsel.c54 int perf_evsel__alloc_fd(struct perf_evsel *evsel, int ncpus, int nthreads) in perf_evsel__alloc_fd() argument
56 evsel->fd = xyarray__new(ncpus, nthreads, sizeof(int)); in perf_evsel__alloc_fd()
62 for (thread = 0; thread < nthreads; thread++) { in perf_evsel__alloc_fd()
74 static int perf_evsel__alloc_mmap(struct perf_evsel *evsel, int ncpus, int nthreads) in perf_evsel__alloc_mmap() argument
76 evsel->mmap = xyarray__new(ncpus, nthreads, sizeof(struct perf_mmap)); in perf_evsel__alloc_mmap()
515 int perf_evsel__alloc_id(struct perf_evsel *evsel, int ncpus, int nthreads) in perf_evsel__alloc_id() argument
517 if (ncpus == 0 || nthreads == 0) in perf_evsel__alloc_id()
520 evsel->sample_id = xyarray__new(ncpus, nthreads, sizeof(struct perf_sample_id)); in perf_evsel__alloc_id()
524 evsel->id = zalloc(ncpus * nthreads * sizeof(u64)); in perf_evsel__alloc_id()
/linux-6.15/arch/x86/kernel/cpu/
H A Ddebugfs.c63 unsigned int dom, nthreads = 1; in dom_debug_show() local
66 nthreads *= x86_topo_system.dom_size[dom]; in dom_debug_show()
69 x86_topo_system.dom_size[dom], nthreads); in dom_debug_show()
H A Dtopology_amd.c94 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.15/tools/lib/perf/include/internal/
H A Devsel.h136 int perf_evsel__alloc_fd(struct perf_evsel *evsel, int ncpus, int nthreads);
142 int perf_evsel__alloc_id(struct perf_evsel *evsel, int ncpus, int nthreads);

12