Re: [Hdaps-devel] [PATCH] hdaps - switch to using input-polldev

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

 



On 5/25/07, Dmitry Torokhov <[email protected]> wrote:
HWMON: hdaps - convert to use input-polldev.

Switch to using input-polldev skeleton instead of implementing
polling loop by itself. This also fixes problem with trylock
on a mutex in atomic context.

Signed-off-by: Dmitry Torokhov <[email protected]>

There's a couple of inherent problems with this patch (now in -mm).

First, the hdaps driver regularly polls the embedded controller, which
in turns regularly polls the hardware. If the two polling rates differ
or fluctuate, we lose events. AFAICT, the delayed workqueues used by
input-polldev can get very laggy under load. That's very bad for
sensitive clients like hdapsd (the hard disk shock protection daemon).

Second, this is incompatible with the much-needed addition of a 2nd
input device relying on the same data. The existing hdaps input device
does "joystick emulation", i.e., reports values after calibration and
fuzzing. Userspace programs that need the raw data, like hdapsd,
currently have to poll the sysfs attribute, which is inefficient,
lag-prone and induces unnecessary interrupts on tickless sytems. To
solve this we'll have to add a 2nd input device to hdaps, for
reporting the raw accelerometer data. (Michael Riepe and me are now
working on such a patch.) But these two input devices need to share
their polling of the underlying EC hardware, and this is impossible
using input-polldev.

Since this patch will  degrade accuracy and will eventually be
reverted anyway, I suggest retracting it.

As for the mutex in atomic context issue, isn't it best addressed by
making mutex_trylock() do the sensible thing in softirqt?

 Shem
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux