Re: Generic battery interface

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

 



On 7/30/06, Pavel Machek <pavel@xxxxxxx> wrote:
OTOH some applications just want more frequent polling than
others. Shem's "first update after N msec" solution looks most
flexible here.

Actually my solution was "any update but no sooner than N msecs". So
you might be getting a readout that's N-1 msecs old, which was
meanwhile cached by the driver. If you care about that, you need to
use interleave those polls with msleep()s; see my recent detailed
post. You'll still doing at most one msleep() per fetched readout,
regardless of how frequently the driver provides them.

Alternatively, we can add an extra parameter to that new
syscall/ioctl: "block until the time is T+N and you have a refresh
that was received from the hardware at time T+M, whichever is later"
(where T is the current time and N>M).

That's semantically equivalent to an msleep(M) followed by the
original delayed_update(N-M),  but will save one timer interrupt per
iteration in some cases (e.g., an event-based hardware data source).

 Shem
-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux