/xen/tools/libxl/ |
A D | check-xl-vcpupin-parse | 141 nr_cpus=`xl info | grep nr_cpus | cut -f2 -d':'` 173 if [ $nr_cpus -gt 1 ]; then 175 cpu=$(($RANDOM % nr_cpus)) 181 if [ $nr_cpus -gt 2 ]; then 183 cpu=$(($RANDOM % nr_cpus)) 188 elif [ $cpu -eq $((nr_cpus - 2)) ]; then 190 elif [ $cpu -eq $((nr_cpus - 1)) ]; then 200 if [ $nr_cpus -gt 2 ]; then 202 cpua=$(($RANDOM % nr_cpus)) 203 range=$((nr_cpus - cpua)) [all …]
|
A D | libxl_numa.c | 141 static int nodemap_to_nr_cpus(libxl_cputopology *tinfo, int nr_cpus, in nodemap_to_nr_cpus() argument 147 for (i = 0; i < nr_cpus; i++) { in nodemap_to_nr_cpus() 189 int nr_doms, nr_cpus; in nr_vcpus_on_nodes() local 279 static int count_cpus_per_node(libxl_cputopology *tinfo, int nr_cpus, in count_cpus_per_node() argument 289 for (i = 0; i < nr_cpus; i++) { in count_cpus_per_node() 317 int nr_nodes = 0, nr_suit_nodes, nr_cpus = 0; in libxl__get_numa_candidate() local 363 tinfo = libxl_get_cpu_topology(CTX, &nr_cpus); in libxl__get_numa_candidate() 487 new_cndt.nr_cpus = nodes_cpus; in libxl__get_numa_candidate() 501 new_cndt.nr_cpus, new_cndt.nr_vcpus, in libxl__get_numa_candidate() 508 cndt_out->nr_cpus = new_cndt.nr_cpus; in libxl__get_numa_candidate() [all …]
|
A D | libxl_utils.c | 908 int nr_cpus = 0, i, rc = 0; in libxl_get_online_socketmap() local 910 tinfo = libxl_get_cpu_topology(ctx, &nr_cpus); in libxl_get_online_socketmap() 917 for (i = 0; i < nr_cpus; i++) in libxl_get_online_socketmap() 923 libxl_cputopology_list_free(tinfo, nr_cpus); in libxl_get_online_socketmap() 932 int nr_cpus = 0, i, rc = 0; in libxl_nodemap_to_cpumap() local 934 tinfo = libxl_get_cpu_topology(ctx, &nr_cpus); in libxl_nodemap_to_cpumap() 941 for (i = 0; i < nr_cpus; i++) { in libxl_nodemap_to_cpumap() 946 libxl_cputopology_list_free(tinfo, nr_cpus); in libxl_nodemap_to_cpumap() 977 int nr_cpus = 0, i, rc = 0; in libxl_cpumap_to_nodemap() local 987 if (i >= nr_cpus) in libxl_cpumap_to_nodemap() [all …]
|
A D | libxl_cpupool.c | 394 int cpu, nr_cpus; in libxl_cpupool_cpuremove_node() local 403 topology = libxl_get_cpu_topology(ctx, &nr_cpus); in libxl_cpupool_cpuremove_node() 412 for (cpu = 0; cpu < nr_cpus; cpu++) { in libxl_cpupool_cpuremove_node() 422 libxl_cputopology_list_free(topology, nr_cpus); in libxl_cpupool_cpuremove_node()
|
A D | libxl_psr.c | 128 int i, nr_cpus; in libxl__pick_socket_cpu() local 132 topology = libxl_get_cpu_topology(CTX, &nr_cpus); in libxl__pick_socket_cpu() 136 for (i = 0; i < nr_cpus; i++) in libxl__pick_socket_cpu() 142 libxl_cputopology_list_free(topology, nr_cpus); in libxl__pick_socket_cpu()
|
A D | libxl_arm_acpi.c | 258 static void make_acpi_madt_gicc(void *table, int nr_cpus, uint64_t gicc_base) in make_acpi_madt_gicc() argument 263 for (i = 0; i < nr_cpus; i++) { in make_acpi_madt_gicc()
|
A D | libxl.c | 370 physinfo->nr_cpus = xcphysinfo.nr_cpus; in libxl_get_physinfo()
|
A D | libxl_arm.c | 351 static int make_cpus_node(libxl__gc *gc, void *fdt, int nr_cpus, in make_cpus_node() argument 366 for (i = 0; i < nr_cpus; i++) { in make_cpus_node()
|
/xen/xen/common/ |
A D | stop_machine.c | 42 unsigned int nr_cpus; member 66 while ( atomic_read(&stopmachine_data.done) != stopmachine_data.nr_cpus ) in stopmachine_wait_state() 78 unsigned int i, nr_cpus; in stop_machine_run() local 89 nr_cpus = num_online_cpus(); in stop_machine_run() 91 nr_cpus--; in stop_machine_run() 102 stopmachine_data.nr_cpus = nr_cpus; in stop_machine_run()
|
A D | smp.c | 53 unsigned int nr_cpus; in on_selected_cpus() local 62 nr_cpus = cpumask_weight(&call_data.selected); in on_selected_cpus() 63 if ( nr_cpus == 0 ) in on_selected_cpus()
|
A D | sysctl.c | 146 uint32_t i, nr_cpus; in do_sysctl() local 149 nr_cpus = min(op->u.getcpuinfo.max_cpus, nr_cpu_ids); in do_sysctl() 152 for ( i = 0; i < nr_cpus; i++ ) in do_sysctl() 160 op->u.getcpuinfo.nr_cpus = i; in do_sysctl() 263 pi->nr_cpus = num_online_cpus(); in do_sysctl()
|
A D | perfc.c | 166 unsigned int nr_cpus; in perfc_copy_info() local 168 nr_cpus = cpumask_weight(&perfc_cpumap); in perfc_copy_info() 180 perfc_d[i].nr_vals = nr_cpus; in perfc_copy_info()
|
/xen/tools/tests/mce-test/tools/ |
A D | xen-mceinj.c | 185 unsigned int nr_cpus; in inject_cmci() local 189 nr_cpus = mca_cpuinfo(xc_handle); in inject_cmci() 190 if (!nr_cpus) in inject_cmci() 192 if (cpu_nr >= nr_cpus) in inject_cmci() 200 mc.u.mc_inject_v2.cpumap.nr_bits = nr_cpus; in inject_cmci() 222 unsigned int nr_cpus; in inject_lmce() local 225 nr_cpus = mca_cpuinfo(xc_handle); in inject_lmce() 226 if ( !nr_cpus ) in inject_lmce() 228 if ( cpu >= nr_cpus ) in inject_lmce() 229 err(xc_handle, "-c %u is larger than %u", cpu, nr_cpus - 1); in inject_lmce() [all …]
|
/xen/tools/firmware/hvmloader/ |
A D | smp.c | 123 unsigned int i, nr_cpus = hvm_info->nr_vcpus; in smp_initialise() local 129 for ( i = 1; i < nr_cpus; i++ ) in smp_initialise()
|
/xen/tools/xl/ |
A D | xl_vcpu.c | 28 uint32_t nr_cpus) in print_vcpuinfo() argument 49 print_bitmap(vcpuinfo->cpumap.map, nr_cpus, stdout); in print_vcpuinfo() 51 print_bitmap(vcpuinfo->cpumap_soft.map, nr_cpus, stdout); in print_vcpuinfo() 55 static void print_domain_vcpuinfo(uint32_t domid, uint32_t nr_cpus) in print_domain_vcpuinfo() argument 66 print_vcpuinfo(domid, &vcpuinfo[i], nr_cpus); in print_domain_vcpuinfo()
|
/xen/xen/arch/x86/cpu/mtrr/ |
A D | main.c | 215 unsigned int nr_cpus; in set_mtrr() local 221 nr_cpus = cpumask_weight(&allbutself); in set_mtrr() 227 atomic_set(&data.count, nr_cpus); in set_mtrr() 239 atomic_set(&data.count, nr_cpus); in set_mtrr() 262 atomic_set(&data.count, nr_cpus); in set_mtrr()
|
/xen/tools/python/xen/lowlevel/xc/ |
A D | xc.c | 254 int nr_cpus; in pyxc_vcpu_setaffinity() local 263 if ( nr_cpus < 0 ) in pyxc_vcpu_setaffinity() 275 if ( cpu < 0 || cpu >= nr_cpus ) in pyxc_vcpu_setaffinity() 415 int nr_cpus; in pyxc_vcpu_getinfo() local 424 if ( nr_cpus < 0 ) in pyxc_vcpu_getinfo() 450 for ( i = 0; i < nr_cpus; i++ ) in pyxc_vcpu_getinfo() 914 int max_cpus, nr_cpus, ret, i; in pyxc_getcpuinfo() local 933 for (i = 0; i < nr_cpus; i++) { in pyxc_getcpuinfo() 1558 int nr_cpus; in cpumap_to_cpulist() local 1561 if ( nr_cpus < 0 ) in cpumap_to_cpulist() [all …]
|
/xen/tools/libxc/ |
A D | xc_misc.c | 46 return physinfo.nr_cpus; in xc_get_online_cpus() 520 xc_cpuinfo_t *info, int *nr_cpus) in xc_getcpuinfo() argument 537 if ( nr_cpus ) in xc_getcpuinfo() 538 *nr_cpus = sysctl.u.getcpuinfo.nr_cpus; in xc_getcpuinfo()
|
/xen/tools/ocaml/libs/xc/ |
A D | xenctrl_stubs.c | 725 Store_field(physinfo, 2, Val_int(c_physinfo.nr_cpus)); in stub_xc_physinfo() 737 CAMLprim value stub_xc_pcpu_info(value xch, value nr_cpus) in stub_xc_pcpu_info() argument 739 CAMLparam2(xch, nr_cpus); in stub_xc_pcpu_info() 744 if (Int_val(nr_cpus) < 1) in stub_xc_pcpu_info() 747 info = calloc(Int_val(nr_cpus) + 1, sizeof(*info)); in stub_xc_pcpu_info() 752 r = xc_getcpuinfo(_H(xch), Int_val(nr_cpus), info, &size); in stub_xc_pcpu_info()
|
A D | xenctrl.mli | 107 nr_cpus : int; RecordField 114 max_nr_cpus : int; (** compile-time max possible number of nr_cpus *)
|
A D | xenctrl.ml | 123 nr_cpus : int; RecordField
|
/xen/xen/common/sched/ |
A D | credit2.c | 502 unsigned int nr_cpus; /* How many CPUs are sharing this runqueue */ member 2754 cpus_max = max(st.lrqd->nr_cpus, st.orqd->nr_cpus); in balance_load() 3803 rqd->nr_cpus, in csched2_dump() 3915 if ( !rqd->nr_cpus ) in init_cpu_runqueue() 3929 if ( rqd->nr_cpus > 0 ) in init_cpu_runqueue() 3942 rqd->nr_cpus++; in init_cpu_runqueue() 3943 ASSERT(cpumask_weight(&rqd->active) == rqd->nr_cpus); in init_cpu_runqueue() 3945 if ( rqd->nr_cpus == 1 ) in init_cpu_runqueue() 4044 rqd->nr_cpus--; in csched2_deinit_pdata() 4045 ASSERT(cpumask_weight(&rqd->active) == rqd->nr_cpus); in csched2_deinit_pdata() [all …]
|
/xen/xen/include/public/ |
A D | sysctl.h | 110 uint32_t nr_cpus; /* # CPUs currently online */ member 189 uint32_t nr_cpus; member
|
/xen/tools/libacpi/ |
A D | build.c | 51 uint16_t nr_cpus; /* 2 - Number of CPUs */ member 150 info->nr_cpus = hvminfo->nr_vcpus; in construct_madt()
|
/xen/tools/xenstat/libxenstat/src/ |
A D | xenstat.c | 159 node->num_cpus = physinfo.nr_cpus; in xenstat_get_node()
|