Home
last modified time | relevance | path

Searched refs:nthreads (Results 1 - 25 of 60) sorted by relevance

123

/kernel/linux/linux-5.10/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; 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; in bench_futex_hash()
[all...]
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, onesho 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; in bench_epoll_ctl()
[all...]
/kernel/linux/linux-6.6/tools/perf/bench/
H A Dfutex-requeue.c53 OPT_UINTEGER('t', "threads", &params.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...]
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 Dbreakpoint.c22 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()
111 // then starts nparallel threads which create and join bench_repeat batches of nthreads threads.
161 (double)result_usec / bench_repeat / thread_params.nthreads); in bench_breakpoint_thread()
164 thread_params.nthreads * thread_param in bench_breakpoint_thread()
200 unsigned int i, nthreads, result_usec, done = 0; bench_breakpoint_enable() local
[all...]
H A Dfutex-wake-parallel.c63 OPT_UINTEGER('t', "threads", &params.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 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; in bench_futex_lock_pi()
[all...]
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
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, onesho 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"),
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; in bench_epoll_ctl()
[all...]
/kernel/linux/linux-6.6/tools/testing/selftests/mm/
H A Dmigration.c27 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()
123 if (self->nthreads < 2 || self->n1 < 0 || self->n2 < 0)
131 for (i = 0; i < self->nthreads - 1; i++)
136 for (i = 0; i < self->nthreads - 1; i++)
149 if (self->nthreads < 2 || self->n1 < 0 || self->n2 < 0)
157 for (i = 0; i < self->nthreads - 1; i++) {
171 for (i = 0; i < self->nthreads
[all...]
H A Dgup_test.c92 int filed, i, opt, nr_pages = 1, thp = -1, write = 1, nthreads = 1, ret; in main() local
129 nthreads = atoi(optarg); in main()
257 tid = malloc(sizeof(pthread_t) * nthreads); in main()
259 for (i = 0; i < nthreads; i++) { in main()
263 for (i = 0; i < nthreads; i++) { in main()
/kernel/linux/linux-5.10/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; threa in process_counter_maps()
[all...]
/kernel/linux/linux-6.6/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()
/kernel/linux/linux-6.6/arch/powerpc/platforms/pseries/
H A Dhotplug-cpu.c145 * find_cpu_id_range - found a linear ranger of @nthreads free CPU ids.
146 * @nthreads : the number of threads (cpu ids)
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 in pseries_add_processor()
296 int len, nthreads, i; pseries_remove_processor() local
329 int len, nthreads, i; dlpar_offline_cpu() local
385 int len, nthreads, i; dlpar_online_cpu() local
[all...]
/kernel/linux/linux-5.10/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 in dlpar_offline_cpu()
293 int len, nthreads, i; dlpar_online_cpu() local
[all...]
/kernel/linux/linux-5.10/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()
/kernel/linux/linux-5.10/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()
439 "--- %s: verbose=%d holdoff=%d longwait=%d nthreads=%d onoff_holdoff=%d onoff_interval=%d shutdown_secs=%d stat_interval=%d stutter_cpus=%d use_cpus_read_lock=%d, weight_single=%d, weight_single_wait=%d, weight_many=%d, weight_many_wait=%d, weight_all=%d, weight_all_wait=%d\n", tag, in scftorture_print_module_parms()
440 verbose, holdoff, longwait, nthreads, onoff_holdoff, onoff_interval, shutdown, stat_interval, stutter_cpus, use_cpus_read_lock, weight_single, weight_single_wait, weight_many, weight_many_wait, weight_all, weight_all_wait); in scftorture_print_module_parms()
455 if (nthreads) in scf_torture_cleanup()
456 for (i = 0; i < nthreads; i++) in scf_torture_cleanup()
543 if (nthreads < 0) in scf_torture_init()
544 nthreads = num_online_cpus(); in scf_torture_init()
545 scf_stats_p = kcalloc(nthreads, sizeof(scf_stats_p[0]), GFP_KERNEL); in scf_torture_init()
552 VERBOSE_SCFTORTOUT("Starting %d smp_call_function() threads\n", nthreads); in scf_torture_init()
[all...]
/kernel/linux/linux-6.6/tools/testing/selftests/timers/
H A Dposix_timers.c214 const int nthreads = 10; in check_timer_distribution() local
215 pthread_t threads[nthreads]; in check_timer_distribution()
226 remain = nthreads + 1; /* worker threads + this thread */ in check_timer_distribution()
239 for (i = 0; i < nthreads; i++) { in check_timer_distribution()
249 for (i = 0; i < nthreads; i++) { in check_timer_distribution()
/kernel/linux/linux-6.6/kernel/kcsan/
H A Dkcsan_test.c1375 long nthreads = (long)prev; in nthreads_gen_params() local
1377 if (nthreads < 0 || nthreads >= 32) in nthreads_gen_params()
1378 nthreads = 0; /* stop */ in nthreads_gen_params()
1379 else if (!nthreads) in nthreads_gen_params()
1380 nthreads = 2; /* initial value */ in nthreads_gen_params()
1381 else if (nthreads < 5) in nthreads_gen_params()
1382 nthreads++; in nthreads_gen_params()
1383 else if (nthreads == 5) in nthreads_gen_params()
1384 nthreads in nthreads_gen_params()
1500 int nthreads; test_init() local
[all...]

Completed in 15 milliseconds

123