[lkml]   [2005]   [Feb]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: workqueue - process context
        Vicente> What if I need the module to be unloaded cause It's
    Vicente> mutually exclusive with another module to be loaded, and
    Vicente> I still need to run the works in a workqueue time before
    Vicente> that happens? That's completely out of the picture?cause
    Vicente> that might be useful.

    That doesn't sound like a good idea. For one thing, how does the
    second module get the workqueue pointer from the first module? The
    simplest solution would be for each module to create and destroy its
    own workqueue. However, if you really need a shared workqueue for
    some reason, then have a simple third module that can remain loaded
    and have it manage the workqueue for both of your other modules.

    Roland> By the way, the module (or any code calling
    Roland> destroy_workqueue()) must make sure that it has race
    Roland> conditions that might result in work being submitted to
    Roland> the queue while it is being destroyed.

    Vicente> yes, I think flushing is enough, is it?

    Usually, but you have to be extra-careful if you have any work
    functions that might resubmit themselves.

    - Roland

    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 14:10    [W:0.021 / U:38.160 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site