Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Aug 2005 16:03:34 +0200
From:      Fredrik Lindberg <fli+freebsd-hackers@shapeshifter.se>
To:        m.ehinger@ltur.de
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: IBM Active Protection System Approach
Message-ID:  <4309DB36.2090203@shapeshifter.se>
In-Reply-To: <OF828DE8D9.036E29C8-ONC1257065.002A679F-C1257065.002CBB28@gateway-inter.net>
References:  <OF828DE8D9.036E29C8-ONC1257065.002A679F-C1257065.002CBB28@gateway-inter.net>

next in thread | previous in thread | raw e-mail | index | archive | help
m.ehinger@ltur.de wrote:
> Hi,
> 
> what would be the best approach to implement aps on FreeBSD?
> 
> I got an Accelerometer driver which will deliver data. First Version is available at
> https://sourceforge.net/project/showfiles.php?group_id=138242&package_id=160977
> 
> We have to poll the device for information quiet often to detect a possible shock early enough to park disk drive heads.
> What else must be done to prevent a possible data loss?
> 
> There is also an discussion about that concerning linux.
> http://sourceforge.net/mailarchive/forum.php?forum=hdaps-devel
> 
> 
> Would an daemon be sufficient for that? Reaction time? What about an kernel thread?
> 
> Other solutions?
> 
> thanks in advance
> 
> Maik
> 

This is just some wild ideas...

1) Keeping everything inside the kernel. Will yield fast response time,
it will be able to park the head but nothing else. All policy decisions
will have to be made through sysctl(3) or similar interface.

2) Let the kernel do all the polling and send asynchronous events
through devctl(4). A userland daemon (running mlock(2)ed) catches these
events and parks the head (and possibly other actions aswell).
A threshold setting could be avaiable through sysctl(3) so that only
potential dangerous values are reported to the userland daemon.
The biggest problem is probably that devctl(4) only can have one reader,
which at the moment is devd(8). If devd is swapped out the response time
would suffer, which means that devd must run mlock'ed too?.

3) A userland daemon does the polling. Not sure about the response time,
but there will be alot of data transfer between the kernel and userland
which usually is expensive.


	Fredrik Lindberg



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4309DB36.2090203>