[lkml]   [2002]   [Nov]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: Module Refcount & Stuff mini-FAQ
    In message <> you write:
    > Hi!
    > > Q: How does the module remove code work?
    > > A: It stops the machine by scheduling threads for every other CPU,
    > > then they all disable interrupts. At this stage we know that noone
    > > is in try_module_get(), so we can reliably read the counter. If
    > > zero, or the rmmod user specified --wait, we set the live flag to
    > > false. After this, the reference count should not increase, and
    > > each module_put() will wake us up, so we can check the counter
    > > again.
    > Where is this implemented? I guess I need this for swsusp...

    I'm not so sure, but it's worth a look. Look for stop_refcounts() in
    module.c. BTW, I call this a "bogolock".

    Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 13:31    [W:0.018 / U:88.296 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site