All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Renninger <trenn@suse.de>
To: Dominik Brodowski <linux@dominikbrodowski.net>
Cc: Dave Jones <davej@codemonkey.org.uk>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	mzahor@dtech.sk, cpufreq <cpufreq@lists.linux.org.uk>
Subject: Re: [PATCH] Remove p4_clockmode driver
Date: Sun, 25 May 2008 17:39:31 +0200	[thread overview]
Message-ID: <1211729971.3422.52.camel@linux-2bdv.site> (raw)
In-Reply-To: <20080524110309.GB13173@isilmar.linta.de>

On Sat, 2008-05-24 at 13:03 +0200, Dominik Brodowski wrote:
> Hi,
> 
> On Fri, May 23, 2008 at 01:40:22PM -0400, Dmitry Torokhov wrote:
> > On Fri, May 23, 2008 at 06:16:07PM +0200, Thomas Renninger wrote:
> > > ...
> > > > > How much Watts does the machine
> > > > > save power when it is idle using p4-clockmod?
> > > > 
> > > > Don't care. Don't care. Do I need to repeat it? I don't care. All I
> > > > know is that it87 reports lower temperature when CPU is throttled.
> > > How much is it, constantly?
> > > 
> > 
> > Hmm, it looks ike on ide it is about 78C throttled and 81 unthrottled
> > (I would not pay attention to absolute numbers, I never actually tried
> > to calibrate the readings). So apparently not a lot... For some reason
> > I remember the difference a bit bigger, maybe I was lookig under light
> > load?
> 
> Probably you were looking under more or less heavy load, for then and only
> then p4-clockmod makes a difference. (>12.5 load at least)
> 
> Thomas: the question whether it saves power when it is idle is not a good
> criterion -- IIRC, some Intel SpeedStep-capable processors do enter the same
> low voltage idle state, so on a 100% idle system acpi-cpufreq wouldn't make
> a difference there either. Similarily, some cpufreq drivers which only do
> frequency scaling but not frequency and voltage scaling will also only see
> limited energy savings on 100% idle.
> 
> To summarize: If the CPU load is constantly x (0<x<1) within a timeframe,
> the _CPU_ energy consumption of an ideal system is approximately
> 
> - if the CPU does not support frequency or voltage scaling:
> 
> 	E_none	=  E_idle * (1-x) + E_max * x
> 
> - if the CPU supports frequency scaling (with linear energy savings):
> 
> 	E_fs	=  E_idle + (E_max - E_idle) * x  = E_none
> 
> - if the CPU supports throttling:
> 
> 	E_t	=  E_idle * (1-x) + E_max * x = E_none
> 
> - if the CPU supports frequency and voltage scaling (with energy savings to
>   the power of two)
> 
> 	E_fvs	=  E_idle + (E_max - E_idle) * x^2
> 
> 
> This shows that:
> 1) _if_ idle states work properly, and
> 2) _if_ the system needs to finish tasks as soon as possible,
> neither frequency scaling alone nor throttling will get you anything.
> 
> Now, let's test whether these two requirements are met:
> 
> ad 1) to the Intel folks out here: is C1 entered during throttling, or some
> deeper sleep level? If it's something deeper, this requirement is not met on
> my desktop P4 which only offers C1. 
> 
> ad 2) I can see of two aspects where this is invalid:
> 	- programs which will eat up as much CPU as possible e.g. for
> 	  even more frames per seconds, and
> 	- thermal side-effects: if the CPU energy consumption surpasses
> 	  certain thresholds, fans might be needed for cooling, or their
> 	  rotational speed increased, thereby also increasing the noise,
> 	  and not to forget the increased hardware wear by increased
> 	  temperatures...
> 
> However, this second requirement alone might be able to be met by software
> alone, as long as the first requirement -- a proper idle state is entered --
> is fulfilled:
> (1) Currently, _all_ tasks preempt the idle task -- if there's only one task
> running in nice level 19, that one gets 100% of the CPU, and the idle thread
> gets none.
> (2) One could now start a task with a very high priority, which schedules
> its own wakeup, and then calls cpuidle_idle_call(). Caveat: this would not
> work properly in a high-interrupt system.
> 
> Now, such a kernel module would do what -- it would _emulate_ frequency
> scaling in a software level, while p4-clockmod _emulates_ frequency scaling
> in hardware. Therefore, the correct place for p4-clockmod and such a generic
> "I do not want to use my hardware 100%"-module is within the framework which
> is made for the capabilities they emulate: cpufreq.

Could you explain this in two easy sentences again, why this should not
use the throttling interface?
(former /proc/acpi/processor/*/throttling, now somewhere located in
sysfs. Also used for passive cooling if no cpufreq is available).
Throttling is what this driver is doing and with which it will interfere
and slow down the machine to be closed to unresponsive if both
(throttling and cpufreq interface) are using it?

Thanks,

   Thomas

  reply	other threads:[~2008-05-25 15:39 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-03 19:47 [PATCH] Remove p4_clockmode driver Thomas Renninger
2008-05-11 16:19 ` Dave Jones
2008-05-15 10:55   ` Dominik Brodowski
2008-05-16 18:32   ` Pallipadi, Venkatesh
2008-05-22  4:01   ` Dmitry Torokhov
2008-05-23 11:21     ` Thomas Renninger
2008-05-23 12:55       ` Dmitry Torokhov
2008-05-23 15:19         ` Thomas Renninger
2008-05-23 15:54           ` Dmitry Torokhov
2008-05-23 16:16             ` Thomas Renninger
2008-05-23 17:40               ` Dmitry Torokhov
2008-05-24 11:03                 ` Dominik Brodowski
2008-05-25 15:39                   ` Thomas Renninger [this message]
2008-05-26 12:05                     ` Matthew Garrett
2008-05-26 12:56                       ` Thomas Renninger
2008-05-12 22:30 ` Cesar Eduardo Barros

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1211729971.3422.52.camel@linux-2bdv.site \
    --to=trenn@suse.de \
    --cc=cpufreq@lists.linux.org.uk \
    --cc=davej@codemonkey.org.uk \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux@dominikbrodowski.net \
    --cc=mzahor@dtech.sk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.