Re: [Hdaps-devel] Re: HDAPS, Need to park the head for real

Dave Hansen
2005-08-18T21:30:34Z

On Thu, 2005-08-18 at 17:15 -0400, Adam Goode wrote:
> On Thu, 2005-08-18 at 22:49 +0200, Pavel Machek wrote:
> > Please make it "echo 1 > frozen", then userspace can do "echo 0 > frozen"
> > after five seconds.
>
> What if the code to do "echo 0 > frozen" is swapped out to disk? ;)

In the real world, to be really sure that you're not doing a trip out to
the disk, you'll need a daemon which doesn't do any allocations between
when it's notified and when it does the write to the control file.

In reality, that probably means a statically compiled daemon that
mlock()s itself, and any structures that it will need. It _might_ even
need to keep an open file descriptor on the "frozen" file. Because, in
theory, that file could be written out to the sysfs backing store.

-- Dave