From: Jean Delvare <khali@linux-fr.org>
To: lm-sensors@vger.kernel.org
Subject: Re: [lm-sensors] Discrepancy between reported readings from
Date: Mon, 25 Oct 2010 07:16:02 +0000 [thread overview]
Message-ID: <20101025091602.34b08cdc@endymion.delvare> (raw)
In-Reply-To: <AANLkTik8hx=ej8V7ti_=izz0u+daOxxy5PmBjX0ZQv8W@mail.gmail.com>
Hi Arun,
On Sun, 24 Oct 2010 21:40:38 -0400, Arun Raghavan wrote:
> Thanks again for the prompt response. One more question regarding
> coretemp: any idea how I can probe the sensor in my own source code?
> I'm hoping to be able to probe a few times a second, while the
> lm-sensors usage guide says max. probing frequency should be at most
> 0.3-0.5 Hz.
Out of curiosity, which "usage guide" are you referring to?
> I'm trying to measure thermal response and hence
> transients. Temperature rises rather too rapidly for this once every
> 2-3 seconds restriction; there's no intermediate reading between idle
> temperature (~28C) and loaded (~55C). Even when I overclock to
> deliberately induce more dissipation, I don't get an intermediate
> reading between the same base temperature and 70C!
There's no reason why overclocking would help. Overclocking will
generate more heat, but the time it takes to generate it won't change.
> Please let me know if the 2-3s resolution is a limitation of the
> sensors API or the kernel module itself. Any tips on how I might be
> able to measure with greater frequency (apart from hooking up an
> external probe and thermometer)?
There's no limitation at the sensors API level. Each kernel driver has
its own cache lifetime depending on various things, including the
number of registers to read, how fast or slow register access is, and
the driver design.
In the case of the coretemp driver, the 1 second lifetime is pretty
arbitrary, as there are only a few registers to read (one per core) and
register access is very fast (CPU MSRs). Fenghua, Guenter, do you think
it would make sense to shorten the cache lifetime to 0.5 or even 0.25
second?
Arun, back to your immediate issue, you have two options, either
rebuild the coretemp driver with a shorter cache lifetime (replace HZ
with HZ/10 in function coretemp_update_device) or access the MSR
yourself from user-space (but then you lose all the power of
libsensors.)
--
Jean Delvare
http://khali.linux-fr.org/wishlist.html
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
next prev parent reply other threads:[~2010-10-25 7:16 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-22 22:56 [lm-sensors] Discrepancy between reported readings from different Arun Raghavan
2010-10-23 13:02 ` [lm-sensors] Discrepancy between reported readings from Luca Tettamanti
2010-10-24 21:27 ` Arun Raghavan
2010-10-24 21:42 ` Luca Tettamanti
2010-10-25 1:40 ` Arun Raghavan
2010-10-25 2:39 ` Guenter Roeck
2010-10-25 7:16 ` Jean Delvare [this message]
2010-10-25 11:25 ` Guenter Roeck
2010-10-26 13:43 ` Arun Raghavan
2010-10-26 14:26 ` Jean Delvare
2010-11-09 13:51 ` Jean Delvare
2010-11-14 15:38 ` Jean Delvare
2010-11-15 3:51 ` Arun Raghavan
2010-11-25 13:17 ` Arun Raghavan
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=20101025091602.34b08cdc@endymion.delvare \
--to=khali@linux-fr.org \
--cc=lm-sensors@vger.kernel.org \
/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.