| /linux/tools/testing/radix-tree/ |
| H A D | regression1.c | 171 int nr_threads; in regression1_test() local 177 nr_threads = 2; in regression1_test() 178 pthread_barrier_init(&worker_barrier, NULL, nr_threads); in regression1_test() 180 threads = malloc(nr_threads * sizeof(*threads)); in regression1_test() 182 for (i = 0; i < nr_threads; i++) { in regression1_test() 190 for (i = 0; i < nr_threads; i++) { in regression1_test()
|
| /linux/fs/xfs/ |
| H A D | xfs_pwork.c | 66 unsigned int nr_threads = 0; in xfs_pwork_init() local 70 nr_threads = xfs_globals.pwork_threads; in xfs_pwork_init() 72 trace_xfs_pwork_init(mp, nr_threads, current->pid); in xfs_pwork_init() 75 WQ_UNBOUND | WQ_SYSFS | WQ_FREEZABLE, nr_threads, tag, in xfs_pwork_init()
|
| /linux/kernel/power/ |
| H A D | swap.c | 574 static struct crc_data *alloc_crc_data(int nr_threads) in alloc_crc_data() argument 582 crc->unc = kcalloc(nr_threads, sizeof(*crc->unc), GFP_KERNEL); in alloc_crc_data() 586 crc->unc_len = kcalloc(nr_threads, sizeof(*crc->unc_len), GFP_KERNEL); in alloc_crc_data() 701 unsigned int thr, run_threads, nr_threads; in save_compressed_image() local 714 nr_threads = num_online_cpus() - 1; in save_compressed_image() 715 nr_threads = clamp_val(nr_threads, 1, hibernate_compression_threads); in save_compressed_image() 724 data = vcalloc(nr_threads, sizeof(*data)); in save_compressed_image() 731 crc = alloc_crc_data(nr_threads); in save_compressed_image() 741 for (thr = 0; thr < nr_threads; thr++) { in save_compressed_image() 778 for (thr = 0; thr < nr_threads; thr++) { in save_compressed_image() [all …]
|
| /linux/tools/lib/perf/ |
| H A D | threadmap.c | 45 struct perf_thread_map *perf_thread_map__new_array(int nr_threads, pid_t *array) in perf_thread_map__new_array() argument 47 struct perf_thread_map *threads = thread_map__alloc(nr_threads); in perf_thread_map__new_array() 53 for (i = 0; i < nr_threads; i++) in perf_thread_map__new_array() 56 threads->nr = nr_threads; in perf_thread_map__new_array()
|
| H A D | evlist.c | 385 int nr_threads = perf_thread_map__nr(evlist->threads); in perf_evlist__alloc_pollfd() local 393 nfds += nr_cpus * nr_threads; in perf_evlist__alloc_pollfd() 609 int nr_threads = perf_thread_map__nr(evlist->threads); in mmap_per_thread() local 615 __func__, nr_cpus, nr_threads); in mmap_per_thread() 618 for (thread = 0; thread < nr_threads; thread++, idx++) { in mmap_per_thread() 651 int nr_threads = perf_thread_map__nr(evlist->threads); in mmap_per_cpu() local 656 pr_debug("%s: nr cpu values %d nr threads %d\n", __func__, nr_cpus, nr_threads); in mmap_per_cpu() 662 for (thread = 0; thread < nr_threads; thread++) { in mmap_per_cpu()
|
| /linux/tools/testing/selftests/cgroup/ |
| H A D | test_kmem.c | 102 int nr_threads = 2 * get_nprocs(); in alloc_kmem_smp() local 107 tinfo = calloc(nr_threads, sizeof(pthread_t)); in alloc_kmem_smp() 111 for (i = 0; i < nr_threads; i++) { in alloc_kmem_smp() 119 for (i = 0; i < nr_threads; i++) { in alloc_kmem_smp() 247 int nr_threads = 1000; in spawn_1000_threads() local 253 tinfo = calloc(nr_threads, sizeof(pthread_t)); in spawn_1000_threads() 257 for (i = 0; i < nr_threads; i++) { in spawn_1000_threads()
|
| /linux/tools/testing/selftests/bpf/prog_tests/ |
| H A D | uprobe_syscall.c | 727 int err, i, nr_threads; in test_uprobe_race() local 730 nr_threads = libbpf_num_possible_cpus(); in test_uprobe_race() 731 if (!ASSERT_GT(nr_threads, 0, "libbpf_num_possible_cpus")) in test_uprobe_race() 733 nr_threads = max(2, nr_threads); in test_uprobe_race() 735 threads = alloca(sizeof(*threads) * nr_threads); in test_uprobe_race() 739 for (i = 0; i < nr_threads; i++) { in test_uprobe_race() 750 for (nr_threads = i, i = 0; i < nr_threads; i++) in test_uprobe_race()
|
| H A D | task_local_storage.c | 176 const int nr_threads = 32; in test_nodeadlock() local 177 pthread_t tids[nr_threads]; in test_nodeadlock() 208 for (i = 0; i < nr_threads; i++) { in test_nodeadlock() 222 waitall(tids, nr_threads); in test_nodeadlock()
|
| /linux/tools/testing/selftests/bpf/benchs/ |
| H A D | run_bench_bpf_hashmap_full_update.sh | 8 nr_threads=`expr $(cat /proc/cpuinfo | grep "processor"| wc -l) - 1` 9 summary=$($RUN_BENCH -p $nr_threads bpf-hashmap-full-update)
|
| /linux/lib/ |
| H A D | test_vmalloc.c | 26 __param(int, nr_threads, 0, 539 nr_threads = clamp(nr_threads, 1, (int) USHRT_MAX); in init_test_configuration() 542 tdriver = kvcalloc(nr_threads, sizeof(*tdriver), GFP_KERNEL); in init_test_configuration() 571 for (i = 0; i < nr_threads; i++) { in do_concurrent_test() 598 for (i = 0; i < nr_threads; i++) { in do_concurrent_test()
|
| /linux/tools/testing/selftests/net/tcp_ao/lib/ |
| H A D | setup.c | 175 static unsigned int nr_threads = 1; variable 189 if (stage_threads[q] == nr_threads) { in synchronize_threads() 194 while (stage_threads[q] < nr_threads) in synchronize_threads() 269 nr_threads++; in __test_init()
|
| /linux/tools/testing/selftests/kvm/arm64/ |
| H A D | vgic_lpi_stress.c | 375 u32 nr_threads; in main() local 401 nr_threads = test_data.nr_cpus + test_data.nr_devices; in main() 402 if (nr_threads > get_nprocs()) in main() 404 nr_threads, get_nprocs()); in main()
|
| /linux/tools/perf/ |
| H A D | builtin-record.c | 184 int nr_threads; member 1144 for (t = 0; t < rec->nr_threads; t++) { in record__free_thread_data() 1223 rec->thread_data = zalloc(rec->nr_threads * sizeof(*(rec->thread_data))); in record__alloc_thread_data() 1230 for (t = 0; t < rec->nr_threads; t++) in record__alloc_thread_data() 1233 for (t = 0; t < rec->nr_threads; t++) { in record__alloc_thread_data() 2328 int t, tt, err, ret = 0, nr_threads = rec->nr_threads; in record__start_threads() local 2348 for (t = 1; t < nr_threads; t++) { in record__start_threads() 2394 for (t = 1; t < rec->nr_threads; t++) in record__stop_threads() 2397 for (t = 0; t < rec->nr_threads; t++) { in record__stop_threads() 2421 for (t = 0; t < rec->nr_threads; t++) in record__waking() [all …]
|
| /linux/include/linux/sched/ |
| H A D | stat.h | 17 extern int nr_threads;
|
| H A D | signal.h | 82 atomic_t nr_threads; member 97 int nr_threads; member 701 return task->signal->nr_threads; in get_nr_threads()
|
| /linux/fs/proc/ |
| H A D | loadavg.c | 24 nr_running(), nr_threads, in loadavg_proc_show()
|
| /linux/tools/lib/perf/include/perf/ |
| H A D | threadmap.h | 11 LIBPERF_API struct perf_thread_map *perf_thread_map__new_array(int nr_threads, pid_t *array);
|
| /linux/tools/tracing/latency/ |
| H A D | latency-collector.c | 77 static unsigned int nr_threads = DEFAULT_NR_PRINTER_THREADS; variable 1642 if (nr_threads > MAX_THREADS) { in start_printthread() 1645 nr_threads, MAX_THREADS); in start_printthread() 1646 nr_threads = MAX_THREADS; in start_printthread() 1648 for (i = 0; i < nr_threads; i++) { in start_printthread() 1931 nr_threads = value; in scan_arguments() 2040 policy_name(sched_policy), sched_pri, nr_threads); in show_params()
|
| /linux/kernel/ |
| H A D | fork.c | 140 int nr_threads; /* The idle threads do not count.. */ variable 1704 sig->nr_threads = 1; in copy_signal() 2104 if (data_race(nr_threads >= max_threads)) in copy_process() 2443 current->signal->nr_threads++; in copy_process() 2452 nr_threads++; in copy_process()
|
| H A D | exit.c | 139 nr_threads--; in __unhash_process() 211 sig->nr_threads--; in __exit_signal() 438 if (atomic_dec_and_test(&core_state->nr_threads)) in coredump_task_exit()
|
| H A D | sys.c | 2910 info->procs = nr_threads; in do_sysinfo()
|
| /linux/tools/lib/perf/Documentation/ |
| H A D | libperf.txt | 64 struct perf_thread_map *perf_thread_map__new_array(int nr_threads, pid_t *array);
|
| /linux/tools/perf/util/ |
| H A D | evsel.c | 2050 static void evsel__remove_fd(struct evsel *pos, int nr_cpus, int nr_threads, int thread_idx) in evsel__remove_fd() argument 2053 for (int thread = thread_idx; thread < nr_threads - 1; thread++) in evsel__remove_fd() 2059 int nr_threads, int thread_idx) in update_fds() argument 2063 if (cpu_map_idx >= nr_cpus || thread_idx >= nr_threads) in update_fds() 2069 evsel__remove_fd(pos, nr_cpus, nr_threads, thread_idx); in update_fds()
|
| /linux/fs/ |
| H A D | coredump.c | 515 atomic_set(&core_state->nr_threads, nr); in zap_threads()
|