Home
last modified time | relevance | path

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

12

/linux/tools/testing/selftests/mm/
H A Dmigration.c30 int nthreads; in FIXTURE() local
40 self->nthreads = numa_num_task_cpus() - 1; in FIXTURE_SETUP()
54 self->threads = malloc(self->nthreads * sizeof(*self->threads)); in FIXTURE_SETUP()
56 self->pids = malloc(self->nthreads * sizeof(*self->pids)); in FIXTURE_SETUP()
129 if (self->nthreads < 2 || self->n1 < 0 || self->n2 < 0)
137 for (i = 0; i < self->nthreads - 1; i++)
142 for (i = 0; i < self->nthreads - 1; i++)
155 if (self->nthreads < 2 || self->n1 < 0 || self->n2 < 0)
163 for (i = 0; i < self->nthreads - 1; i++) {
177 for (i = 0; i < self->nthreads - 1; i++)
[all …]
H A Dgup_test.c94 int filed, i, opt, nr_pages = 1, thp = -1, write = 1, nthreads = 1, ret; in main() local
131 nthreads = atoi(optarg); in main()
202 ksft_set_plan(nthreads); in main()
246 tid = malloc(sizeof(pthread_t) * nthreads); in main()
248 for (i = 0; i < nthreads; i++) { in main()
252 for (i = 0; i < nthreads; i++) { in main()
H A Dpagemap_ioctl.c1309 static const unsigned int nthreads = 6, pages_per_thread = 32, access_per_thread = 8; variable
1399 if (pthread_barrier_init(&start_barrier, NULL, nthreads + 1)) in transact_test()
1402 if (pthread_barrier_init(&end_barrier, NULL, nthreads + 1)) in transact_test()
1405 mem = mmap(NULL, 0x1000 * nthreads * pages_per_thread, PROT_READ | PROT_WRITE, in transact_test()
1410 wp_init(mem, 0x1000 * nthreads * pages_per_thread); in transact_test()
1411 wp_addr_range(mem, 0x1000 * nthreads * pages_per_thread); in transact_test()
1413 memset(mem, 0, 0x1000 * nthreads * pages_per_thread); in transact_test()
1415 count = get_dirty_pages_reset(mem, nthreads * pages_per_thread, 1, page_size); in transact_test()
1417 count = get_dirty_pages_reset(mem, nthreads * pages_per_thread, 1, page_size); in transact_test()
1421 for (i = 0; i < nthreads; ++i) in transact_test()
[all …]
/linux/tools/perf/bench/
H A Dfutex-requeue.c55 OPT_UINTEGER('t', "threads", &params.nthreads, "Specify amount of threads"),
79 params.nthreads, in print_summary()
134 threads_starting = params.nthreads; in block_threads()
141 for (i = 0; i < params.nthreads; i++) { in block_threads()
194 if (!params.nthreads) in bench_futex_requeue()
195 params.nthreads = perf_cpu_map__nr(cpu); in bench_futex_requeue()
197 worker = calloc(params.nthreads, sizeof(*worker)); in bench_futex_requeue()
204 if (params.nrequeue > params.nthreads) in bench_futex_requeue()
205 params.nrequeue = params.nthreads; in bench_futex_requeue()
208 params.nrequeue = params.nthreads; in bench_futex_requeue()
[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()
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 …]
H A Dfutex-wake.c55 OPT_UINTEGER('t', "threads", &params.nthreads, "Specify amount of threads"),
95 params.nthreads, in print_summary()
107 threads_starting = params.nthreads; in block_threads()
114 for (i = 0; i < params.nthreads; i++) { in block_threads()
169 if (!params.nthreads) in bench_futex_wake()
170 params.nthreads = perf_cpu_map__nr(cpu); in bench_futex_wake()
172 worker = calloc(params.nthreads, sizeof(*worker)); in bench_futex_wake()
181 getpid(), params.nthreads, params.fshared ? "shared":"private", in bench_futex_wake()
208 while (nwoken != params.nthreads) in bench_futex_wake()
219 j + 1, nwoken, params.nthreads, in bench_futex_wake()
[all …]
H A Dfutex-wake-parallel.c66 OPT_UINTEGER('t', "threads", &params.nthreads, "Specify amount of threads"),
158 threads_starting = params.nthreads; in block_threads()
165 for (i = 0; i < params.nthreads; i++) { in block_threads()
206 params.nthreads, waketime_avg / USEC_PER_MSEC, in print_run()
221 params.nthreads, in print_summary()
275 if (!params.nthreads) in bench_futex_wake_parallel()
276 params.nthreads = perf_cpu_map__nr(cpu); in bench_futex_wake_parallel()
279 if (params.nwakes > params.nthreads || in bench_futex_wake_parallel()
281 params.nwakes = params.nthreads; in bench_futex_wake_parallel()
283 if (params.nthreads % params.nwakes) in bench_futex_wake_parallel()
[all …]
H A Dfutex-lock-pi.c50 OPT_UINTEGER('t', "threads", &params.nthreads, "Specify amount of threads"),
131 threads_starting = params.nthreads; in create_threads()
137 for (i = 0; i < params.nthreads; i++) { in create_threads()
192 if (!params.nthreads) in bench_futex_lock_pi()
193 params.nthreads = perf_cpu_map__nr(cpu); in bench_futex_lock_pi()
195 worker = calloc(params.nthreads, sizeof(*worker)); in bench_futex_lock_pi()
203 getpid(), params.nthreads, params.runtime); in bench_futex_lock_pi()
211 threads_starting = params.nthreads; in bench_futex_lock_pi()
225 for (i = 0; i < params.nthreads; i++) { in bench_futex_lock_pi()
236 for (i = 0; i < params.nthreads; i++) { in bench_futex_lock_pi()
H A Dfutex-hash.c59 OPT_UINTEGER('t', "threads", &params.nthreads, "Specify amount of threads"),
159 if (!params.nthreads) /* default to the number of CPUs */ in bench_futex_hash()
160 params.nthreads = perf_cpu_map__nr(cpu); in bench_futex_hash()
162 worker = calloc(params.nthreads, sizeof(*worker)); in bench_futex_hash()
171 … getpid(), params.nthreads, params.nfutexes, params.fshared ? "shared":"private", params.runtime); in bench_futex_hash()
178 threads_starting = params.nthreads; in bench_futex_hash()
187 for (i = 0; i < params.nthreads; i++) { in bench_futex_hash()
221 for (i = 0; i < params.nthreads; i++) { in bench_futex_hash()
232 for (i = 0; i < params.nthreads; i++) { in bench_futex_hash()
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; i++) { in bench_epoll_ctl()
[all …]
/linux/arch/powerpc/platforms/pseries/
H A Dhotplug-cpu.c156 static int find_cpu_id_range(unsigned int nthreads, int assigned_node, in find_cpu_id_range() argument
167 for (cpu = 0; cpu < nthreads; cpu++) in find_cpu_id_range()
196 cpumask_shift_left(*cpu_mask, *cpu_mask, nthreads); in find_cpu_id_range()
216 int len, nthreads, node, cpu, assigned_node; in pseries_add_processor() local
225 nthreads = len / sizeof(u32); in pseries_add_processor()
243 rc = find_cpu_id_range(nthreads, node, &cpu_mask); in pseries_add_processor()
249 rc = find_cpu_id_range(nthreads, NUMA_NO_NODE, &cpu_mask); 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()
[all …]
/linux/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.c225 int nthreads) in evsel__tool_pmu_prepare_open() argument
231 nthreads, in evsel__tool_pmu_prepare_open()
246 int pid = -1, idx = 0, thread = 0, nthreads, err = 0, old_errno; in evsel__tool_pmu_open() local
261 nthreads = perf_thread_map__nr(threads); in evsel__tool_pmu_open()
263 for (thread = 0; thread < nthreads; thread++) { in evsel__tool_pmu_open()
320 thread = nthreads; in evsel__tool_pmu_open()
H A Dstat.c157 int nthreads = perf_thread_map__nr(evsel->core.threads); in evsel__alloc_prev_raw_counts() local
160 counts = perf_counts__new(cpu_map_nr, nthreads); in evsel__alloc_prev_raw_counts()
249 int idx, nthreads = perf_thread_map__nr(evsel->core.threads); in evsel__copy_prev_raw_counts() local
251 for (int thread = 0; thread < nthreads; thread++) { in evsel__copy_prev_raw_counts()
464 int nthreads = perf_thread_map__nr(counter->core.threads); in process_counter_maps() local
468 for (thread = 0; thread < nthreads; thread++) { in process_counter_maps()
/linux/tools/testing/selftests/ublk/
H A Dtest_stress_03.sh46 ublk_io_and_remove 8G -t null -q 4 --auto_zc --nthreads 8 --per_io_tasks &
47 ublk_io_and_remove 256M -t loop -q 4 --auto_zc --nthreads 8 --per_io_tasks "${UBLK_BACKFILES[0]}" &
48 …ublk_io_and_remove 256M -t stripe -q 4 --auto_zc --nthreads 8 --per_io_tasks "${UBLK_BACKFILES[1]}…
49 ublk_io_and_remove 8G -t null -q 4 -z --auto_zc --auto_zc_fallback --nthreads 8 --per_io_tasks &
H A Dtest_stress_04.sh45 ublk_io_and_kill_daemon 8G -t null -q 4 --auto_zc --nthreads 8 --per_io_tasks &
46 ublk_io_and_kill_daemon 256M -t loop -q 4 --auto_zc --nthreads 8 --per_io_tasks "${UBLK_BACKFILES[0]}" &
47 ublk_io_and_kill_daemon 256M -t stripe -q 4 --auto_zc --nthreads 8 --per_io_tasks "${UBLK_BACKFILES[1]}" "${UBLK_BACKFILES[2]}" &
48 ublk_io_and_kill_daemon 8G -t null -q 4 -z --auto_zc --auto_zc_fallback --nthreads 8 --per_io_tasks &
H A Dtest_stress_05.sh77 ublk_io_and_remove 8G -t null -q 4 --nthreads 8 --per_io_tasks -r 1 -i "$reissue" &
78 ublk_io_and_remove 256M -t loop -q 4 --nthreads 8 --per_io_tasks -r 1 -i "$reissue" "${UBLK_BACKFILES[0]}" &
79 ublk_io_and_remove 8G -t null -q 4 --nthreads 8 --per_io_tasks -r 1 -i "$reissue" &
H A Dkublk.c506 unsigned max_nr_ios_per_thread = nr_ios / dev->nthreads; in ublk_thread_init()
507 max_nr_ios_per_thread += !!(nr_ios % dev->nthreads); in ublk_thread_init()
727 for (i = t->idx; i < nr_ios; i += t->dev->nthreads) { in ublksrv_handle_tgt_cqe()
993 tinfo = calloc(sizeof(struct ublk_thread_info), dev->nthreads); in ublk_start_daemon()
1023 for (i = 0; i < dev->nthreads; i++) { in ublk_start_daemon()
1037 if (dev->nthreads == dinfo->nr_hw_queues) in wait_ublk_dev()
1044 for (i = 0; i < dev->nthreads; i++) in wait_ublk_dev()
1067 for (i = 0; i < dev->nthreads; i++) in wait_ublk_dev()
1178 unsigned nthreads = ctx->nthreads; in __cmd_dev_add()
1125 unsigned nthreads = ctx->nthreads; __cmd_dev_add() local
[all...]
/linux/arch/powerpc/kernel/
H A Dsetup-common.c417 static int assign_threads(unsigned int cpu, unsigned int nthreads, bool present, in assign_threads() argument
420 for (int i = 0; i < nthreads && cpu < nr_cpu_ids; i++) { in assign_threads()
458 int nthreads = 1; in smp_setup_cpu_maps() local
488 nthreads = len / sizeof(int); in smp_setup_cpu_maps()
498 cpu = nthreads; in smp_setup_cpu_maps()
504 assign_threads(0, nthreads, avail, intserv); in smp_setup_cpu_maps()
514 cpu = assign_threads(cpu, nthreads, avail, intserv); in smp_setup_cpu_maps()
520 nthreads = 1; in smp_setup_cpu_maps()
545 maxcpus *= nthreads; in smp_setup_cpu_maps()
573 cpu_init_thread_core_maps(nthreads); in smp_setup_cpu_maps()
/linux/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/tools/lib/perf/
H A Devsel.c65 int perf_evsel__alloc_fd(struct perf_evsel *evsel, int ncpus, int nthreads) in perf_evsel__alloc_fd() argument
67 evsel->fd = xyarray__new(ncpus, nthreads, sizeof(int)); in perf_evsel__alloc_fd()
73 for (thread = 0; thread < nthreads; thread++) { in perf_evsel__alloc_fd()
85 static int perf_evsel__alloc_mmap(struct perf_evsel *evsel, int ncpus, int nthreads) in perf_evsel__alloc_mmap() argument
87 evsel->mmap = xyarray__new(ncpus, nthreads, sizeof(struct perf_mmap)); in perf_evsel__alloc_mmap()
526 int perf_evsel__alloc_id(struct perf_evsel *evsel, int ncpus, int nthreads) in perf_evsel__alloc_id() argument
528 if (ncpus == 0 || nthreads == 0) in perf_evsel__alloc_id()
531 evsel->sample_id = xyarray__new(ncpus, nthreads, sizeof(struct perf_sample_id)); in perf_evsel__alloc_id()
535 evsel->id = zalloc(ncpus * nthreads * sizeof(u64)); in perf_evsel__alloc_id()
/linux/arch/x86/kernel/cpu/
H A Dtopology_amd.c98 unsigned int nthreads = leaf.core_nthreads + 1; in parse_8000_001e() local
101 get_count_order(nthreads), nthreads); in parse_8000_001e()
/linux/fs/nfsd/
H A Dnfsctl.c463 int *nthreads; in write_pool_threads()
479 nthreads = kcalloc(npools, sizeof(int), GFP_KERNEL); in write_pool_threads()
481 if (nthreads == NULL) in write_pool_threads()
486 rv = get_int(&mesg, &nthreads[i]); in write_pool_threads()
492 if (nthreads[i] < 0) in write_pool_threads()
494 trace_nfsd_ctl_pool_threads(net, i, nthreads[i]); in write_pool_threads()
501 if (nthreads[0] == 0) in write_pool_threads()
502 nthreads[0] = 1; in write_pool_threads()
504 rv = nfsd_set_nrthreads(i, nthreads, net); in write_pool_threads()
509 rv = nfsd_get_nrthreads(npools, nthreads, ne in write_pool_threads()
456 int *nthreads; write_pool_threads() local
1576 int *nthreads, nrpools = 0, i, ret = -EOPNOTSUPP, rem; nfsd_nl_threads_set_doit() local
[all...]
/linux/tools/lib/perf/include/internal/
H A Devsel.h137 int perf_evsel__alloc_fd(struct perf_evsel *evsel, int ncpus, int nthreads);
143 int perf_evsel__alloc_id(struct perf_evsel *evsel, int ncpus, int nthreads);
/linux/tools/testing/selftests/filesystems/binderfs/
H A Dbinderfs_test.c404 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()

12