Re: [NFS] RE: [autofs] multiple servers per automount

From: Tim Hockin (thockin_at_hockin.org)
Date: 10/23/03

  • Next message: Rob: "Re: FEATURE REQUEST: Specific Processor Optimizations on x86 Architecture"
    Date:	Thu, 23 Oct 2003 10:09:42 -0700
    To: Mike Waychison <Michael.Waychison@Sun.COM>
    
    

    On Thu, Oct 23, 2003 at 01:00:57PM -0400, Mike Waychison wrote:
    > >Would a GFP_ATOMIC make a difference to the analysis?
     
    > Yes, sleeping within a spinlock is bad practice because it may
    > eventually deadlock. Pretend that the lock is taken, the call to
    > kmalloc is made, the mm system doesn't have any immidiately free memory
    > and through some flow of execution requires that a some pseudo-block
    > device backed filesystem needs to be mounted -> deadlock. I have no
    > idea if this is currently a likely scenario, however not sleeping within
    > a lock is 'The Right Thing' and should be avoided at all costs.

    it's worse than that. It's forbidden. It's a VERY likely deadlock scenario
    in the general sense, even if this particular case is not. If you need to
    lock something and you need to sleep holding that lock, use a semaphore.

    -- 
    Notice that as computers are becoming easier and easier to use,
    suddenly there's a big market for "Dummies" books.  Cause and effect,
    or merely an ironic juxtaposition of unrelated facts?
    -
    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: Rob: "Re: FEATURE REQUEST: Specific Processor Optimizations on x86 Architecture"

    Relevant Pages

    • [PATCH [RT] 07/14] adaptive real-time lock support
      ... must traditionally be disabled while the lock is held. ... converting what was once a true spinlock into a sleeping lock ... spin when possible, and sleep when necessary. ... * There are pros and cons when deciding between the two basic forms of ...
      (Linux-Kernel)
    • [(RT RFC) PATCH v2 5/9] adaptive real-time lock support
      ... must traditionally be disabled while the lock is held. ... converting what was once a true spinlock into a sleeping lock ... spin when possible, and sleep when necessary. ... * There are pros and cons when deciding between the two basic forms of ...
      (Linux-Kernel)
    • Re: 2.6.9-rc2-mm3
      ... On Fri, 2004-09-24 at 13:52, Paul Fulghum wrote: ... > I am seeing this deadlock also. ... I assume the lock is held to protect this ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: EXT3: problem with copy_from_user inside a transaction
      ... issue with the page lock, maybe Chris you want to elaborate (the above ... We also hidden the above deadlock with prefaulting (but it's far from ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [patch] Add a writer prior lock methord for rwlock
      ... Oliver Neukum wrote: ... >a read lock already held may deadlock. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)