Coordinating Software and Hardware for Performance Under Power Constraints