Commit b844db31 authored by Josh Triplett's avatar Josh Triplett Committed by Linus Torvalds

turbostat: Increase output buffer size to accommodate C8-C10

On platforms with C8-C10 support, the additional C-states cause
turbostat to overrun its output buffer of 128 bytes per CPU.  Increase
this to 256 bytes per CPU.

[ As a bugfix, this should go into 3.10; however, since the C8-C10
  support didn't go in until after 3.9, this need not go into any stable
  kernel. ]
Signed-off-by: default avatarJosh Triplett <josh@joshtriplett.org>
Cc: Len Brown <len.brown@intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 26e04462
...@@ -2191,7 +2191,7 @@ int initialize_counters(int cpu_id) ...@@ -2191,7 +2191,7 @@ int initialize_counters(int cpu_id)
void allocate_output_buffer() void allocate_output_buffer()
{ {
output_buffer = calloc(1, (1 + topo.num_cpus) * 128); output_buffer = calloc(1, (1 + topo.num_cpus) * 256);
outp = output_buffer; outp = output_buffer;
if (outp == NULL) { if (outp == NULL) {
perror("calloc"); perror("calloc");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment