- 28 1月, 2014 1 次提交
-
-
由 Ján Tomko 提交于
Split out the repetitive code.
-
- 27 1月, 2014 2 次提交
- 23 1月, 2014 1 次提交
-
-
由 Bing Bu Cao 提交于
94f82053 added a space to the string but didn't change the buffer size. Signed-off-by: NBing Bu Cao <mars@linux.vnet.ibm.com> Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
- 22 1月, 2014 1 次提交
-
-
由 Bing Bu Cao 提交于
To retrieve node cpu statistics on Linux system, the linuxNodeGetCPUstats function simply uses STRPREFIX() to match the cpuid with the one read from /proc/stat. However, as the file is read line by line it may happen, that some CPUs share the same prefix. So if user requested stats for the first CPU, which is offline, then there's no cpu1 in the stats file so the one that we match is cpu10. Which is obviously wrong. Fortunately, the IDs are terminated by a space, so we can utilize that. Signed-off-by: NBing Bu Cao <mars@linux.vnet.ibm.com>
-
- 07 1月, 2014 1 次提交
-
-
由 Roman Bogorodskiy 提交于
Add a BSD implementation of nodeGetMemoryStats based on sysctl(3).
-
- 07 11月, 2013 1 次提交
-
-
由 Eric Blake 提交于
Commit b0f85462 broke the build on mingw, by exposing code that had Linux-specific dependencies but which was previously protected by libnuma ifdef guards: make[3]: Entering directory `/home/eblake/libvirt-tmp/build/src' CC libvirt_driver_la-nodeinfo.lo ../../src/nodeinfo.c: In function 'virNodeGetSiblingsList': ../../src/nodeinfo.c:1543:30: error: 'SYSFS_THREAD_SIBLINGS_LIST_LENGTH_MAX' undeclared (first use in this function) if (virFileReadAll(path, SYSFS_THREAD_SIBLINGS_LIST_LENGTH_MAX, &buf) < 0) ^ ../../src/nodeinfo.c:1543:30: note: each undeclared identifier is reported only once for each function it appears in ../../src/nodeinfo.c: In function 'virNodeCapsFillCPUInfo': ../../src/nodeinfo.c:1562:5: error: implicit declaration of function 'virNodeGetCpuValue' [-Werror=implicit-function-declaration] if ((tmp = virNodeGetCpuValue(SYSFS_CPU_PATH, cpu_id, ^ ../../src/nodeinfo.c:1562:5: error: nested extern declaration of 'virNodeGetCpuValue' [-Werror=nested-externs] ../../src/nodeinfo.c:1562:35: error: 'SYSFS_CPU_PATH' undeclared (first use in this function) if ((tmp = virNodeGetCpuValue(SYSFS_CPU_PATH, cpu_id, ^ cc1: all warnings being treated as errors * src/nodeinfo.c (virNodeCapsFillCPUInfo): Make conditional. (virNodeGetSiblingsList): Move into #ifdef linux block. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 04 11月, 2013 8 次提交
-
-
由 Peter Krempa 提交于
Now that all libnuma functions used by libvirt are wrapped in virNuma we can remove the dependancy from nodeinfo.
-
由 Peter Krempa 提交于
-
由 Peter Krempa 提交于
-
由 Peter Krempa 提交于
The function was called in a single place only and was reporting errors that were later ignored. Use the virNumaGetNodeMemory helper to get the size of the memory in the NUMA node and remove the helper
-
由 Peter Krempa 提交于
-
由 Peter Krempa 提交于
Avoid necessary checks for the numa library with this helper.
-
由 Peter Krempa 提交于
linuxNodeGetCPUStats() and linuxNodeGetMemoryStats() are static and don't need a forward declaration.
-
由 Peter Krempa 提交于
All functions from libnuma must be protected with ifdefs. Avoid this by using our own wrapper.
-
- 22 10月, 2013 1 次提交
-
-
由 Ryota Ozaki 提交于
HW_PHYSMEM is available on Mac OS X as well as FreeBSD, however, its resulting value for Mac OS X is 32 bits. Mac OS X provides HW_MEMSIZE that is 64 bits version of HW_PHYSMEM. We have to use it. I tested the patch on Mac OS X 10.6.8, 10.7.4, 10.8.5 and FreeBSD 9.2. Signed-off-by: NRyota Ozaki <ozaki.ryota@gmail.com>
-
- 16 10月, 2013 1 次提交
-
-
由 Pranavkumar Sawargaonkar 提交于
CPU "parser" for AArch64. Showing cputopology in arm64 linux is work-in-progress so for now all AArch64 cpus belong to same socket (like PPC). Also we parse BogoMIPS same like arm 32bit. Signed-off-by: NAnup Patel <anup.patel@linaro.org> Signed-off-by: NPranavkumar Sawargaonkar <pranavkumar@linaro.org>
-
- 09 10月, 2013 1 次提交
-
-
由 Giuseppe Scrivano 提交于
Commit 2d74822a renamed "freebsdNodeGetCPUCount" to "appleFreebsdNodeGetCPUCount", leaving one call to "freebsdNodeGetCPUCount". Fix this other case. Signed-off-by: NGiuseppe Scrivano <gscrivan@redhat.com> Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 07 10月, 2013 1 次提交
-
-
由 Ryota Ozaki 提交于
This fixes the following error: error : nodeGetInfo:933 : this function is not supported by the connection driver: node info not implemented on this platform The freebsdNodeGetCPUCount was renamed to appleFreebsdNodeGetCPUCount in order to make more visible the fact, that it works on Mac OS X too. Mac OS X can use sysctlbyname as same as FreeBSD to get the CPU frequency. However, the MIB style name is different from FreeBSD's. And the unit of the return frequency is also different. Signed-off-by: NRyota Ozaki <ozaki.ryota@gmail.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 22 8月, 2013 1 次提交
-
-
由 Peter Krempa 提交于
Re-arrange the code so that the returned bitmap is always initialized to NULL even on early failures and return an error message as some callers are already expecting it. Fix up the rest not to shadow the error.
-
- 12 7月, 2013 1 次提交
-
-
由 hejia hejia 提交于
nodeGetFreeMemory and nodeGetCellsFreeMemory assumed that the NUMA nodes are contiguous and starting from 0. Unfortunately there are machines that don't match this assumption: available: 1 nodes (1) node 1 cpus: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 node 1 size: 16340 MB node 1 free: 11065 MB Before this patch: error: internal error Failed to query NUMA free memory error: internal error Failed to query NUMA free memory for node: 0 After this patch: Total: 15772580 KiB 0: 0 KiB Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
- 11 7月, 2013 1 次提交
-
-
由 Daniel P. Berrange 提交于
Convert the type of loop iterators named 'i', 'j', k', 'ii', 'jj', 'kk', to be 'size_t' instead of 'int' or 'unsigned int', also santizing 'ii', 'jj', 'kk' to use the normal 'i', 'j', 'k' naming Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 10 7月, 2013 2 次提交
-
-
由 Michal Privoznik 提交于
-
由 Michal Privoznik 提交于
-
- 25 6月, 2013 1 次提交
-
-
由 Jiri Denemark 提交于
-
- 21 5月, 2013 1 次提交
-
-
由 Osier Yang 提交于
-
- 10 5月, 2013 1 次提交
-
-
由 Michal Privoznik 提交于
-
- 08 5月, 2013 1 次提交
-
-
由 Daniel P. Berrange 提交于
The individual hypervisor drivers were directly referencing APIs in src/nodeinfo.c in their virDriverPtr struct. Separate these methods, so there is always a wrapper in the hypervisor driver. This allows the unused virConnectPtr args to be removed from the nodeinfo.c file. Again this will ensure that ACL checks will only be performed on invocations that are directly associated with public API usage. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 02 5月, 2013 1 次提交
-
-
由 Michal Privoznik 提交于
The source code base needs to be adapted as well. Some files include virutil.h just for the string related functions (here, the include is substituted to match the new file), some include virutil.h without any need (here, the include is removed), and some require both.
-
- 04 4月, 2013 2 次提交
-
-
由 Daniel P. Berrange 提交于
If libnuma is not compiled in, or numa_available() returns an error, stub out fake NUMA info consisting of one NUMA cell containing all CPUs and memory. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Not all kernel builds have any entries under the location /sys/devices/system/cpu/cpu0/topology. We already cope with that being missing in some cases, but not all. Update the code which looks for thread_siblings to cope with the missing file Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 11 3月, 2013 1 次提交
-
-
由 Hu Tao 提交于
Signed-off-by: NHu Tao <hutao@cn.fujitsu.com>
-
- 09 3月, 2013 1 次提交
-
-
由 Dusty Mabe 提交于
'virsh capabilities' will now include a new <memory> element per <cell> of the topology, as in: <topology> <cells num='2'> <cell id='0'> <memory unit='KiB'>12572412</memory> <cpus num='12'> ... </cell> Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 24 1月, 2013 3 次提交
-
-
由 Daniel P. Berrange 提交于
When linuxNodeInfoCPUPopulate() method triggered use of an uninitialize value, since it did not initialize the 'sockets' field in the virNodeInfoPtr struct: ==30020== Conditional jump or move depends on uninitialised value(s) ==30020== at 0x5125DBD: linuxNodeInfoCPUPopulate (nodeinfo.c:513) ==30020== by 0x51261A0: nodeGetInfo (nodeinfo.c:884) ==30020== by 0x149B9B10: qemuCapsInit (qemu_capabilities.c:846) ==30020== by 0x14A11B25: qemuCreateCapabilities (qemu_driver.c:424) ==30020== by 0x14A12426: qemuStartup (qemu_driver.c:874) ==30020== by 0x512A7AF: virStateInitialize (libvirt.c:822) ==30020== by 0x40DE04: daemonRunStateInit (libvirtd.c:877) ==30020== by 0x50ADCE5: virThreadHelper (virthreadpthread.c:161) ==30020== by 0x328CA07D14: start_thread (pthread_create.c:308) ==30020== by 0x328C6F246C: clone (clone.S:114) (happened twice) if (socks > nodeinfo->sockets) <--- here nodeinfo->sockets = socks; Rather than doing this for each field, just make the caller memset the entire struct to zero. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Peter Krempa 提交于
This patch adds data gathering to the NUMA gathering files and adds support for outputting the data. The test driver and xend driver need to be adapted to fill sensible data to the structure in a future patch.
-
由 Peter Krempa 提交于
This will allow storing additional topology data in the NUMA topology definition. This patch changes the storage type and fixes fallout of the change across the drivers using it. This patch also changes semantics of adding new NUMA cell information. Until now the data were re-allocated and copied to the topology definition. This patch changes the addition function to steal the pointer to a pre-allocated structure to simplify the code.
-
- 23 1月, 2013 1 次提交
-
-
由 John Ferlan 提交于
-
- 22 1月, 2013 1 次提交
-
-
由 John Ferlan 提交于
The use of switch statements inside a bounded for loop resulted in some false positives regarding the "default:" label which cannot be reached since each of the other case statements use the possible for loop values. A [dead_error_begin] was added before the default label. Commit id ebdbe25a adjusted the algorithm and the caller guarantees that the 'params' will have a '_' in the name being searched. Add the [returned_null] tag to the two instances.
-
- 14 1月, 2013 1 次提交
-
-
由 Daniel P. Berrange 提交于
Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 21 12月, 2012 1 次提交
-
-
由 Daniel P. Berrange 提交于
-