Skip to content
Commit 2bace8b9 authored by Christian Thaeter's avatar Christian Thaeter Committed by Jiri Kosina
Browse files

trivial: doc: hpfall: reduce risk that hpfall can do harm



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: default avatarChristian Thaeter <ct@pipapo.org>
Signed-off-by: default avatarFrans Pop <elendil@planet.nl>
Acked-by: default avatarPavel Machek <pavel@ucw.cz>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent 8103b5cc
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment