[PATCH] adt7470: Update sensors periodically via timer to avoid blocking

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The trick of not reading the limits was something I did in the LM85 driver...

The read function has two time stamps.  One to trigger reading of the dynamic values if they haven't been read recently (1-2 second) and another that triggers reading the limits but no more often than 10 to 60 seconds.

:v)

-- 
Philip Pokorny, RHCE
Director of Field Engineering 
Penguin Computing  http://www.penguincomputing.com

 -----Original Message-----
From: 	Hans de Goede [mailto:j.w.r.degoede at hhs.nl]
Sent:	Thursday, July 26, 2007 10:01 AM Pacific Standard Time
To:	Darrick J. Wong
Cc:	Vadim Zeitlin; LM Sensors
Subject:	Re:  [PATCH] adt7470: Update sensors periodically via timer to avoid blocking

Darrick J. Wong wrote:
> On Thu, Jul 26, 2007 at 08:08:09AM -0700, Juerg Haefliger wrote:
>> Hi Darrick,
>>
>> I guess I'm not seeing the big picture :-) The problem you're trying
>> to solve is that the reading of the registers takes a long time and
>> needs to be able to sleep?
> 
> Yes, and also that sleeping in the sysfs read function is not desirable.
> Personally, I was fine with that, but Mr. de Goede was concerned about
> it, so I decided to try to fix it.  I admit, the dual-delayed-workqueue
> method is a bit strange, but it solves the reading problem at a slight
> cost of waking up the CPU even if nobody's watching the sensors.
> 

I just read in another thread, that other hwmon drivers suffer from similar 
problems, so I guess userspace will just have to be able to deal with this, and 
the best fix is not to fix it. Sorry to waist everybody's time on this.

Regards,

Hans


p.s.

You could still try to shave some time off by not reading all the limits etc 
each update.


_______________________________________________
lm-sensors mailing list
lm-sensors at lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20070726/b2cada2d/attachment.html 


[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux