From c402eebc71770390f8ce1b400dfe19cbfca30ec7 Mon Sep 17 00:00:00 2001 From: Guannan Ren Date: Fri, 31 Aug 2012 16:31:30 +0800 Subject: [PATCH] cgroup: read more data from cgroup cpuacct.usage_percpu On NUMA machine, the length of string got from file cpuacct.usage_percpu is quite large, so expand the limit of 1024 bytes. errors like: Failed to read file \ '/cgroup/cpuacct/libvirt/qemu/rhel6q/cpuacct.usage_percpu': \ Value too large for defined data type --- src/util/cgroup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/cgroup.c b/src/util/cgroup.c index 8541c7fdae..5dc07649d3 100644 --- a/src/util/cgroup.c +++ b/src/util/cgroup.c @@ -360,7 +360,7 @@ static int virCgroupGetValueStr(virCgroupPtr group, VIR_DEBUG("Get value %s", keypath); - rc = virFileReadAll(keypath, 1024, value); + rc = virFileReadAll(keypath, 1024*1024, value); if (rc < 0) { rc = -errno; VIR_DEBUG("Failed to read %s: %m\n", keypath);