On Tue, 22 May 2007, Dmitry Torokhov wrote: > [Sorry, cut away too much in original reply...] > On 5/22/07, Henrique de Moraes Holschuh <hmh@xxxxxxxxxx> wrote: > > On Tue, 22 May 2007, Dmitry Torokhov wrote: > > > > > > Notification to where? The driver? Userspace? Does delay in status > > > reading of ~0.5 sec matter? You are concerned with the load on the EC > > > > To the driver, and yes it matters. > > > > > caused by constant polling but are you OK with apllications readig > > > sysfs attributes constantly (rfkill attributs are exported 0644 or > > > 0444 so anyone could read them)? Do you want the driver to do > > > > No, I am not. And I am so going to rate-limit the entire thinkpad-acpi > > sysfs interface eventually, you can count on it. And rfkill isn't the > > reason it will be done, either. Userspace braindamage is. > > So how are you going to implement rate limiting and still give user > guarantee that he will see the most current hardware state? Oportunistic polling. If I have not just done a poll on that particular set of registers, I will poll it immediately. Most sysfs interfaces (hwmon, backlight, private sysfs attributes) allow me to do it. How often a register should be polled depends a lot. Some easy examples: For temperatures, it is useless to do so more than once every 5s. For fans, more than once every second. For these, I will return cached results. Some other attributes (e.g. hotkey mask) will be rate-limited in a different way. Ask for it too often in a short time period, and the driver will sleep for a while instead of immediately polling and returning the data. You *will* get fresh data, but you may have to wait until the driver returns with it. -- "One disk to rule them all, One disk to find them. One disk to bring them all and in the darkness grind them. In the Land of Redmond where the shadows lie." -- The Silicon Valley Tarot Henrique Holschuh ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ ibm-acpi-devel mailing list ibm-acpi-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.sourceforge.net/lists/listinfo/ibm-acpi-devel