lkml.org 
[lkml]   [2005]   [Aug]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] IBM HDAPS accelerometer driver.


On Mon, 29 Aug 2005, Pavel Machek wrote:

> Hi!
>
> > >>I think he doesn't need to export it at all and he should write code to
> > >>park and disable hard disk instead.
> > >>(in userspace it's unsolvable --- i.e. you can't enable hard disk when
> > >>detected stable condition if the daemon is swapped out on that hard disk)
> > >
> > >man mlockall() :-).
> >
> > You also must not use any syscall that allocates even temporary memory in
> > kernel (select, poll, many others ...) or that waits on semaphore that
> > might be held while allocating memory (i.e. audit and rewrite ide ioctl
> > path).
>
> Kernel module would have exactly same problem.

It has control of its memory allocations.

> > And you need extra flags to protect the daemon from being killed at
> > shutdown or blocked at suspend.
>
> Why?

Because the disk must be unlocked even if the laptop falls down while
a suspension or shutdown are under way.
And it should work until the heads are parked anyway.

Regards
Oliver

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

\
 
 \ /
  Last update: 2005-08-29 10:57    [from the cache]
©2003-2011 Jasper Spaans