Michael van Elst | 1 May 2007 08:25
Picon

Re: cpu speed and temperature

blair.sadewitz <at> gmail.com ("Blair Sadewitz") writes:

>Have you tried using INTEL_ONDEMAND_CLOCKMOD?  It currently doesn't do
>anything automatically, but it might help, or you could write a
>monitoring script.

That's PENTIUM4_ONDEMAND_CLOCKMOD and is for Pentium 4 only :) His
Core Duo uses the est driver which is already builtin as you can
see from his dmesg output.

| cpu0: Enhanced SpeedStep (1020 mV) 1200 MHz
| cpu0: unknown Enhanced SpeedStep CPU.
| cpu0: using only highest and lowest power states.
| cpu0: Enhanced SpeedStep frequencies available (MHz): 1200 800

His 4.0-kernel is single processor only. Changing the frequency
on a single core has no effect. That's why the est driver
was recently changed to propagate the frequency setting to
all cores. I could imagine that this doesn't work on a
single processor kernel.

That shouldn't be a problem for the 4.99.16-SMP-kernel though
which is multiprocessor and looks recent enough.

I can't see his XUbuntu files (403 - Forbidden). Linux supports
the different ACPI power modes, so it is possible that some
devices are simply put into power saving mode or even turned
off. There is also the possibility that ACPI uses different
(i.e. lower) voltages for the core when it switches power
modes.
(Continue reading)

haad | 1 May 2007 10:55
Picon
Gravatar

Re: cpu speed and temperature


Joel CARNAT wrote:
> Hello,
> 
> facing a "fan always blowing" issue on a Dell D420, I did a few
> observations with various OS to see how cpu speed and system temperature
> were linked.
> 
> as expected, when the cpu runs slower, the heat is lower... :)
> the thing is I still get a 10�C difference between running NetBSD and Linux.
> 
> on NetBSD 4.99.16 and 4.0_BETA2, setting the speed to 1200MHz keeps the
> system at about 57�C (I let the system idling until every the three "Load
> Averages" values were 0.00) and setting it to 800MHz keeps the system at
> about 54�C.
> 
> on Linux (2.6.x from XUbuntu 7), the temperature went down to 48�C since
> it ended booting from the live CD (the laptop was at 57�C from the
> previous NetBSD testing). after waiting a bit (about 10min), the
> temperature went down to 46�C.
> 
> on my testings, NetBSD stayed in console where as Linux had Xorg up.
> 
> I tend to think the Linux values are true because it seems the fan runs a
> bit slower... that's initialy why I decided to keep numbers to be sure it
> was not just the environment noise fooling me...
> 
> my question is: how can one explain this ~10�C difference ?

what about dynticks and clockless time resolution in linux. [1]
(Continue reading)

Mindaugas R. | 1 May 2007 14:36
Picon

Re: CVS commit: src

People... where you have been all that week?...

Andrew Doran <ad <at> netbsd.org> wrote:
> o It belongs in sys_aio.c for a couple of reasons. The file implements only
>   syscalls and direct support for them, and it's not a VFS component as
>   such. It should be possible to do AIO on other types of file descriptor.
So you want to rename vfs_aio.c to sys_aio.c, after commit?... :(
OK, but the same is valid for vfs_bio.c, and probably various other files.

> o I'm still not fond of copying out the state to userspace only for the
>   kernel to copy it back in later when asked for it. I'm not familiar with
>   the ins and outs of the POSIX AIO stuff, but I'd prefer to see some kind
>   of job control block stick around in the kernel until userspace calls in
>   to collect it. Would that be possible?
Understood. There are no, of course, POSIX requirements for that. But
avoiding copyin() would cost the locking of aio_mtx and searching in the
queue. Keeping in mind that people also write such code:
	while (aio_error (aiocbp) == EINPROGRESS);
.. I would prefer the current way.

> o Holding p->p_mutex across mutex_init and pool_init is dicey since they can
>   sleep in order to allocate memory.  There are number of other things that
>   depend on p_mutex, so if an LWP sleeps here it could tie other LWPs up in
>   knots waiting. What I suggest to fix that is a flag in p_flag and perhaps
>   another condvar that says "AIO is being initialized". Other threads that
>   end up in aio_init would wait for that flag to clear, then return when it
>   has cleared:
> <...>
> o Testing for p->p_aio to be non-null appears to be unsafe as it can
>   currently be non-null while AIO is not fully initialized. To fix that
(Continue reading)

Michael van Elst | 1 May 2007 14:53
Picon

Re: cpu speed and temperature

haaaad <at> gmail.com (haad) writes:

>what about dynticks and clockless time resolution in linux. [1]

>[1]http://kernelnewbies.org/Linux_2_6_21#head-8547911895fda9cdff32a94771c8f5706d66bba0

Ubuntu 7 runs kernel 2.6.20. I also doubt that the effect of dynticks
will be large.

-- 
--

-- 
                                Michael van Elst
Internet: mlelstv <at> serpens.de
                                "A potential Snark may lurk in every tree."

Joel CARNAT | 1 May 2007 15:16
Favicon
Gravatar

Re: Re: cpu speed and temperature

On Mon, Apr 30 2007 - 17:53, Blair Sadewitz wrote:
>  You should probably take the load average or CPU usage and write a
>  script to issue the appropriate sysctl command.
> 
>  BTW, the ALL kernel isn't suitable for actual use.

yeah - I noticed that as it didn't boot at all :-)

>  You can just define options INTEL_ONDEMAND_CLOCKMOD.

I used GENERIC plus this option.
Find attached the dmesg and sysctl parts.
I tried clockmod value 0 and 7 and the temperature didn't get lower
than 52,500degC in IDLE mode.

For what it's worth knowing it, I also did a few observations with
Windows XP, SpeedFan and PC Wizard 2007. It appears that when idling
those apps gives the following values:
- CPU Speed = 789,17 MHz
- Disk = 33°C
- CPU Temp / Temp1 = 52°C
- Core #1 = 52°C
- Core #2 = 50°C
- CPU activity when idling = between 3 and 5%...

'Not sure if it's good news NetBSD don't do better than Windows but
at least it does not do worse :-)

I'm gonna try to get such values on an older laptop to see if it has
something to do with hardware implementation...
(Continue reading)

Juan RP | 1 May 2007 17:11

Re: cpu speed and temperature

On Tue, 1 May 2007 15:16:16 +0200
Joel CARNAT <joel <at> carnat.net> wrote:

> On Mon, Apr 30 2007 - 17:53, Blair Sadewitz wrote:
> >  You should probably take the load average or CPU usage and write a
> >  script to issue the appropriate sysctl command.
> > 
> >  BTW, the ALL kernel isn't suitable for actual use.
> 
> yeah - I noticed that as it didn't boot at all :-)
> 
> >  You can just define options INTEL_ONDEMAND_CLOCKMOD.
> 
> I used GENERIC plus this option.
> Find attached the dmesg and sysctl parts.
> I tried clockmod value 0 and 7 and the temperature didn't get lower
> than 52,500degC in IDLE mode.

This driver only takes effect when the cpu is not IDLE, so in IDLE
mode it won't have any effect (please search for "On Demand Clock
Modulation" to learn more about this).

To test it, run a CPU extensive application, use the lowest value
in machdep.clockmod.target and you'll see that your CPU will not
increase in heat (sometimes I've seen it to decrease CPU temp).
But that means that your CPU will work slower than before...

--

-- 
http://plog.xtrarom.org/
Juan RP's blog - NetBSD/pkgsrc news in Spanish
(Continue reading)

Juan RP | 1 May 2007 17:24

Re: cpu speed and temperature

On Tue, 1 May 2007 06:25:01 +0000 (UTC)
mlelstv <at> serpens.de (Michael van Elst) wrote:

> blair.sadewitz <at> gmail.com ("Blair Sadewitz") writes:
> 
> >Have you tried using INTEL_ONDEMAND_CLOCKMOD?  It currently doesn't do
> >anything automatically, but it might help, or you could write a
> >monitoring script.
> 
> That's PENTIUM4_ONDEMAND_CLOCKMOD and is for Pentium 4 only :) His
> Core Duo uses the est driver which is already builtin as you can
> see from his dmesg output.

It's available on any CPU with the CPUID TM (Thermal Monitor) feature,
so it's not pentium 4 only :-)

--

-- 
http://plog.xtrarom.org/
Juan RP's blog - NetBSD/pkgsrc news in Spanish

Joerg Sonnenberger | 1 May 2007 19:19
Picon

Re: cpu speed and temperature

On Mon, Apr 30, 2007 at 10:08:00PM +0200, Joel CARNAT wrote:
> my question is: how can one explain this ~10°C difference ?

Nit-picking: the difference is 10K.

I don't think we actively use the C stepping of the CPU, nor we use the
ACPI CPU PM functions. Both can make quite a difference, esp. on an
unloaded box.

Joerg

Joerg Sonnenberger | 1 May 2007 17:34
Picon

Re: USB stack needs early review (Re: Someone should fix our USB stack...)

On Sat, Apr 28, 2007 at 11:07:06AM -0400, der Mouse wrote:
> > ... noting that the bottom half which can write to sc->flags is
> > blocked out while it is being examined.
> 
> Still doesn't help if the data being examined is file-static and does
> not have its address stored anywhere global and thus is not modifiable
> by tsleep() according to the C virtual machine; the compiler is then
> perfectly within its rights to keep the flags word in a register across
> the tsleep().

A simple graph argument defeats this. If there is any active code path
that modifies the storage location, it needs to be callable from the
outside (otherwise it isn't active). The compiler can't interfere that
tsleep is not able to take this code path.

Joerg

Manuel Bouyer | 1 May 2007 20:11

Re: port bio(4) and bioctl(8) from openbsd ?

On Tue, Apr 24, 2007 at 01:16:49AM +0200, Manuel Bouyer wrote:
> On Sun, Apr 22, 2007 at 11:01:41PM +0200, Manuel Bouyer wrote:
> > [...]
> > 
> > Would anyone object if I commit the code as is, with bio_unregister() just
> > calling panic() for now, and dealing properly with this later when
> > mfi(4) gets converted to mutexes ? We need this for mfi(4), as currently
> > there's no way to report drive failures with NetBSD (not even a line
> > in dmesg). I want to get this pulled up to netbsd-4 and possibly netbsd-3,
> > and I'd like to first commit something not too far from the code we'll
> > have in the branches.
> 
> Attached is the code I'd like to commit. Changes with previous versions:

FYI, I commited this patch

--

-- 
Manuel Bouyer <bouyer <at> antioche.eu.org>
     NetBSD: 26 ans d'experience feront toujours la difference
--


Gmane