backport interactive governor from Google 3.4 common kernel
thanks to johnnyslt