| /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/kernel/power/ |
| H A D | swap.c | 576 static struct crc_data *alloc_crc_data(int nr_threads) in alloc_crc_data() argument 584 crc->unc = kcalloc(nr_threads, sizeof(*crc->unc), GFP_KERNEL); in alloc_crc_data() 588 crc->unc_len = kzalloc_objs(*crc->unc_len, nr_threads); in alloc_crc_data() 703 unsigned int thr, run_threads, nr_threads; in save_compressed_image() local 716 nr_threads = num_online_cpus() - 1; in save_compressed_image() 717 nr_threads = clamp_val(nr_threads, 1, hibernate_compression_threads); in save_compressed_image() 726 data = vcalloc(nr_threads, sizeof(*data)); in save_compressed_image() 733 crc = alloc_crc_data(nr_threads); in save_compressed_image() 743 for (thr = 0; thr < nr_threads; thr++) { in save_compressed_image() 780 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 | 413 int nr_threads = perf_thread_map__nr(evlist->threads); in perf_evlist__alloc_pollfd() local 421 nfds += nr_cpus * nr_threads; in perf_evlist__alloc_pollfd() 637 int nr_threads = perf_thread_map__nr(evlist->threads); in mmap_per_thread() local 643 __func__, nr_cpus, nr_threads); in mmap_per_thread() 646 for (thread = 0; thread < nr_threads; thread++, idx++) { in mmap_per_thread() 679 int nr_threads = perf_thread_map__nr(evlist->threads); in mmap_per_cpu() local 684 pr_debug("%s: nr cpu values %d nr threads %d\n", __func__, nr_cpus, nr_threads); in mmap_per_cpu() 690 for (thread = 0; thread < nr_threads; thread++) { in mmap_per_cpu()
|
| /linux/tools/testing/selftests/cgroup/ |
| H A D | test_kmem.c | 103 int nr_threads = 2 * get_nprocs(); in alloc_kmem_smp() 108 tinfo = calloc(nr_threads, sizeof(pthread_t)); in alloc_kmem_smp() 112 for (i = 0; i < nr_threads; i++) { in alloc_kmem_smp() 120 for (i = 0; i < nr_threads; i++) { in alloc_kmem_smp() 248 int nr_threads = 1000; in spawn_1000_threads() 254 tinfo = calloc(nr_threads, sizeof(pthread_t)); in spawn_1000_threads() 258 for (i = 0; i < nr_threads; i++) { in spawn_1000_threads() 102 int nr_threads = 2 * get_nprocs(); alloc_kmem_smp() local 247 int nr_threads = 1000; spawn_1000_threads() local
|
| /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, 542 nr_threads = clamp(nr_threads, 1, (int) USHRT_MAX); in init_test_configuration() 545 tdriver = kvzalloc_objs(*tdriver, nr_threads); in init_test_configuration() 574 for (i = 0; i < nr_threads; i++) { in do_concurrent_test() 601 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() 2326 int t, tt, err, ret = 0, nr_threads = rec->nr_threads; in record__start_threads() local 2346 for (t = 1; t < nr_threads; t++) { in record__start_threads() 2392 for (t = 1; t < rec->nr_threads; t++) in record__stop_threads() 2395 for (t = 0; t < rec->nr_threads; t++) { in record__stop_threads() 2419 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;
|
| /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/drivers/dma/ |
| H A D | img-mdc-dma.c | 139 unsigned int nr_threads; member 921 mdma->nr_threads = in mdc_dma_probe() 1007 mdma->nr_channels, mdma->nr_threads); in mdc_dma_probe()
|
| /linux/arch/s390/appldata/ |
| H A D | appldata_base.c | 424 EXPORT_SYMBOL_GPL(nr_threads);
|
| /linux/kernel/ |
| H A D | fork.c | 141 int nr_threads; /* The idle threads do not count.. */ 143 static int max_threads; /* tunable limit on nr_threads */ 1705 sig->nr_threads = 1; in copy_signal() 2102 if (data_race(nr_threads >= max_threads)) in copy_process() 2445 current->signal->nr_threads++; in copy_process() 2454 nr_threads++; in copy_process() 140 int nr_threads; /* The idle threads do not count.. */ global() variable
|
| 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 | 2944 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 | 2167 static void evsel__remove_fd(struct evsel *pos, int nr_cpus, int nr_threads, int thread_idx) in evsel__remove_fd() argument 2170 for (int thread = thread_idx; thread < nr_threads - 1; thread++) in evsel__remove_fd() 2176 int nr_threads, int thread_idx) in update_fds() argument 2180 if (cpu_map_idx >= nr_cpus || thread_idx >= nr_threads) in update_fds() 2186 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()
|
| /linux/kernel/debug/kdb/ |
| H A D | kdb_main.c | 2374 val->procs = nr_threads-1; in kdb_sysinfo()
|