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

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

 



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.

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