/freebsd/contrib/jemalloc/include/jemalloc/internal/ |
H A D | jemalloc_internal_inlines_a.h | 32 if ((opt_percpu_arena == percpu_arena) || ((unsigned)cpuid < ncpus / in percpu_arena_choose() 38 arena_ind = cpuid - ncpus / 2; in percpu_arena_choose() 48 if (mode == per_phycpu_arena && ncpus > 1) { in percpu_arena_ind_limit() 49 if (ncpus % 2) { in percpu_arena_ind_limit() 51 return ncpus / 2 + 1; in percpu_arena_ind_limit() 53 return ncpus / 2; in percpu_arena_ind_limit() 55 return ncpus; in percpu_arena_ind_limit()
|
H A D | jemalloc_internal_externs.h | 23 extern unsigned ncpus;
|
/freebsd/tools/test/stress2/misc/ |
H A D | pthread8.sh | 96 u_int i, ncpus; 100 ncpus_len = sizeof(ncpus); 101 error = sysctlbyname("hw.ncpu", &ncpus, &ncpus_len, NULL, 0); 104 threads = calloc(ncpus, sizeof(pthread_t)); 124 for (i = 0; i < ncpus; i++) { 133 for (i = 0; i < ncpus; i++)
|
/freebsd/tools/regression/sockets/unix_close_race/ |
H A D | unix_close_race.c | 65 u_int counter, ncpus; in main() local 68 len = sizeof(ncpus); in main() 69 if (sysctlbyname("kern.smp.cpus", &ncpus, &len, NULL, 0) < 0) in main() 71 if (len != sizeof(ncpus)) in main() 73 if (ncpus < 2) in main()
|
/freebsd/sys/contrib/openzfs/tests/zfs-tests/cmd/ |
H A D | threadsappend.c | 91 long ncpus = 0; in main() local 98 ncpus = sysconf(_SC_NPROCESSORS_ONLN); in main() 99 if (ncpus < 0) { in main() 105 if (ncpus < 2) { in main()
|
/freebsd/tests/sys/cddl/zfs/tests/threadsappend/ |
H A D | threadsappend.c | 87 long ncpus = 0; in main() local 94 ncpus = sysconf(_SC_NPROCESSORS_ONLN); in main() 95 if (ncpus < 0) { in main() 101 if (ncpus < 2) { in main()
|
/freebsd/sys/dev/hwpmc/ |
H A D | hwpmc_intel.c | 80 int error, family, model, nclasses, ncpus, stepping, verov; in pmc_intel_initialize() local 264 ncpus = pmc_cpu_max(); in pmc_intel_initialize() 265 error = pmc_tsc_initialize(pmc_mdep, ncpus); in pmc_intel_initialize() 270 error = pmc_core_initialize(pmc_mdep, ncpus, verov); in pmc_intel_initialize() 306 error = pmc_uncore_initialize(pmc_mdep, ncpus); in pmc_intel_initialize()
|
H A D | hwpmc_amd.c | 794 int error, i, ncpus; in pmc_amd_initialize() local 839 ncpus = pmc_cpu_max(); in pmc_amd_initialize() 842 error = pmc_tsc_initialize(pmc_mdep, ncpus); in pmc_amd_initialize()
|
/freebsd/sys/arm/arm/ |
H A D | pmu_fdt.c | 120 int rid, err, ncpus, i; in pmu_parse_intr() local 131 ncpus = OF_getencprop_alloc_multi(node, "interrupt-affinity", in pmu_parse_intr() 133 if (ncpus < 0) { in pmu_parse_intr() 187 if (has_affinity && i >= ncpus) { in pmu_parse_intr()
|
/freebsd/usr.bin/top/ |
H A D | machine.c | 205 static int ncpus; variable 243 if (ncpus == 1) in toggle_pcpustats() 264 y_mem += ncpus - 1; in update_layout() 265 y_arc += ncpus - 1; in update_layout() 266 y_carc += ncpus - 1; in update_layout() 267 y_swap += ncpus - 1; in update_layout() 268 y_idlecursor += ncpus - 1; in update_layout() 269 y_message += ncpus - 1; in update_layout() 270 y_header += ncpus - 1; in update_layout() 271 y_procs += ncpus - 1; in update_layout() [all …]
|
H A D | machine.h | 33 int ncpus; member 54 int ncpus; member
|
/freebsd/lib/libc/gen/ |
H A D | cpuset_alloc.c | 30 __cpuset_alloc(size_t ncpus) in __cpuset_alloc() argument 32 return (malloc(CPU_ALLOC_SIZE(ncpus))); in __cpuset_alloc()
|
/freebsd/tools/tools/netrate/tcpp/ |
H A D | tcpp_server.c | 199 int ncpus; in tcpp_server_worker() local 203 len = sizeof(ncpus); in tcpp_server_worker() 204 if (sysctlbyname(SYSCTLNAME_CPUS, &ncpus, &len, NULL, 0) < 0) in tcpp_server_worker() 206 if (len != sizeof(ncpus)) in tcpp_server_worker() 211 CPU_SET(workernum % ncpus, &mask); in tcpp_server_worker()
|
H A D | tcpp_client.c | 216 int ncpus; in tcpp_client_worker() local 220 len = sizeof(ncpus); in tcpp_client_worker() 221 if (sysctlbyname(SYSCTLNAME_CPUS, &ncpus, &len, NULL, 0) < 0) in tcpp_client_worker() 223 if (len != sizeof(ncpus)) in tcpp_client_worker() 228 CPU_SET(workernum % ncpus, &mask); in tcpp_client_worker()
|
/freebsd/sys/tests/framework/ |
H A D | kern_testfrwk.c | 128 u_int ncpus = mp_ncpus ? mp_ncpus : MAXCPU; in kerntest_frwk_init() local 141 taskqueue_start_threads(&kfrwk.kfrwk_tq, ncpus, PI_NET, "[kt_frwk task]"); in kerntest_frwk_init() 142 kfrwk.kfrwk_waiting = ncpus; in kerntest_frwk_init() 265 u_int ncpus = mp_ncpus ? mp_ncpus : MAXCPU; in kern_testframework_deregister() local 280 if (ncpus != kfrwk.kfrwk_waiting) { in kern_testframework_deregister()
|
/freebsd/tools/tools/ncpus/ |
H A D | Makefile | 1 PROG= ncpus 3 SRCS= ncpus.c acpi.c
|
/freebsd/sys/powerpc/pseries/ |
H A D | xics.c | 322 int ncpus, i, error = -1; in xicp_bind() local 334 ncpus = 0; in xicp_bind() 336 if (CPU_ISSET(cpu, &cpumask)) ncpus++; in xicp_bind() 338 i = mftb() % ncpus; in xicp_bind() 339 ncpus = 0; in xicp_bind() 343 if (ncpus == i) in xicp_bind() 345 ncpus++; in xicp_bind()
|
/freebsd/sys/powerpc/powernv/ |
H A D | xive.c | 440 int ncpus, i, error; in xive_bind() local 451 ncpus = 0; in xive_bind() 453 if (CPU_ISSET(cpu, &cpumask)) ncpus++; in xive_bind() 455 i = mftb() % ncpus; in xive_bind() 456 ncpus = 0; in xive_bind() 460 if (ncpus == i) in xive_bind() 462 ncpus++; in xive_bind()
|
/freebsd/lib/libsys/x86/ |
H A D | __vdso_gettc.c | 383 int fd, ncpus; in __vdso_init_pvclock_timeinfos() local 387 if (_elf_aux_info(AT_NCPUS, &ncpus, sizeof(ncpus)) != 0 || in __vdso_init_pvclock_timeinfos() 391 len = ncpus * sizeof(*pvclock_timeinfos); in __vdso_init_pvclock_timeinfos()
|
/freebsd/usr.sbin/bhyve/ |
H A D | bhyverun.c | 194 uint64_t ncpus; in calc_topology() local 224 ncpus = (uint64_t)cpu_sockets * cpu_cores * cpu_threads; in calc_topology() 225 if (ncpus > UINT16_MAX) in calc_topology() 227 (uintmax_t)ncpus); in calc_topology() 230 if (guest_ncpus != (int)ncpus) in calc_topology() 236 guest_ncpus = ncpus; in calc_topology()
|
/freebsd/sys/contrib/openzfs/module/ |
H A D | Makefile.in | 36 ncpus=$$(sysctl -n kern.smp.cpus 2>/dev/null || :); \ 37 if [ -n "$$ncpus" ]; then fmakeflags="$$fmakeflags -j$$ncpus"; fi; \
|
/freebsd/sys/arm/mv/ |
H A D | mv_thermal.c | 77 int ncpus; member 97 .ncpus = 4, 333 for (i = 0; i < sc->config->ncpus; i++) { in mv_thermal_attach()
|
/freebsd/sys/kern/ |
H A D | subr_smp.c | 550 int curcpumap, i, ncpus = 0; in smp_rendezvous_cpus() local 573 ncpus++; in smp_rendezvous_cpus() 575 if (ncpus == 0) in smp_rendezvous_cpus() 581 smp_rv_ncpus = ncpus; in smp_rendezvous_cpus() 614 while (atomic_load_acq_int(&smp_rv_waiters[3]) < ncpus) in smp_rendezvous_cpus()
|
/freebsd/usr.sbin/powerd/ |
H A D | powerd.c | 156 static int ncpus = 0; in read_usage_times() local 172 ncpus = cp_times_len / (sizeof(long) * CPUSTATES); in read_usage_times() 175 cp_times_len = sizeof(long) * CPUSTATES * ncpus; in read_usage_times() 182 for (cpu = 0; cpu < ncpus; cpu++) { in read_usage_times()
|
/freebsd/sys/dev/netmap/ |
H A D | netmap_bdg.c | 713 u_int ncpus; member 744 bps->kthreads = nm_os_malloc(sizeof(struct nm_bdg_kthread) * bps->ncpus); in nm_bdg_create_kthreads() 750 for (i = 0; i < bps->ncpus; i++) { in nm_bdg_create_kthreads() 752 int all = (bps->ncpus == 1 && in nm_bdg_create_kthreads() 794 for (i = 0; i < bps->ncpus; i++) { in nm_bdg_polling_start_kthreads() 821 for (i = 0; i < bps->ncpus; i++) { in nm_bdg_polling_stop_delete_kthreads() 882 bps->ncpus = req_cpus; in get_polling_cfg()
|