Home
last modified time | relevance | path

Searched refs:ncpus (Results 1 – 25 of 96) sorted by relevance

1234

/titanic_41/usr/src/lib/libmtmalloc/tests/
H A Dexhaust.c49 int ncpus; in main() local
55 ncpus = sysconf(_SC_NPROCESSORS_CONF); in main()
64 while (ncpus--) in main()
65 stacks[ncpus] = mmap(0, 1<<23, PROT_READ|PROT_WRITE, in main()
72 ncpus = sysconf(_SC_NPROCESSORS_CONF); in main()
73 while (ncpus--) in main()
74 thr_create(stacks[ncpus], 1<<23, be_thread, NULL, THR_BOUND, in main()
75 &tid[ncpus]); in main()
H A Ddirtymem.c51 int ncpus = sysconf(_SC_NPROCESSORS_CONF); in main() local
64 while (ncpus-- > 1) in main()
/titanic_41/usr/src/lib/liblgrp/common/
H A Dlgrp.c244 int ncpus) in prune_cpus() argument
262 if (ncpus == 0 || lgrp_info->info_ncpus == 0) in prune_cpus()
268 if (cpus == NULL && ncpus == -1) { in prune_cpus()
283 for (j = 0; j < ncpus; j++) in prune_cpus()
290 if (j < ncpus) { in prune_cpus()
317 uint_t ncpus; in prune_tree() local
326 if (pset_info(PS_MYID, NULL, &ncpus, NULL) == -1) in prune_tree()
330 if (ncpus > 0) { in prune_tree()
331 cpus = malloc(ncpus * sizeof (processorid_t)); in prune_tree()
332 if (pset_info(PS_MYID, NULL, &ncpus, cpus) == -1) { in prune_tree()
[all …]
/titanic_41/usr/src/test/zfs-tests/tests/functional/threadsappend/
H A Dthreadsappend.c88 long ncpus = 0; in main() local
95 ncpus = sysconf(_SC_NPROCESSORS_ONLN); in main()
96 if (ncpus < 0) { in main()
102 if (ncpus < 2) { in main()
/titanic_41/usr/src/uts/common/sys/
H A Dmac_flow.h239 int ncpus; \
248 for (ncpus = 0; ncpus < (fmrp)->mrp_ncpus; ncpus++) \
249 (fmrp)->mrp_cpu[ncpus] = (mrp)->mrp_cpu[ncpus];\
H A Dtaskq_impl.h160 #define TASKQ_THREADS_PCT(ncpus, pct) MAX(((ncpus) * (pct)) / 100, 1) argument
/titanic_41/usr/src/cmd/powertop/common/
H A Dutil.c89 uint_t ncpus = 0; in pt_enumerate_cpus() local
104 g_cpu_table[ncpus] = cpuid; in pt_enumerate_cpus()
105 ncpus++; in pt_enumerate_cpus()
108 return (ncpus); in pt_enumerate_cpus()
/titanic_41/usr/src/lib/cfgadm_plugins/sbd/common/
H A Dap_rcm.c63 int ncpus; /* # of CPUs in cpuids list */ member
441 rcm->ncpus = ncpu; in ap_rcm_init()
886 int ncpus; in ap_rcm_request_cap() local
898 ncpus = npages = 0; in ap_rcm_request_cap()
920 rcm->cpuids[ncpus++] = capinfo[i].type.cpuid[j]; in ap_rcm_request_cap()
926 if (ncpus && ((*rv = ap_rcm_cap_cpu(a, rcm, hd, flags, rinfo, in ap_rcm_request_cap()
927 CMD_RCM_CAP_DEL, ncpus)) != RCM_SUCCESS)) { in ap_rcm_request_cap()
943 int ncpus; in ap_rcm_add_cap() local
960 ncpus = npages = 0; in ap_rcm_add_cap()
1004 rcm->cpuids[ncpus++] = in ap_rcm_add_cap()
[all …]
/titanic_41/usr/src/cmd/sa/
H A Dsadc.c69 static int ncpus; variable
368 ncpus = ncaches = 0; in all_stat_init()
371 ncpus++; in all_stat_init()
376 safe_zalloc((void **)&cpu_stat_list, ncpus * sizeof (kstat_t *), 1); in all_stat_init()
379 ncpus = ncaches = 0; in all_stat_init()
383 cpu_stat_list[ncpus++] = ksp; in all_stat_init()
389 if (ncpus == 0) in all_stat_init()
444 for (i = 0; i < ncpus; i++) { in all_stat_load()
509 d.csi.cpu[i] = (cpu_tick[i] + cpu_stat_adj[i]) / ncpus; in all_stat_load()
757 int max_cpus = MAX(ncpus, oncpus); in compute_cpu_stat_adj()
[all …]
/titanic_41/usr/src/cmd/perl/contrib/Sun/Solaris/Lgrp/
H A DLgrp.xs370 int ncpus;
374 if ((ncpus = lgrp_cpus(cookie, lgrp, NULL, 0, content)) < 0)
378 XSRETURN_IV(ncpus);
380 if (ncpus > 0) {
381 if (New(0, cpus, ncpus, processorid_t) == NULL) {
385 ncpus = lgrp_cpus(cookie, lgrp, cpus, ncpus, content);
386 PUSHARRAY(cpus, ncpus);
/titanic_41/usr/src/cmd/pools/poold/libjlgrp/
H A Djlgrp.c194 jsize ncpus0, ncpus; in Java_com_sun_solaris_service_locality_LocalityGroup_jl_1cpus() local
219 ncpus = (jsize)lgrp_cpus((lgrp_cookie_t)cookie, (lgrp_id_t)id, in Java_com_sun_solaris_service_locality_LocalityGroup_jl_1cpus()
221 if (ncpus != ncpus0) { in Java_com_sun_solaris_service_locality_LocalityGroup_jl_1cpus()
226 if ((java_cpus = calloc(ncpus, sizeof (jint))) == NULL) { in Java_com_sun_solaris_service_locality_LocalityGroup_jl_1cpus()
233 for (i = 0; i < ncpus; i++) in Java_com_sun_solaris_service_locality_LocalityGroup_jl_1cpus()
235 (*env)->SetIntArrayRegion(env, cpus, 0, ncpus, java_cpus); in Java_com_sun_solaris_service_locality_LocalityGroup_jl_1cpus()
/titanic_41/usr/src/lib/fm/topo/modules/sun4v/platform-cpu/
H A Dcpu_mdesc.c66 for (i = 0, mcmp = chip->cpus; i < chip->ncpus; i++, mcmp++) { in cpu_find_cpumap()
96 chip->ncpus = md_scan_dag(mdp, in cpu_n1_mdesc_init()
101 topo_mod_dprintf(mod, "Found %d cpus\n", chip->ncpus); in cpu_n1_mdesc_init()
103 chip->cpus = topo_mod_zalloc(mod, chip->ncpus * sizeof (md_cpumap_t)); in cpu_n1_mdesc_init()
104 chip->nprocs = chip->ncpus; in cpu_n1_mdesc_init()
107 for (idx = 0, mcmp = chip->cpus; idx < chip->ncpus; idx++, mcmp++) { in cpu_n1_mdesc_init()
210 chip->ncpus = ncpu; in cpu_n2_mdesc_init()
335 topo_mod_free(mod, list2p, sizeof (mde_cookie_t) * 2*chip->ncpus); in cpu_n2_mdesc_init()
406 chip->ncpus * sizeof (md_cpumap_t)); in cpu_mdesc_fini()
/titanic_41/usr/src/lib/libumem/common/
H A Dumem_fork.c43 int ncpus = cp->cache_cpu_mask + 1; in umem_lockup_cache() local
45 for (idx = 0; idx < ncpus; idx++) in umem_lockup_cache()
56 int ncpus = cp->cache_cpu_mask + 1; in umem_release_cache() local
61 for (idx = 0; idx < ncpus; idx++) in umem_release_cache()
/titanic_41/usr/src/cmd/cpc/common/
H A Dcpustat.c89 static int ncpus; variable
377 for (i = 0; i < ncpus; i++) { in print_sample()
386 print_total(int ncpus, cpc_buf_t *buf, int nreq, const char *setname) in print_total() argument
392 ncpus, "total"); in print_total()
619 ncpus = (int)sysconf(_SC_NPROCESSORS_CONF); in cpustat()
620 if ((gstate = calloc(ncpus, sizeof (*gstate))) == NULL) { in cpustat()
655 for (c = 0, i = 0; i < ncpus; c++) { in cpustat()
695 for (i = 0; i < ncpus; i++) { in cpustat()
719 for (i = 0; i < ncpus; i++) { in cpustat()
741 for (i = 0; i < ncpus; i++) in cpustat()
[all …]
/titanic_41/usr/src/uts/i86xpv/os/
H A Dxen_machdep.c388 for (i = 1; i < ncpus; i++) { in suspend_cpus()
403 for (i = 1; i < ncpus; i++) { in resume_cpus()
482 if (ncpus > 1) in xen_suspend_domain()
509 for (i = 1; i < ncpus; i++) { in xen_suspend_domain()
579 if (ncpus > 1) in xen_suspend_domain()
662 for (i = 0; i < ncpus; i++) { in xen_debug_handler()
1185 xen_get_mc_physcpuinfo(xen_mc_logical_cpu_t *log_cpus, uint_t *ncpus) in xen_get_mc_physcpuinfo() argument
1190 cpi->ncpus = *ncpus; in xen_get_mc_physcpuinfo()
1197 *ncpus = cpi->ncpus; in xen_get_mc_physcpuinfo()
/titanic_41/usr/src/cmd/power/
H A Dsysstat.c50 static int ncpus; variable
302 ncpus = 0; in cpu_stats_init()
306 ncpus++; in cpu_stats_init()
309 safe_zalloc((void **)&cpu_stats_list, ncpus * sizeof (*cpu_stats_list), in cpu_stats_init()
312 ncpus = 0; in cpu_stats_init()
317 cpu_stats_list[ncpus++] = ksp; in cpu_stats_init()
320 if (ncpus == 0) in cpu_stats_init()
336 for (i = 0; i < ncpus; i++) { in cpu_stats_load()
/titanic_41/usr/src/uts/sun4/os/
H A Dmp_states.c90 if (ncpus == 1) in idle_other_cpus()
140 if (ncpus == 1) in resume_other_cpus()
200 if (ncpus > 1) in stop_other_cpus()
/titanic_41/usr/src/cmd/trapstat/sun4/
H A Dtrapstat.c480 uint_t ncpus = g_max_cpus; in check_pset() local
486 if (pset_info(g_pset, NULL, &ncpus, g_pset_cpus) == -1) { in check_pset()
493 if (ncpus == 0) in check_pset()
496 if (ncpus == g_pset_ncpus) { in check_pset()
517 g_pset_ncpus = ncpus; in check_pset()
689 int i, cpu, ncpus = 0; in print_tlbpgsz() local
727 ncpus++; in print_tlbpgsz()
733 print_sum(sum, ncpus); in print_tlbpgsz()
806 int i, cpu, ncpus = 0; in print_tlb() local
840 ncpus++; in print_tlb()
[all …]
/titanic_41/usr/src/lib/libmtmalloc/common/
H A Dmtmalloc.c189 static int ncpus = 0; variable
804 if ((ncpus = 2 * sysconf(_SC_NPROCESSORS_CONF)) <= 0) in setup_caches()
805 ncpus = 4; /* decent default value */ in setup_caches()
808 while (ncpus & (ncpus - 1)) in setup_caches()
809 ncpus++; in setup_caches()
811 new_cpu_mask = ncpus - 1; /* create the cpu mask */ in setup_caches()
840 cache_space_needed = ncpus * (sizeof (percpu_t) + CACHELIST_SIZE); in setup_caches()
860 list_addr = ((uintptr_t)new_cpu_list + (sizeof (percpu_t) * ncpus)); in setup_caches()
863 for (i = 0; i < ncpus; i++) { in setup_caches()
960 for (cpuptr = &cpu_list[0]; cpuptr < &cpu_list[ncpus]; cpuptr++) { in reinit_cpu_list()
[all …]
/titanic_41/usr/src/cmd/picl/plugins/sun4v/mdesc/
H A Dcpu_prop_update.c282 int ncpus, ncaches, ntlbs; in add_cpu_prop() local
322 ncpus = md_scan_dag(mdp, rootnode, md_find_name(mdp, "cpu"), in add_cpu_prop()
325 if (ncpus < 0) { in add_cpu_prop()
333 for (x = 0; x < ncpus; x++) { in add_cpu_prop()
/titanic_41/usr/src/cmd/intrstat/
H A Dintrstat.c309 uint_t ncpus = g_max_cpus; in check_pset() local
315 if (pset_info(g_pset, NULL, &ncpus, g_pset_cpus) == -1) { in check_pset()
322 if (ncpus == 0) in check_pset()
325 if (ncpus == g_pset_ncpus) { in check_pset()
346 g_pset_ncpus = ncpus; in check_pset()
/titanic_41/usr/src/cmd/rpcsvc/
H A Drstat_proc.c69 static int ncpus; variable
733 ncpus = 0; in system_stat_init()
737 ncpus++; in system_stat_init()
739 safe_zalloc((void **)&cpu_stats_list, ncpus * sizeof (*cpu_stats_list), in system_stat_init()
742 ncpus = 0; in system_stat_init()
747 kstat_copy(ksp, &cpu_stats_list[ncpus].sys, in system_stat_init()
751 kstat_copy(ksp, &cpu_stats_list[ncpus].vm, 1); in system_stat_init()
754 ncpus++; in system_stat_init()
757 if (ncpus == 0) in system_stat_init()
782 for (i = 0; i < ncpus; i++) { in system_stat_load()
/titanic_41/usr/src/cmd/perl/contrib/Sun/Solaris/Lgrp/t/
H A DLgrp_api.t181 my $ncpus = @rcpus;
182 ok($ncpus, 'there are CPUs in the system');
327 is($nc, $ncpus, 'Number of CPUs should match');
H A DLgrp.t187 my $ncpus = lgrp_cpus($c, $root, LGRP_CONTENT_HIERARCHY);
188 ok(scalar @cpus, $ncpus);
189 ok($ncpus);
/titanic_41/usr/src/uts/i86pc/io/apix/
H A Dapix_irm.c86 extern int ncpus;
146 if (apix_irminfo.apix_ncpus > ncpus) in apix_irm_init()
147 apix_irminfo.apix_ncpus = ncpus; in apix_irm_init()

1234