From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751195AbbHEEBa (ORCPT ); Wed, 5 Aug 2015 00:01:30 -0400 Received: from mail.skyhub.de ([78.46.96.112]:41072 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750944AbbHEEB2 (ORCPT ); Wed, 5 Aug 2015 00:01:28 -0400 Date: Wed, 5 Aug 2015 06:01:29 +0200 From: Borislav Petkov To: Huang Rui Cc: Andy Lutomirski , Thomas Gleixner , Peter Zijlstra , Ingo Molnar , "Rafael J. Wysocki" , Len Brown , John Stultz , =?utf-8?B?RnLDqWTDqXJpYw==?= Weisbecker , linux-kernel@vger.kernel.org, x86@kernel.org, Andreas Herrmann , Fengguang Wu , Aaron Lu , Tony Li Subject: Re: [PATCH v6 0/2] x86, mwaitt: introduce AMD mwaitt support Message-ID: <20150805040129.GC10334@nazgul.tnic> References: <1438744732-1459-1-git-send-email-ray.huang@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1438744732-1459-1-git-send-email-ray.huang@amd.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. --