/linux-master/arch/x86/kernel/cpu/ |
H A D | topology_amd.c | 94 unsigned int nthreads = leaf.core_nthreads + 1; local 96 topology_update_dom(tscan, TOPO_SMT_DOMAIN, get_count_order(nthreads), nthreads);
|
H A D | debugfs.c | 61 unsigned int dom, nthreads = 1; local 64 nthreads *= x86_topo_system.dom_size[dom]; 67 x86_topo_system.dom_size[dom], nthreads);
|
/linux-master/tools/testing/selftests/mm/ |
H A D | gup_test.c | 94 int filed, i, opt, nr_pages = 1, thp = -1, write = 1, nthreads = 1, ret; local 131 nthreads = atoi(optarg); 204 ksft_set_plan(nthreads); 257 tid = malloc(sizeof(pthread_t) * nthreads); 259 for (i = 0; i < nthreads; i++) { 263 for (i = 0; i < nthreads; i++) {
|
H A D | pagemap_ioctl.c | 1304 static const unsigned int nthreads = 6, pages_per_thread = 32, access_per_thread = 8; variable 1391 if (pthread_barrier_init(&start_barrier, NULL, nthreads + 1)) 1394 if (pthread_barrier_init(&end_barrier, NULL, nthreads + 1)) 1397 mem = mmap(NULL, 0x1000 * nthreads * pages_per_thread, PROT_READ | PROT_WRITE, 1402 wp_init(mem, 0x1000 * nthreads * pages_per_thread); 1403 wp_addr_range(mem, 0x1000 * nthreads * pages_per_thread); 1405 memset(mem, 0, 0x1000 * nthreads * pages_per_thread); 1407 count = get_dirty_pages_reset(mem, nthreads * pages_per_thread, 1, page_size); 1409 count = get_dirty_pages_reset(mem, nthreads * pages_per_thread, 1, page_size); 1413 for (i = 0; i < nthreads; [all...] |
/linux-master/arch/powerpc/kernel/ |
H A D | prom.c | 336 int i, nthreads; local 353 nthreads = len / sizeof(int); 359 for (i = 0; i < nthreads; i++) { 380 if (nr_cpu_ids % nthreads != 0) { 381 set_nr_cpu_ids(ALIGN(nr_cpu_ids, nthreads)); 437 if (nthreads == 1)
|
H A D | setup-common.c | 415 static int assign_threads(unsigned int cpu, unsigned int nthreads, bool present, argument 418 for (int i = 0; i < nthreads && cpu < nr_cpu_ids; i++) { 456 int nthreads = 1; local 489 nthreads = len / sizeof(int); 499 cpu = nthreads; 505 assign_threads(0, nthreads, avail, intserv); 515 cpu = assign_threads(cpu, nthreads, avail, intserv); 518 /* If no SMT supported, nthreads is forced to 1 */ 520 DBG(" SMT disabled ! nthreads forced to 1\n"); 521 nthreads [all...] |
/linux-master/arch/powerpc/kvm/ |
H A D | book3s_hv.c | 1501 int thr, cpu, pcpu, nthreads; local 1505 nthreads = vcpu->kvm->arch.emul_smt_mode; 1507 cpu = vcpu->vcpu_id & ~(nthreads - 1); 1508 for (thr = 0; thr < nthreads; ++thr, ++cpu) {
|
/linux-master/tools/perf/util/ |
H A D | evsel.c | 1796 int nthreads = perf_thread_map__nr(threads); local 1823 perf_evsel__alloc_fd(&evsel->core, perf_cpu_map__nr(cpus), nthreads) < 0) 2004 int idx, thread, nthreads; local 2018 nthreads = perf_thread_map__nr(threads); 2031 for (thread = 0; thread < nthreads; thread++) { 2034 if (thread >= nthreads) 2116 /* We just removed 1 thread, so lower the upper nthreads limit. */ 2117 nthreads--; 2146 thread = nthreads;
|
H A D | stat.c | 157 int nthreads = perf_thread_map__nr(evsel->core.threads); local 160 counts = perf_counts__new(cpu_map_nr, nthreads); 249 int idx, nthreads = perf_thread_map__nr(evsel->core.threads); local 251 for (int thread = 0; thread < nthreads; thread++) { 464 int nthreads = perf_thread_map__nr(counter->core.threads); local 468 for (thread = 0; thread < nthreads; thread++) {
|
/linux-master/tools/perf/ |
H A D | builtin-stat.c | 318 int nthreads = perf_thread_map__nr(evsel_list->core.threads); local 324 for (thread = 0; thread < nthreads; thread++) {
|
H A D | builtin-script.c | 2294 int nthreads = perf_thread_map__nr(counter->core.threads); local 2305 for (thread = 0; thread < nthreads; thread++) {
|
/linux-master/fs/nfsd/ |
H A D | nfssvc.c | 702 int nfsd_get_nrthreads(int n, int *nthreads, struct net *net) argument 710 nthreads[i] = atomic_read(&serv->sv_pools[i].sp_nrthreads); 714 int nfsd_set_nrthreads(int n, int *nthreads, struct net *net) argument 732 nthreads[i] = min(nthreads[i], NFSD_MAXSERVS); 733 tot += nthreads[i]; 738 int new = nthreads[i] * NFSD_MAXSERVS / tot; 739 tot -= (nthreads[i] - new); 740 nthreads[i] = new; 743 nthreads[ [all...] |
H A D | nfsctl.c | 450 int *nthreads; local 466 nthreads = kcalloc(npools, sizeof(int), GFP_KERNEL); 468 if (nthreads == NULL) 473 rv = get_int(&mesg, &nthreads[i]); 479 if (nthreads[i] < 0) 481 trace_nfsd_ctl_pool_threads(net, i, nthreads[i]); 483 rv = nfsd_set_nrthreads(i, nthreads, net); 488 rv = nfsd_get_nrthreads(npools, nthreads, net); 495 snprintf(mesg, size, "%d%c", nthreads[i], (i == npools-1 ? '\n' : ' ')); 502 kfree(nthreads); [all...] |
/linux-master/drivers/net/ethernet/marvell/mvpp2/ |
H A D | mvpp2_main.c | 91 return cpu % priv->nthreads; 1434 if (cpu > port->priv->nthreads) 1456 if (cpu >= port->priv->nthreads) 2560 for (thread = 0; thread < port->priv->nthreads; thread++) { 2658 if (smp_processor_id() >= port->priv->nthreads) 3164 for (thread = 0; thread < port->priv->nthreads; thread++) { 3201 for (thread = 0; thread < port->priv->nthreads; thread++) { 3271 for (thread = 0; thread < port->priv->nthreads; thread++) { 4908 for (thread = 0; thread < port->priv->nthreads; thread++) { 5806 port->nqvecs = priv->nthreads [all...] |
/linux-master/tools/perf/bench/ |
H A D | futex-wake-parallel.c | 63 OPT_UINTEGER('t', "threads", ¶ms.nthreads, "Specify amount of threads"), 155 threads_starting = params.nthreads; 162 for (i = 0; i < params.nthreads; i++) { 203 params.nthreads, waketime_avg / USEC_PER_MSEC, 218 params.nthreads, 271 if (!params.nthreads) 272 params.nthreads = perf_cpu_map__nr(cpu); 275 if (params.nwakes > params.nthreads || 277 params.nwakes = params.nthreads; 279 if (params.nthreads [all...] |
H A D | futex-wake.c | 53 OPT_UINTEGER('t', "threads", ¶ms.nthreads, "Specify amount of threads"), 93 params.nthreads, 104 threads_starting = params.nthreads; 111 for (i = 0; i < params.nthreads; i++) { 166 if (!params.nthreads) 167 params.nthreads = perf_cpu_map__nr(cpu); 169 worker = calloc(params.nthreads, sizeof(*worker)); 178 getpid(), params.nthreads, params.fshared ? "shared":"private", 205 while (nwoken != params.nthreads) 216 j + 1, nwoken, params.nthreads, [all...] |
H A D | futex-requeue.c | 53 OPT_UINTEGER('t', "threads", ¶ms.nthreads, "Specify amount of threads"), 77 params.nthreads, 131 threads_starting = params.nthreads; 138 for (i = 0; i < params.nthreads; i++) { 191 if (!params.nthreads) 192 params.nthreads = perf_cpu_map__nr(cpu); 194 worker = calloc(params.nthreads, sizeof(*worker)); 201 if (params.nrequeue > params.nthreads) 202 params.nrequeue = params.nthreads; 205 params.nrequeue = params.nthreads; [all...] |
H A D | futex-lock-pi.c | 48 OPT_UINTEGER('t', "threads", ¶ms.nthreads, "Specify amount of threads"), 128 threads_starting = params.nthreads; 134 for (i = 0; i < params.nthreads; i++) { 189 if (!params.nthreads) 190 params.nthreads = perf_cpu_map__nr(cpu); 192 worker = calloc(params.nthreads, sizeof(*worker)); 200 getpid(), params.nthreads, params.runtime); 207 threads_starting = params.nthreads; 221 for (i = 0; i < params.nthreads; i++) { 232 for (i = 0; i < params.nthreads; [all...] |
H A D | futex-hash.c | 56 OPT_UINTEGER('t', "threads", ¶ms.nthreads, "Specify amount of threads"), 155 if (!params.nthreads) /* default to the number of CPUs */ 156 params.nthreads = perf_cpu_map__nr(cpu); 158 worker = calloc(params.nthreads, sizeof(*worker)); 166 getpid(), params.nthreads, params.nfutexes, params.fshared ? "shared":"private", params.runtime); 173 threads_starting = params.nthreads; 182 for (i = 0; i < params.nthreads; i++) { 216 for (i = 0; i < params.nthreads; i++) { 227 for (i = 0; i < params.nthreads; i++) {
|
H A D | epoll-wait.c | 91 static unsigned int nthreads = 0; variable 128 OPT_UINTEGER('t', "threads", &nthreads, "Specify amount of threads"), 317 for (i = 0; i < nthreads; i++) { 394 shuffle((void *)worker, nthreads, sizeof(*worker)); 397 for (i = 0; i < nthreads; i++) { 468 if (!nthreads) 469 nthreads = perf_cpu_map__nr(cpu) - 1; 471 worker = calloc(nthreads, sizeof(*worker)); 478 rl.rlim_cur = rl.rlim_max = nfds * nthreads * 2 + 50; 486 getpid(), nthreads, onesho [all...] |
H A D | epoll-ctl.c | 36 static unsigned int nthreads = 0; variable 75 OPT_UINTEGER('t', "threads", &nthreads, "Specify amount of threads"), 240 for (i = 0; i < nthreads; i++) { 349 if (!nthreads) 350 nthreads = perf_cpu_map__nr(cpu); 352 worker = calloc(nthreads, sizeof(*worker)); 358 rl.rlim_cur = rl.rlim_max = nfds * nthreads * 2 + 50; 366 getpid(), nthreads, nfds, nsecs); 375 threads_starting = nthreads; 391 for (i = 0; i < nthreads; [all...] |
/linux-master/tools/lib/perf/ |
H A D | evsel.c | 52 int perf_evsel__alloc_fd(struct perf_evsel *evsel, int ncpus, int nthreads) argument 54 evsel->fd = xyarray__new(ncpus, nthreads, sizeof(int)); 60 for (thread = 0; thread < nthreads; thread++) { 72 static int perf_evsel__alloc_mmap(struct perf_evsel *evsel, int ncpus, int nthreads) argument 74 evsel->mmap = xyarray__new(ncpus, nthreads, sizeof(struct perf_mmap)); 513 int perf_evsel__alloc_id(struct perf_evsel *evsel, int ncpus, int nthreads) argument 515 if (ncpus == 0 || nthreads == 0) 518 evsel->sample_id = xyarray__new(ncpus, nthreads, sizeof(struct perf_sample_id)); 522 evsel->id = zalloc(ncpus * nthreads * sizeof(u64));
|
/linux-master/lib/ |
H A D | test_objpool.c | 39 atomic_t nthreads ____cacheline_aligned_in_smp; 142 atomic_set(&data->nthreads, 1); 223 atomic_inc(&test->data.nthreads); 236 if (atomic_dec_and_test(&test->data.nthreads)) 245 int cpu, nthreads = 0; local 266 nthreads++; 272 pr_info("ALL: \tnthreads: %d duration: %lluus\n", nthreads, duration); 388 if (atomic_dec_and_test(&test->data.nthreads)) 579 if (atomic_dec_and_test(&test->data.nthreads))
|
/linux-master/kernel/kcsan/ |
H A D | kcsan_test.c | 1372 long nthreads = (long)prev; local 1374 if (nthreads < 0 || nthreads >= 32) 1375 nthreads = 0; /* stop */ 1376 else if (!nthreads) 1377 nthreads = 2; /* initial value */ 1378 else if (nthreads < 5) 1379 nthreads++; 1380 else if (nthreads == 5) 1381 nthreads 1497 int nthreads; local [all...] |
/linux-master/kernel/locking/ |
H A D | test-ww_mutex.c | 315 static int __test_cycle(unsigned int nthreads) argument 318 unsigned int n, last = nthreads - 1; 321 cycles = kmalloc_array(nthreads, sizeof(*cycles), GFP_KERNEL); 325 for (n = 0; n < nthreads; n++) { 344 for (n = 0; n < nthreads; n++) 350 for (n = 0; n < nthreads; n++) { 357 n, nthreads, cycle->result); 362 for (n = 0; n < nthreads; n++) 574 static int stress(int nlocks, int nthreads, unsigned int flags) argument 584 stress_array = kmalloc_array(nthreads, sizeo [all...] |