1) I believe the current iteration you have of it is safe.
2) I suggest that a service is created for managing system performance that exposes an API to your user to turn on and off game mode.
My commentary here [0] directly relates to your #2.
[0] <https://news.ycombinator.com/item?id=47436085>
My commentary here [0] directly relates to your #2.
[0] <https://news.ycombinator.com/item?id=47436085>