[lm-sensors] [PATCH] adt7470: Update sensors periodically via timer to avoid blocking
Darrick J. Wong
djwong at us.ibm.com
Thu Jul 26 18:57:25 CEST 2007
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.
> 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?
I was trying to use as little resources as possible, and a kernel thread
seemed like overkill for a hwmon device.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
More information about the lm-sensors