]> git.karo-electronics.de Git - karo-tx-linux.git/commit
tools/power turbostat: prevent infinite loop on migration error path
authorLen Brown <len.brown@intel.com>
Fri, 9 Nov 2012 03:38:05 +0000 (22:38 -0500)
committerLen Brown <len.brown@intel.com>
Tue, 13 Nov 2012 19:46:14 +0000 (14:46 -0500)
commit883d5d681f426eb42ad65d805cfc138dea986b6c
treeb3c3fdbdfcfb77f7da6e9c80a8d7c3c07990cbb7
parentb63cb742e185caf39cc0238d151076a6d06832c5
tools/power turbostat: prevent infinite loop on migration error path

Turbostat assumed if it can't migrate to a CPU, then the CPU
must have gone off-line and turbostat should re-initialize
with the new topology.

But if turbostat can not migrate because it is restricted by
a cpuset, then it will fail to migrate even after re-initialization,
resulting in an infinite loop.

Spit out a warning when we can't migrate
and endure only 2 re-initialize cycles in a row
before giving up and exiting.

Signed-off-by: Len Brown <len.brown@intel.com>
tools/power/x86/turbostat/turbostat.c