All of lore.kernel.org
 help / color / mirror / Atom feed
* [lm-sensors] Few queries about lm-sensors and core temp.c
@ 2013-07-19 15:28 Kapil Dev
  2013-07-19 15:47 ` Jean Delvare
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Kapil Dev @ 2013-07-19 15:28 UTC (permalink / raw)
  To: lm-sensors


[-- Attachment #1.1: Type: text/plain, Size: 1081 bytes --]

Hi,

I have a couple of queries about lm-sensors package.

1) The FAQ section in chapter-1 says that the drivers update their values every 1 sec. I am aware of the fact that reading the sensors more frequently will affect the performance as it is intrusive to CPU to read an MSR, but I need to read the core-temperature values at faster rate for a project. Would you tell me what changes I should make to read the sensors faster? In particular, I want to read the core temperature (I believe it  is done in coretemp.c through IA32_THERMAL_STATUS MSR register). coretemp.c seems to have "jiffy" as time stamp, if I change it in the coretemp.c, will it work? Or, is there any other file that needs to be changed during kernel-compilation?

2) Does the lm-sensor package use the correct value of Tjmax (the temp value at which PROCHOT signal goes high) automatically based on the processor brand and type? I noticed that the Tjmax =100C is used in core temp.c, but the 22nm intel processor that I am working on has Tjmax of 105C. Do I need to change it myself?

Thanks,
Kapil

[-- Attachment #1.2: Type: text/html, Size: 1595 bytes --]

[-- Attachment #2: Type: text/plain, Size: 153 bytes --]

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

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

* Re: [lm-sensors] Few queries about lm-sensors and core temp.c
  2013-07-19 15:28 [lm-sensors] Few queries about lm-sensors and core temp.c Kapil Dev
@ 2013-07-19 15:47 ` Jean Delvare
  2013-07-21  7:40 ` Guenter Roeck
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Jean Delvare @ 2013-07-19 15:47 UTC (permalink / raw)
  To: lm-sensors

Hi Kapil,

On Fri, 19 Jul 2013 11:28:28 -0400, Kapil Dev wrote:
> I have a couple of queries about lm-sensors package.
> 
> 1) The FAQ section in chapter-1 says that the drivers update their values every 1 sec. I am aware of the fact that reading the sensors more frequently will affect the performance as it is intrusive to CPU to read an MSR, but I need to read the core-temperature values at faster rate for a project. Would you tell me what changes I should make to read the sensors faster? In particular, I want to read the core temperature (I believe it  is done in coretemp.c through IA32_THERMAL_STATUS MSR register). coretemp.c seems to have "jiffy" as time stamp, if I change it in the coretemp.c, will it work? Or, is there any other file that needs to be changed during kernel-compilation?

Just change this condition in show_temp():

	/* Check whether the time interval has elapsed */
	if (!tdata->valid || time_after(jiffies, tdata->last_updated + HZ)) {

to just:

	/* Always update */
	if (1) {

This will let you read the value as frequently as you want. Or if you
want to keep a safety guard, you can simply change HZ to HZ/10 (read
every 0.1 s max) or HZ/100 (read every 0.01 s max.)

> 2) Does the lm-sensor package use the correct value of Tjmax (the temp value at which PROCHOT signal goes high) automatically based on the processor brand and type? I noticed that the Tjmax \x100C is used in core temp.c, but the 22nm intel processor that I am working on has Tjmax of 105C. Do I need to change it myself?

We have a complex heuristic to figure out the right TjMax value, but
Intel made it such a mess that it is very difficult. So it really is
best effort. If the driver has TjMax wrong for your CPU, please let us
know what kernel version you are running, what CPU model you have is
and where you found the correct TjMax value.

Then you can either try to fix it in the driver itself, or adjust it
from userspace by adding this to /etc/sensors.d/coretemp.conf:

chip "coretemp-*"

    compute temp1 @+5, @-5
    compute temp2 @+5, @-5
    compute temp3 @+5, @-5
    compute temp4 @+5, @-5
    compute temp5 @+5, @-5

(Adjust for your own case...)

Hope that helps,
-- 
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

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

* Re: [lm-sensors] Few queries about lm-sensors and core temp.c
  2013-07-19 15:28 [lm-sensors] Few queries about lm-sensors and core temp.c Kapil Dev
  2013-07-19 15:47 ` Jean Delvare
@ 2013-07-21  7:40 ` Guenter Roeck
  2013-07-22  3:23 ` Kapil Dev
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Guenter Roeck @ 2013-07-21  7:40 UTC (permalink / raw)
  To: lm-sensors

On Fri, Jul 19, 2013 at 05:47:24PM +0200, Jean Delvare wrote:
> Hi Kapil,
> 
> On Fri, 19 Jul 2013 11:28:28 -0400, Kapil Dev wrote:
> > I have a couple of queries about lm-sensors package.
> > 
> > 1) The FAQ section in chapter-1 says that the drivers update their values every 1 sec. I am aware of the fact that reading the sensors more frequently will affect the performance as it is intrusive to CPU to read an MSR, but I need to read the core-temperature values at faster rate for a project. Would you tell me what changes I should make to read the sensors faster? In particular, I want to read the core temperature (I believe it  is done in coretemp.c through IA32_THERMAL_STATUS MSR register). coretemp.c seems to have "jiffy" as time stamp, if I change it in the coretemp.c, will it work? Or, is there any other file that needs to be changed during kernel-compilation?
> 
> Just change this condition in show_temp():
> 
> 	/* Check whether the time interval has elapsed */
> 	if (!tdata->valid || time_after(jiffies, tdata->last_updated + HZ)) {
> 
> to just:
> 
> 	/* Always update */
> 	if (1) {
> 
> This will let you read the value as frequently as you want. Or if you
> want to keep a safety guard, you can simply change HZ to HZ/10 (read
> every 0.1 s max) or HZ/100 (read every 0.01 s max.)
> 
> > 2) Does the lm-sensor package use the correct value of Tjmax (the temp value at which PROCHOT signal goes high) automatically based on the processor brand and type? I noticed that the Tjmax \x100C is used in core temp.c, but the 22nm intel processor that I am working on has Tjmax of 105C. Do I need to change it myself?
> 
> We have a complex heuristic to figure out the right TjMax value, but
> Intel made it such a mess that it is very difficult. So it really is
> best effort. If the driver has TjMax wrong for your CPU, please let us
> know what kernel version you are running, what CPU model you have is
> and where you found the correct TjMax value.
> 
The 22nm processors should all report it correctly from CPU registers,
so this is really odd. My IvyBridge CPU (i7-3770K) reports it correctly.
I am quite sure the Haswell did too, but I am some 12,000 miles away
from it and the system is shut down, so we'll have to wait for another
10 days or so until I can check it.

So, yes, we'll definitely need the CPU model and kernel version.

Guenter

> Then you can either try to fix it in the driver itself, or adjust it
> from userspace by adding this to /etc/sensors.d/coretemp.conf:
> 
> chip "coretemp-*"
> 
>     compute temp1 @+5, @-5
>     compute temp2 @+5, @-5
>     compute temp3 @+5, @-5
>     compute temp4 @+5, @-5
>     compute temp5 @+5, @-5
> 
> (Adjust for your own case...)
> 
> Hope that helps,
> -- 
> 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
> 

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

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

* Re: [lm-sensors] Few queries about lm-sensors and core temp.c
  2013-07-19 15:28 [lm-sensors] Few queries about lm-sensors and core temp.c Kapil Dev
  2013-07-19 15:47 ` Jean Delvare
  2013-07-21  7:40 ` Guenter Roeck
@ 2013-07-22  3:23 ` Kapil Dev
  2013-07-22  7:49 ` Jean Delvare
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Kapil Dev @ 2013-07-22  3:23 UTC (permalink / raw)
  To: lm-sensors

Hi,

I just realized that I just replied to Jean, and didn't reply-all previously.

I am using 2.6.39-020639-generic  kernel and I am running Ubuntu 9.04. I couldn't find /etc/sensors.d/coretemp.config file. I am using 3450S intel i5 processor, which has Tjmax of 103C (sorry for the typo in my original email), based on http://users.sosdg.org/~qiyong/lxr/source/Documentation/hwmon/coretemp?a=um . 

I found that for some processors, IA32_TEMPERATURE_TARGET MSR has the Tjmax value; I assume that the coretemp.c tries to read this register and if it doesn't succeed then, it uses the heuristic value. 
Few other doubts I have are:

1) For a multi-core processor, are there separate Tjmax for each core or just 1 Tjmax value per processor?
2) Inside coretemp.c  file, the temperature is read in milli-degree C, and multiplied by 1000 to get C value. Does it mean that DTS value stored in IA32_ThERMAL_STATUS MSR is in milli-degrees? I also notice that there are only  7 bits assigned to DTS value, which would not be sufficient to cover the wide range of temperate values if it is in mill-degree C. Am I missing something here?


Thanks,
Kapil

On Jul 21, 2013, at 3:40 AM, Guenter Roeck <linux@roeck-us.net> wrote:

> On Fri, Jul 19, 2013 at 05:47:24PM +0200, Jean Delvare wrote:
>> Hi Kapil,
>> 
>> On Fri, 19 Jul 2013 11:28:28 -0400, Kapil Dev wrote:
>>> I have a couple of queries about lm-sensors package.
>>> 
>>> 1) The FAQ section in chapter-1 says that the drivers update their values every 1 sec. I am aware of the fact that reading the sensors more frequently will affect the performance as it is intrusive to CPU to read an MSR, but I need to read the core-temperature values at faster rate for a project. Would you tell me what changes I should make to read the sensors faster? In particular, I want to read the core temperature (I believe it  is done in coretemp.c through IA32_THERMAL_STATUS MSR register). coretemp.c seems to have "jiffy" as time stamp, if I change it in the coretemp.c, will it work? Or, is there any other file that needs to be changed during kernel-compilation?
>> 
>> Just change this condition in show_temp():
>> 
>> 	/* Check whether the time interval has elapsed */
>> 	if (!tdata->valid || time_after(jiffies, tdata->last_updated + HZ)) {
>> 
>> to just:
>> 
>> 	/* Always update */
>> 	if (1) {
>> 
>> This will let you read the value as frequently as you want. Or if you
>> want to keep a safety guard, you can simply change HZ to HZ/10 (read
>> every 0.1 s max) or HZ/100 (read every 0.01 s max.)
>> 
>>> 2) Does the lm-sensor package use the correct value of Tjmax (the temp value at which PROCHOT signal goes high) automatically based on the processor brand and type? I noticed that the Tjmax \x100C is used in core temp.c, but the 22nm intel processor that I am working on has Tjmax of 105C. Do I need to change it myself?
>> 
>> We have a complex heuristic to figure out the right TjMax value, but
>> Intel made it such a mess that it is very difficult. So it really is
>> best effort. If the driver has TjMax wrong for your CPU, please let us
>> know what kernel version you are running, what CPU model you have is
>> and where you found the correct TjMax value.
>> 
> The 22nm processors should all report it correctly from CPU registers,
> so this is really odd. My IvyBridge CPU (i7-3770K) reports it correctly.
> I am quite sure the Haswell did too, but I am some 12,000 miles away
> from it and the system is shut down, so we'll have to wait for another
> 10 days or so until I can check it.
> 
> So, yes, we'll definitely need the CPU model and kernel version.
> 
> Guenter
> 
>> Then you can either try to fix it in the driver itself, or adjust it
>> from userspace by adding this to /etc/sensors.d/coretemp.conf:
>> 
>> chip "coretemp-*"
>> 
>>    compute temp1 @+5, @-5
>>    compute temp2 @+5, @-5
>>    compute temp3 @+5, @-5
>>    compute temp4 @+5, @-5
>>    compute temp5 @+5, @-5
>> 
>> (Adjust for your own case...)
>> 
>> Hope that helps,
>> -- 
>> 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
>> 


_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

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

* Re: [lm-sensors] Few queries about lm-sensors and core temp.c
  2013-07-19 15:28 [lm-sensors] Few queries about lm-sensors and core temp.c Kapil Dev
                   ` (2 preceding siblings ...)
  2013-07-22  3:23 ` Kapil Dev
@ 2013-07-22  7:49 ` Jean Delvare
  2013-07-22  9:27 ` Guenter Roeck
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Jean Delvare @ 2013-07-22  7:49 UTC (permalink / raw)
  To: lm-sensors

Hi Kapil,

On Sun, 21 Jul 2013 23:23:00 -0400, Kapil Dev wrote:
> I am using 2.6.39-020639-generic  kernel and I am running Ubuntu 9.04. I couldn't find /etc/sensors.d/coretemp.config file.

It's OK and expected, just create the file. Every file
under /etc/sensors.d will be taken into account by libsensors.

> I am using 3450S intel i5 processor, which has Tjmax of 103C (sorry for the typo in my original email), based on http://users.sosdg.org/~qiyong/lxr/source/Documentation/hwmon/coretemp?a=um . 

Note that this is our own driver documentation file. We did out best to
make it accurate but it is not an official reference for TjMax values.

> I found that for some processors, IA32_TEMPERATURE_TARGET MSR has the Tjmax value; I assume that the coretemp.c tries to read this register and if it doesn't succeed then, it uses the heuristic value.

Yes, exactly.

> Few other doubts I have are:
> 
> 1) For a multi-core processor, are there separate Tjmax for each core or just 1 Tjmax value per processor?

The Intel datasheet was not very clear on this, so the driver makes no
assumption and reads IA32_TEMPERATURE_TARGET on each core. However in
practice I have never seen a CPU with different TjMax values for the
different cores.

> 2) Inside coretemp.c  file, the temperature is read in milli-degree C, and multiplied by 1000 to get C value.
> Does it mean that DTS value stored in IA32_ThERMAL_STATUS MSR is in milli-degrees? I also notice that there are only  7 bits assigned to DTS value, which would not be sufficient to cover the wide range of temperate values if it is in mill-degree C. Am I missing something here?

It's the other way around actually, the value is in (pseudo) degrees C
in the MSR and milli-degrees C in sysfs.

-- 
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

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

* Re: [lm-sensors] Few queries about lm-sensors and core temp.c
  2013-07-19 15:28 [lm-sensors] Few queries about lm-sensors and core temp.c Kapil Dev
                   ` (3 preceding siblings ...)
  2013-07-22  7:49 ` Jean Delvare
@ 2013-07-22  9:27 ` Guenter Roeck
  2013-07-22 15:11 ` Kapil Dev
  2013-07-23 10:58 ` Jean Delvare
  6 siblings, 0 replies; 8+ messages in thread
From: Guenter Roeck @ 2013-07-22  9:27 UTC (permalink / raw)
  To: lm-sensors

On Sun, Jul 21, 2013 at 11:23:00PM -0400, Kapil Dev wrote:
> Hi,
> 
> I just realized that I just replied to Jean, and didn't reply-all previously.
> 
> I am using 2.6.39-020639-generic  kernel and I am running Ubuntu 9.04. I couldn't find /etc/sensors.d/coretemp.config file. I am using 3450S intel i5 processor, which has Tjmax of 103C (sorry for the typo in my original email), based on http://users.sosdg.org/~qiyong/lxr/source/Documentation/hwmon/coretemp?a=um . 
> 
> I found that for some processors, IA32_TEMPERATURE_TARGET MSR has the Tjmax value; I assume that the coretemp.c tries to read this register and if it doesn't succeed then, it uses the heuristic value. 

Might as well be that the kernel version is too old. Can you update to a more
recent kernel ?

Guenter

> Few other doubts I have are:
> 
> 1) For a multi-core processor, are there separate Tjmax for each core or just 1 Tjmax value per processor?
> 2) Inside coretemp.c  file, the temperature is read in milli-degree C, and multiplied by 1000 to get C value. Does it mean that DTS value stored in IA32_ThERMAL_STATUS MSR is in milli-degrees? I also notice that there are only  7 bits assigned to DTS value, which would not be sufficient to cover the wide range of temperate values if it is in mill-degree C. Am I missing something here?
> 
> 
> Thanks,
> Kapil
> 
> On Jul 21, 2013, at 3:40 AM, Guenter Roeck <linux@roeck-us.net> wrote:
> 
> > On Fri, Jul 19, 2013 at 05:47:24PM +0200, Jean Delvare wrote:
> >> Hi Kapil,
> >> 
> >> On Fri, 19 Jul 2013 11:28:28 -0400, Kapil Dev wrote:
> >>> I have a couple of queries about lm-sensors package.
> >>> 
> >>> 1) The FAQ section in chapter-1 says that the drivers update their values every 1 sec. I am aware of the fact that reading the sensors more frequently will affect the performance as it is intrusive to CPU to read an MSR, but I need to read the core-temperature values at faster rate for a project. Would you tell me what changes I should make to read the sensors faster? In particular, I want to read the core temperature (I believe it  is done in coretemp.c through IA32_THERMAL_STATUS MSR register). coretemp.c seems to have "jiffy" as time stamp, if I change it in the coretemp.c, will it work? Or, is there any other file that needs to be changed during kernel-compilation?
> >> 
> >> Just change this condition in show_temp():
> >> 
> >> 	/* Check whether the time interval has elapsed */
> >> 	if (!tdata->valid || time_after(jiffies, tdata->last_updated + HZ)) {
> >> 
> >> to just:
> >> 
> >> 	/* Always update */
> >> 	if (1) {
> >> 
> >> This will let you read the value as frequently as you want. Or if you
> >> want to keep a safety guard, you can simply change HZ to HZ/10 (read
> >> every 0.1 s max) or HZ/100 (read every 0.01 s max.)
> >> 
> >>> 2) Does the lm-sensor package use the correct value of Tjmax (the temp value at which PROCHOT signal goes high) automatically based on the processor brand and type? I noticed that the Tjmax \x100C is used in core temp.c, but the 22nm intel processor that I am working on has Tjmax of 105C. Do I need to change it myself?
> >> 
> >> We have a complex heuristic to figure out the right TjMax value, but
> >> Intel made it such a mess that it is very difficult. So it really is
> >> best effort. If the driver has TjMax wrong for your CPU, please let us
> >> know what kernel version you are running, what CPU model you have is
> >> and where you found the correct TjMax value.
> >> 
> > The 22nm processors should all report it correctly from CPU registers,
> > so this is really odd. My IvyBridge CPU (i7-3770K) reports it correctly.
> > I am quite sure the Haswell did too, but I am some 12,000 miles away
> > from it and the system is shut down, so we'll have to wait for another
> > 10 days or so until I can check it.
> > 
> > So, yes, we'll definitely need the CPU model and kernel version.
> > 
> > Guenter
> > 
> >> Then you can either try to fix it in the driver itself, or adjust it
> >> from userspace by adding this to /etc/sensors.d/coretemp.conf:
> >> 
> >> chip "coretemp-*"
> >> 
> >>    compute temp1 @+5, @-5
> >>    compute temp2 @+5, @-5
> >>    compute temp3 @+5, @-5
> >>    compute temp4 @+5, @-5
> >>    compute temp5 @+5, @-5
> >> 
> >> (Adjust for your own case...)
> >> 
> >> Hope that helps,
> >> -- 
> >> 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
> >> 
> 
> 

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

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

* Re: [lm-sensors] Few queries about lm-sensors and core temp.c
  2013-07-19 15:28 [lm-sensors] Few queries about lm-sensors and core temp.c Kapil Dev
                   ` (4 preceding siblings ...)
  2013-07-22  9:27 ` Guenter Roeck
@ 2013-07-22 15:11 ` Kapil Dev
  2013-07-23 10:58 ` Jean Delvare
  6 siblings, 0 replies; 8+ messages in thread
From: Kapil Dev @ 2013-07-22 15:11 UTC (permalink / raw)
  To: lm-sensors

Thanks a lot guys. You have been greatly helpful. I will try different things that you have suggested.

Best,
Kapil

On Jul 22, 2013, at 5:27 AM, Guenter Roeck <linux@roeck-us.net> wrote:

> On Sun, Jul 21, 2013 at 11:23:00PM -0400, Kapil Dev wrote:
>> Hi,
>> 
>> I just realized that I just replied to Jean, and didn't reply-all previously.
>> 
>> I am using 2.6.39-020639-generic  kernel and I am running Ubuntu 9.04. I couldn't find /etc/sensors.d/coretemp.config file. I am using 3450S intel i5 processor, which has Tjmax of 103C (sorry for the typo in my original email), based on http://users.sosdg.org/~qiyong/lxr/source/Documentation/hwmon/coretemp?a=um . 
>> 
>> I found that for some processors, IA32_TEMPERATURE_TARGET MSR has the Tjmax value; I assume that the coretemp.c tries to read this register and if it doesn't succeed then, it uses the heuristic value. 
> 
> Might as well be that the kernel version is too old. Can you update to a more
> recent kernel ?
> 
> Guenter
> 
>> Few other doubts I have are:
>> 
>> 1) For a multi-core processor, are there separate Tjmax for each core or just 1 Tjmax value per processor?
>> 2) Inside coretemp.c  file, the temperature is read in milli-degree C, and multiplied by 1000 to get C value. Does it mean that DTS value stored in IA32_ThERMAL_STATUS MSR is in milli-degrees? I also notice that there are only  7 bits assigned to DTS value, which would not be sufficient to cover the wide range of temperate values if it is in mill-degree C. Am I missing something here?
>> 
>> 
>> Thanks,
>> Kapil
>> 
>> On Jul 21, 2013, at 3:40 AM, Guenter Roeck <linux@roeck-us.net> wrote:
>> 
>>> On Fri, Jul 19, 2013 at 05:47:24PM +0200, Jean Delvare wrote:
>>>> Hi Kapil,
>>>> 
>>>> On Fri, 19 Jul 2013 11:28:28 -0400, Kapil Dev wrote:
>>>>> I have a couple of queries about lm-sensors package.
>>>>> 
>>>>> 1) The FAQ section in chapter-1 says that the drivers update their values every 1 sec. I am aware of the fact that reading the sensors more frequently will affect the performance as it is intrusive to CPU to read an MSR, but I need to read the core-temperature values at faster rate for a project. Would you tell me what changes I should make to read the sensors faster? In particular, I want to read the core temperature (I believe it  is done in coretemp.c through IA32_THERMAL_STATUS MSR register). coretemp.c seems to have "jiffy" as time stamp, if I change it in the coretemp.c, will it work? Or, is there any other file that needs to be changed during kernel-compilation?
>>>> 
>>>> Just change this condition in show_temp():
>>>> 
>>>> 	/* Check whether the time interval has elapsed */
>>>> 	if (!tdata->valid || time_after(jiffies, tdata->last_updated + HZ)) {
>>>> 
>>>> to just:
>>>> 
>>>> 	/* Always update */
>>>> 	if (1) {
>>>> 
>>>> This will let you read the value as frequently as you want. Or if you
>>>> want to keep a safety guard, you can simply change HZ to HZ/10 (read
>>>> every 0.1 s max) or HZ/100 (read every 0.01 s max.)
>>>> 
>>>>> 2) Does the lm-sensor package use the correct value of Tjmax (the temp value at which PROCHOT signal goes high) automatically based on the processor brand and type? I noticed that the Tjmax \x100C is used in core temp.c, but the 22nm intel processor that I am working on has Tjmax of 105C. Do I need to change it myself?
>>>> 
>>>> We have a complex heuristic to figure out the right TjMax value, but
>>>> Intel made it such a mess that it is very difficult. So it really is
>>>> best effort. If the driver has TjMax wrong for your CPU, please let us
>>>> know what kernel version you are running, what CPU model you have is
>>>> and where you found the correct TjMax value.
>>>> 
>>> The 22nm processors should all report it correctly from CPU registers,
>>> so this is really odd. My IvyBridge CPU (i7-3770K) reports it correctly.
>>> I am quite sure the Haswell did too, but I am some 12,000 miles away
>>> from it and the system is shut down, so we'll have to wait for another
>>> 10 days or so until I can check it.
>>> 
>>> So, yes, we'll definitely need the CPU model and kernel version.
>>> 
>>> Guenter
>>> 
>>>> Then you can either try to fix it in the driver itself, or adjust it
>>>> from userspace by adding this to /etc/sensors.d/coretemp.conf:
>>>> 
>>>> chip "coretemp-*"
>>>> 
>>>>   compute temp1 @+5, @-5
>>>>   compute temp2 @+5, @-5
>>>>   compute temp3 @+5, @-5
>>>>   compute temp4 @+5, @-5
>>>>   compute temp5 @+5, @-5
>>>> 
>>>> (Adjust for your own case...)
>>>> 
>>>> Hope that helps,
>>>> -- 
>>>> 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
>>>> 
>> 
>> 


_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

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

* Re: [lm-sensors] Few queries about lm-sensors and core temp.c
  2013-07-19 15:28 [lm-sensors] Few queries about lm-sensors and core temp.c Kapil Dev
                   ` (5 preceding siblings ...)
  2013-07-22 15:11 ` Kapil Dev
@ 2013-07-23 10:58 ` Jean Delvare
  6 siblings, 0 replies; 8+ messages in thread
From: Jean Delvare @ 2013-07-23 10:58 UTC (permalink / raw)
  To: lm-sensors

Hi Kapil, Guenter,

On Mon, 22 Jul 2013 02:27:56 -0700, Guenter Roeck wrote:
> On Sun, Jul 21, 2013 at 11:23:00PM -0400, Kapil Dev wrote:
> > I am using 2.6.39-020639-generic  kernel and I am running Ubuntu 9.04. I couldn't find /etc/sensors.d/coretemp.config file. I am using 3450S intel i5 processor, which has Tjmax of 103C (sorry for the typo in my original email), based on http://users.sosdg.org/~qiyong/lxr/source/Documentation/hwmon/coretemp?a=um . 
> > 
> > I found that for some processors, IA32_TEMPERATURE_TARGET MSR has the Tjmax value; I assume that the coretemp.c tries to read this register and if it doesn't succeed then, it uses the heuristic value. 
> 
> Might as well be that the kernel version is too old. Can you update to a more
> recent kernel ?

He doesn't have to update the whole kernel, just building an up-to-date
coretemp driver would do. I have made the kernel v3.10 version of the
coretemp driver available at:

  http://khali.linux-fr.org/devel/lm-sensors/drivers/coretemp/

Instructions at:

  http://khali.linux-fr.org/devel/lm-sensors/drivers/INSTALL

-- 
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

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

end of thread, other threads:[~2013-07-23 10:58 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-19 15:28 [lm-sensors] Few queries about lm-sensors and core temp.c Kapil Dev
2013-07-19 15:47 ` Jean Delvare
2013-07-21  7:40 ` Guenter Roeck
2013-07-22  3:23 ` Kapil Dev
2013-07-22  7:49 ` Jean Delvare
2013-07-22  9:27 ` Guenter Roeck
2013-07-22 15:11 ` Kapil Dev
2013-07-23 10:58 ` Jean Delvare

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.