Re: [PATCH v6 0/2] x86, mwaitt: introduce AMD mwaitt support

From: Borislav Petkov
Date: Wed Aug 05 2015 - 00:01:33 EST


On Wed, Aug 05, 2015 at 11:18:50AM +0800, Huang Rui wrote:
> cat /sys/bus/pci/devices/0000\:00\:18.4/hwmon/hwmon0/power1_acc;
> sleep 10000s;
> cat /sys/bus/pci/devices/0000\:00\:18.4/hwmon/hwmon0/power1_acc;
>
> * TSC-based default delay: 485115 uWatts average power
> * MWAITX-based delay: 252738 uWatts average power
>
> Thus, that's about 240 milliWatts less power consumption. The test
> method relies on the support of AMD CPU accumulated power algorithm in
> fam15_power for which patches are forthcoming.

Cool power consumption drop is actually even measureable.

Also, I think implementing it as a loop, as Peter suggested, was the
right thing to do due to this statement in MWAITX's definition in the
APM:

"There is no indication after exiting MWAITX of why the processor exited
or if the timer expired. It is up to software to check whether the
awaiting store has occurred, and if not, determining how much time
has elapsed if it wants to re-establish the MONITORX with a new timer
value."

So all in all, those patches are starting to shape up nicely. One small
nit I have is using "MWAITT" (with a T) together with MWAITX while the
APM calls it only MWAITX. But I can fix that when applying and drop all
MWAITT occurrences.

Thanks.

--
Regards/Gruss,
Boris.

ECO tip #101: Trim your mails when you reply.
--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/