Re: [patch] IBM HDAPS accelerometer driver.

From: Oliver Neukum (neukum_at_fachschaft.cup.uni-muenchen.de)
Date: 08/29/05

  • Next message: Pavel Machek: "Re: [patch] IBM HDAPS accelerometer driver."
    Date:	Mon, 29 Aug 2005 10:59:47 +0200 (CEST)
    To: Pavel Machek <pavel@suse.cz>
    
    

    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/


  • Next message: Pavel Machek: "Re: [patch] IBM HDAPS accelerometer driver."

    Relevant Pages

    • Re: [PATCH] ohci1394: dma_pool_destroy while in_atomic() && irqs_disabled()
      ... > I disagree because the impact of this bug is small. ... I have to agree that the impact is small even for the people using ISO recv - ... OTOH, if it allocates so much of memory while irqs disabled and holding locks, ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [patch] IBM HDAPS accelerometer driver.
      ... > You also must not use any syscall that allocates even temporary memory in ... > might be held while allocating memory (i.e. audit and rewrite ide ioctl ... > the timeout drop it). ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: p = kmalloc(sizeof(*p), )
      ... some generic type not the full space for the more complex object ... Other good practice in many cases is a single routine which allocates ... That removes duplicate initialisers, stops people forgetting to ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Sock leak in net/ipv4/af_inet.c - 2.4.26
      ... It allocates from the sock slab using sk_alloc, ... sk_freeis never called on these sock structs. ... around the sk_alloc/sk_free calls to track allocations. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: can device drivers return non-ram via vm_ops->nopage?
      ... >> Remember that we're fond of telling driver writers to use scatter gather ... > anything else that doesn't use any IOTLB and just allocates a chunk of ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)