lkml.org 
[lkml]   [2006]   [Feb]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [RFC 4/4] firewire: add mem1394
    Johannes Berg wrote:
    > On Fri, 2006-02-03 at 12:35 +0100, Andy Wingo wrote:
    >>On Thu, 2006-02-02 at 23:43 +0100, Johannes Berg wrote:
    >>
    >>>+ spin_lock(&dev_list_lock);
    >>
    >>Stupid question: are you sure that something coming from an interrupt
    >>handler won't try to grab this lock? For example from a cable unplug?
    >
    > Yes, I'm pretty sure (but I hope some of the firewire experts will chime
    > in) -- but if you unplug or anything the node only goes into 'limbo' and
    > afaict if it is ever cleaned up then that comes from a thread context.

    The lock will only be taken in non-atomic context. In particular, if a
    mem1394 device is to be removed after cable unplug, the code will be run
    by knodemgrd.

    What is more recommendable for mutual exclusion in non-atomic context
    (here also with very low probality of lock contention, given the current
    implementation of ieee1394) --- a mutex or a spinlock?
    --
    Stefan Richter
    -=====-=-==- --=- --=-=
    http://arcgraph.de/sr/
    -
    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: 2006-02-05 14:05    [W:0.034 / U:33.052 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site