lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 30 Jul 2006 14:33:01 +0300
From:	"Shem Multinymous" <multinymous@...il.com>
To:	"Pavel Machek" <pavel@...e.cz>
Cc:	"Vojtech Pavlik" <vojtech@...e.cz>,
	"Brown, Len" <len.brown@...el.com>,
	"Matthew Garrett" <mjg59@...f.ucam.org>,
	"kernel list" <linux-kernel@...r.kernel.org>,
	linux-thinkpad@...ux-thinkpad.org, linux-acpi@...r.kernel.org,
	"Greg KH" <greg@...ah.com>, "Jean Delvare" <khali@...ux-fr.org>
Subject: Re: Generic battery interface

On 7/30/06, Shem Multinymous <multinymous@...il.com> wrote:
> 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).

No, wait, the explicit two-parameter version is far superior.

First, it makes it easier to poll multiple attributes. How'd you do
that with the one-parameter version, if you need to sleep separately
for each attribute?

Second, it gives the driver (or its sysfs support infrastructure) a
better picture of the future, which it can use to optimize the
hardware query scheduling. No, I don't think anyone will implement
*that* soon, but it's good to have an API that lets us add it later
without affecting userspace.


Is anyone interested in adding this "delayed updates" support to
sysfs, for the benefit of hwmon, tp_smapi and probably numerous other
drivers?
I have some ideas for how to do it so that that per-driver support is
really easy (or even free), but I don't know sysfs well enough to
implement it and don't have the resources.

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ