On 7/7/2021 11:48 AM, Anatoly Burakov wrote:
Use RTM and WAITPKG instructions to perform a wait-for-writes similar to
what UMWAIT does, but without the limitation of having to listen for
just one event. This works because the optimized power state used by the
TPAUSE instruction will cause a wake up on RTM transaction abort, so if
we add the addresses we're interested in to the read-set, any write to
those addresses will wake us up.

Signed-off-by: Konstantin Ananyev <konstantin.anan...@intel.com>
Signed-off-by: Anatoly Burakov <anatoly.bura...@intel.com>
---

Notes:
     v4:
     - Fixed bugs in accessing the monitor condition
     - Abort on any monitor condition not having a defined callback
v2:
     - Adapt to callback mechanism


Initially I had issues running this as I couldn't see the "rtm" flag in /proc/cpuinfo, but adding "tsx=on" to the kernel parameters resolved this, and rtm was then available to use. Once this was done, I was then able to successfully see power saving when a core was configuired with multiple queues.

Tested-by: David Hunt <david.h...@intel.com>



Reply via email to