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

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

 



On Wed, Jul 25, 2007 at 06:19:22PM -0700, Juerg Haefliger wrote:
> Hi Darrick,
> 
> Why using a workqueue at all? Can't you just run a timer and do the
> update when it expires and restart the timer?

Currently, I use mutexes (and msleep) which require the ability to
sleep.  Timers can't sleep because they are implemented as a softirq.
That said, I think the solution is to have two workqueue items--one to
start the read and another to run after the temperature sensors have
been read.  The delays for both can be handled via schedule_delayed_work().
It could be done with two timers and spinlocks, but ... yuck.

New patch forthcoming.

--D
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20070726/b93c1e51/attachment.bin 


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

  Powered by Linux