trivial: doc: hpfall: reduce risk that hpfall can do harm
authorChristian Thaeter <ct@pipapo.org>
Sat, 25 Jul 2009 18:55:15 +0000 (20:55 +0200)
committerJiri Kosina <jkosina@suse.cz>
Mon, 21 Sep 2009 13:14:57 +0000 (15:14 +0200)
Improve the example code to be at least useable, as in not causing
harm (as shown below). Code can still be improved further, but this
adds some basic safeguards.

1. hpfall *MUST* mlockall(MCL_CURRENT|MCL_FUTURE); itself!
Since the Program sits and waits most of the time it becomes very likely
swapped out. If it gets woken up when the laptop drops from the table
while it is swapped out it actually triggers harddrive activity!

2. Daemonize hpfall using 'daemon(0,0)' (quick and dirty).

3. Give hpfall realtime priority.
Should give a chance that it has less latency when woken up.

Signed-off-by: Christian Thaeter <ct@pipapo.org>
Signed-off-by: Frans Pop <elendil@planet.nl>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>

No differences found