[lm-sensors] [PATCH] adt7470: Update sensors periodically via timer to avoid blocking
juergh at gmail.com
Thu Jul 26 17:08:09 CEST 2007
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?
> > 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.
Hmm... Sounds rather complicated. Is there a problem with blocking
apps for that long?
How about forking off a kernel thread instead of using workqueues?
> New patch forthcoming.
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
> -----END PGP SIGNATURE-----
More information about the lm-sensors