All of lore.kernel.org
 help / color / mirror / Atom feed
* RE: [PATCH] 3/3 Dynamic cpufreq governor and updates to ACPIP-state driver
@ 2003-10-21 15:47 ` Nakajima, Jun
  0 siblings, 0 replies; 9+ messages in thread
From: Nakajima, Jun @ 2003-10-21 15:47 UTC (permalink / raw)
  To: arjanv, Pallipadi, Venkatesh
  Cc: cpufreq, linux-kernel, linux-acpi, Mallick, Asit K, Dominik Brodowski

> 
> it's all nice code and such, but I still wonder why this can't be done
> by a userland policy daemon. The 2.6 kernel has the infrastructure to
> give very detailed information to userspace (eg top etc) about idle
> percentages...... I didn't see anything in this driver that couldn't
be
> done from userspace.
> 

It's about the frequency of the feedback loop. As we have much lower
latency with P-state transitions, the sampling time can be order of
millisecond (or shorter if meaningful). A userland daemon can have a
high-level policy (preferences, or set of parameters), but it cannot be
part of the real feedback loop. If we combine P-state transitions and
deeper C-state transitions, the situation is worse with a userland
daemon.

	Jun









^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: [PATCH] 3/3 Dynamic cpufreq governor and updates to ACPIP-state driver
@ 2003-10-21 15:47 ` Nakajima, Jun
  0 siblings, 0 replies; 9+ messages in thread
From: Nakajima, Jun @ 2003-10-21 15:47 UTC (permalink / raw)
  To: arjanv, Pallipadi, Venkatesh
  Cc: Mallick, Asit K, Dominik Brodowski, linux-acpi, cpufreq, linux-kernel

> 
> it's all nice code and such, but I still wonder why this can't be done
> by a userland policy daemon. The 2.6 kernel has the infrastructure to
> give very detailed information to userspace (eg top etc) about idle
> percentages...... I didn't see anything in this driver that couldn't
be
> done from userspace.
> 

It's about the frequency of the feedback loop. As we have much lower
latency with P-state transitions, the sampling time can be order of
millisecond (or shorter if meaningful). A userland daemon can have a
high-level policy (preferences, or set of parameters), but it cannot be
part of the real feedback loop. If we combine P-state transitions and
deeper C-state transitions, the situation is worse with a userland
daemon.

	Jun

^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: [PATCH] 3/3 Dynamic cpufreq governor and updates to ACPIP-state driver
  2003-10-21 15:47 ` Nakajima, Jun
@ 2003-10-21 19:55   ` Carl Thompson
  -1 siblings, 0 replies; 9+ messages in thread
From: Carl Thompson @ 2003-10-21 19:55 UTC (permalink / raw)
  To: Nakajima, Jun
  Cc: arjanv, Pallipadi, Venkatesh, Mallick, Asit K, Dominik Brodowski,
	linux-acpi, cpufreq, linux-kernel

Quoting "Nakajima, Jun" <jun.nakajima@intel.com>:

> ...

> It's about the frequency of the feedback loop. As we have much lower
> latency with P-state transitions, the sampling time can be order of
> millisecond (or shorter if meaningful). A userland daemon can have a
> high-level policy (preferences, or set of parameters), but it cannot be
> part of the real feedback loop. If we combine P-state transitions and
> deeper C-state transitions, the situation is worse with a userland
> daemon.

You are making the assumption that a higher polling frequency (we'll say
1ms) is in general better than a lower frequency (we'll say 1s).  I submit
that it is not.

If I hit a key on my keyboard and your high frequency loop increases CPU
speed so that my word processor displays the letter 0.01s faster, is that
really beneficial?  If a window renders in 0.2s seconds instead of 0.3s is
that a difference I am going to notice?

On the other hand, if I do a kernel compile and it is done 0.999s faster
with the higher frequency loop, am I going to miss that second over such a
long duration?  (In reality, the compile with the high-frequency loop would
probably take longer unless it has near zero overhead).

In my opinion it is wasteful to increase CPU speed unless there is a longer
term need for it.

> 	Jun

Carl Thompson



^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: [PATCH] 3/3 Dynamic cpufreq governor and updates to ACPIP-state driver
@ 2003-10-21 19:55   ` Carl Thompson
  0 siblings, 0 replies; 9+ messages in thread
From: Carl Thompson @ 2003-10-21 19:55 UTC (permalink / raw)
  To: Nakajima, Jun
  Cc: cpufreq, linux-acpi, Mallick, Asit K, arjanv, Pallipadi,
	Venkatesh, linux-kernel, Dominik Brodowski

Quoting "Nakajima, Jun" <jun.nakajima@intel.com>:

> ...

> It's about the frequency of the feedback loop. As we have much lower
> latency with P-state transitions, the sampling time can be order of
> millisecond (or shorter if meaningful). A userland daemon can have a
> high-level policy (preferences, or set of parameters), but it cannot be
> part of the real feedback loop. If we combine P-state transitions and
> deeper C-state transitions, the situation is worse with a userland
> daemon.

You are making the assumption that a higher polling frequency (we'll say
1ms) is in general better than a lower frequency (we'll say 1s).  I submit
that it is not.

If I hit a key on my keyboard and your high frequency loop increases CPU
speed so that my word processor displays the letter 0.01s faster, is that
really beneficial?  If a window renders in 0.2s seconds instead of 0.3s is
that a difference I am going to notice?

On the other hand, if I do a kernel compile and it is done 0.999s faster
with the higher frequency loop, am I going to miss that second over such a
long duration?  (In reality, the compile with the high-frequency loop would
probably take longer unless it has near zero overhead).

In my opinion it is wasteful to increase CPU speed unless there is a longer
term need for it.

> 	Jun

Carl Thompson

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] 3/3 Dynamic cpufreq governor and updates to ACPIP-state driver
  2003-10-21 19:55   ` Carl Thompson
  (?)
@ 2003-10-21 20:39   ` Dominik Brodowski
  -1 siblings, 0 replies; 9+ messages in thread
From: Dominik Brodowski @ 2003-10-21 20:39 UTC (permalink / raw)
  To: Carl Thompson
  Cc: cpufreq, Nakajima, Jun, Pallipadi, Venkatesh, Mallick, Asit K,
	arjanv, linux-acpi

On Tue, Oct 21, 2003 at 12:55:55PM -0700, Carl Thompson wrote:
> Quoting "Nakajima, Jun" <jun.nakajima@intel.com>:
> 
> > ...
> 
> > It's about the frequency of the feedback loop. As we have much lower
> > latency with P-state transitions, the sampling time can be order of
> > millisecond (or shorter if meaningful). A userland daemon can have a
> > high-level policy (preferences, or set of parameters), but it cannot be
> > part of the real feedback loop. If we combine P-state transitions and
> > deeper C-state transitions, the situation is worse with a userland
> > daemon.
> 
> You are making the assumption that a higher polling frequency (we'll say
> 1ms) is in general better than a lower frequency (we'll say 1s).  I submit
> that it is not.
> 
> If I hit a key on my keyboard and your high frequency loop increases CPU
> speed so that my word processor displays the letter 0.01s faster, is that
> really beneficial?  If a window renders in 0.2s seconds instead of 0.3s is
> that a difference I am going to notice?
> 
> On the other hand, if I do a kernel compile and it is done 0.999s faster
> with the higher frequency loop, am I going to miss that second over such a
> long duration?  (In reality, the compile with the high-frequency loop would
> probably take longer unless it has near zero overhead).
> 
> In my opinion it is wasteful to increase CPU speed unless there is a longer
> term need for it.

Different needs, different opinions, different governors...

	Dominik

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] 3/3 Dynamic cpufreq governor and updates to ACPIP-state driver
  2003-10-21 15:47 ` Nakajima, Jun
@ 2003-10-22  7:18   ` Arjan van de Ven
  -1 siblings, 0 replies; 9+ messages in thread
From: Arjan van de Ven @ 2003-10-22  7:18 UTC (permalink / raw)
  To: Nakajima, Jun
  Cc: arjanv, Pallipadi, Venkatesh, cpufreq, linux-kernel, linux-acpi,
	Mallick, Asit K, Dominik Brodowski

On Tue, Oct 21, 2003 at 08:47:51AM -0700, Nakajima, Jun wrote:
> > 
> > it's all nice code and such, but I still wonder why this can't be done
> > by a userland policy daemon. The 2.6 kernel has the infrastructure to
> > give very detailed information to userspace (eg top etc) about idle
> > percentages...... I didn't see anything in this driver that couldn't
> be
> > done from userspace.
> > 
> 
> It's about the frequency of the feedback loop. As we have much lower
> latency with P-state transitions, the sampling time can be order of
> millisecond (or shorter if meaningful). A userland daemon can have a
> high-level policy (preferences, or set of parameters), but it cannot be
> part of the real feedback loop. If we combine P-state transitions and
> deeper C-state transitions, the situation is worse with a userland
> daemon.


As I said the CURRENT code doesn't seem to do that. I can see the use of
in kernel hooks in to thigs; for example the scheduler could do an upcall
to the cpufreq core if a task uses it's timeslice completely (which would
be a sign that things need to go to a higher speed). I'd be very
interested to see things like that.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] 3/3 Dynamic cpufreq governor and updates to ACPIP-state driver
@ 2003-10-22  7:18   ` Arjan van de Ven
  0 siblings, 0 replies; 9+ messages in thread
From: Arjan van de Ven @ 2003-10-22  7:18 UTC (permalink / raw)
  To: Nakajima, Jun
  Cc: cpufreq, linux-acpi, Mallick, Asit K, arjanv, Pallipadi,
	Venkatesh, linux-kernel, Dominik Brodowski

On Tue, Oct 21, 2003 at 08:47:51AM -0700, Nakajima, Jun wrote:
> > 
> > it's all nice code and such, but I still wonder why this can't be done
> > by a userland policy daemon. The 2.6 kernel has the infrastructure to
> > give very detailed information to userspace (eg top etc) about idle
> > percentages...... I didn't see anything in this driver that couldn't
> be
> > done from userspace.
> > 
> 
> It's about the frequency of the feedback loop. As we have much lower
> latency with P-state transitions, the sampling time can be order of
> millisecond (or shorter if meaningful). A userland daemon can have a
> high-level policy (preferences, or set of parameters), but it cannot be
> part of the real feedback loop. If we combine P-state transitions and
> deeper C-state transitions, the situation is worse with a userland
> daemon.


As I said the CURRENT code doesn't seem to do that. I can see the use of
in kernel hooks in to thigs; for example the scheduler could do an upcall
to the cpufreq core if a task uses it's timeslice completely (which would
be a sign that things need to go to a higher speed). I'd be very
interested to see things like that.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: [PATCH] 3/3 Dynamic cpufreq governor and updates to ACPIP-state driver
@ 2003-10-21 17:41 ` Pallipadi, Venkatesh
  0 siblings, 0 replies; 9+ messages in thread
From: Pallipadi, Venkatesh @ 2003-10-21 17:41 UTC (permalink / raw)
  To: arjanv
  Cc: cpufreq, linux-kernel, linux-acpi, Mallick, Asit K, Nakajima,
	Jun, Dominik Brodowski



We can have a userspace governor and take decisions using
top, /proc/interrupts etc. But issue is mostly the rate
at which we want to monitor. In kernel governor can afford
to do more frequent checks and use the low latency P-state 
change feature quite effectively.

The patch does take care of all kinds of loads, process or irq
as we look at the cpu idle time in kstat. However it waits until
scheduled work (schedule_work()) gets to run. As you say, 
another advantage of having this in kernel is, kernel has 
all the information to take such decisions quickly. At present,
The patch tries to keep this governor simple and cover the 
common cases. However, once we have the infrastructure in place,
further optimizations with more advanced things can be done 
based on actual performance data.

Thanks,
-Venkatesh

> -----Original Message-----
> From: Arjan van de Ven [mailto:arjanv@redhat.com] 
> Sent: Tuesday, October 21, 2003 1:39 AM
> To: Pallipadi, Venkatesh
> Cc: cpufreq@www.linux.org.uk; linux-kernel@vger.kernel.org; 
> linux-acpi; Mallick, Asit K; Nakajima, Jun; Dominik Brodowski
> Subject: Re: [PATCH] 3/3 Dynamic cpufreq governor and updates 
> to ACPIP-state driver
> 
> 
> On Tue, 2003-10-21 at 04:56, Pallipadi, Venkatesh wrote:
> > Patch 3/3: New dynamic cpufreq driver (called 
> > DemandBasedSwitch driver), which periodically monitors CPU 
> > usage and changes the CPU frequency based on the demand.
> 
> 
> it's all nice code and such, but I still wonder why this can't be done
> by a userland policy daemon. The 2.6 kernel has the infrastructure to
> give very detailed information to userspace (eg top etc) about idle
> percentages...... I didn't see anything in this driver that 
> couldn't be
> done from userspace.
> 
> Note that I'm not totally against doing some of this in the kernel; I
> can well see the point of say, detecting an IRQ overload and based on
> that, go to max speed in the kernel because it's a situation where
> userspace doesn't even run; but the patch as is doesn't do any such
> advanced things...
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: [PATCH] 3/3 Dynamic cpufreq governor and updates to ACPIP-state driver
@ 2003-10-21 17:41 ` Pallipadi, Venkatesh
  0 siblings, 0 replies; 9+ messages in thread
From: Pallipadi, Venkatesh @ 2003-10-21 17:41 UTC (permalink / raw)
  To: arjanv
  Cc: cpufreq, Nakajima, Jun, linux-acpi, Mallick, Asit K,
	linux-kernel, Dominik Brodowski



We can have a userspace governor and take decisions using
top, /proc/interrupts etc. But issue is mostly the rate
at which we want to monitor. In kernel governor can afford
to do more frequent checks and use the low latency P-state 
change feature quite effectively.

The patch does take care of all kinds of loads, process or irq
as we look at the cpu idle time in kstat. However it waits until
scheduled work (schedule_work()) gets to run. As you say, 
another advantage of having this in kernel is, kernel has 
all the information to take such decisions quickly. At present,
The patch tries to keep this governor simple and cover the 
common cases. However, once we have the infrastructure in place,
further optimizations with more advanced things can be done 
based on actual performance data.

Thanks,
-Venkatesh

> -----Original Message-----
> From: Arjan van de Ven [mailto:arjanv@redhat.com] 
> Sent: Tuesday, October 21, 2003 1:39 AM
> To: Pallipadi, Venkatesh
> Cc: cpufreq@www.linux.org.uk; linux-kernel@vger.kernel.org; 
> linux-acpi; Mallick, Asit K; Nakajima, Jun; Dominik Brodowski
> Subject: Re: [PATCH] 3/3 Dynamic cpufreq governor and updates 
> to ACPIP-state driver
> 
> 
> On Tue, 2003-10-21 at 04:56, Pallipadi, Venkatesh wrote:
> > Patch 3/3: New dynamic cpufreq driver (called 
> > DemandBasedSwitch driver), which periodically monitors CPU 
> > usage and changes the CPU frequency based on the demand.
> 
> 
> it's all nice code and such, but I still wonder why this can't be done
> by a userland policy daemon. The 2.6 kernel has the infrastructure to
> give very detailed information to userspace (eg top etc) about idle
> percentages...... I didn't see anything in this driver that 
> couldn't be
> done from userspace.
> 
> Note that I'm not totally against doing some of this in the kernel; I
> can well see the point of say, detecting an IRQ overload and based on
> that, go to max speed in the kernel because it's a situation where
> userspace doesn't even run; but the patch as is doesn't do any such
> advanced things...
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2003-10-22  7:19 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-21 15:47 [PATCH] 3/3 Dynamic cpufreq governor and updates to ACPIP-state driver Nakajima, Jun
2003-10-21 15:47 ` Nakajima, Jun
2003-10-21 19:55 ` Carl Thompson
2003-10-21 19:55   ` Carl Thompson
2003-10-21 20:39   ` Dominik Brodowski
2003-10-22  7:18 ` Arjan van de Ven
2003-10-22  7:18   ` Arjan van de Ven
2003-10-21 17:41 Pallipadi, Venkatesh
2003-10-21 17:41 ` Pallipadi, Venkatesh

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.