From: Roland Dreier <roland@topspin.com>
To: Vicente Feito <vicente.feito@gmail.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: workqueue - process context
Date: Fri, 18 Feb 2005 21:03:58 -0800 [thread overview]
Message-ID: <52ekfdta2p.fsf@topspin.com> (raw)
In-Reply-To: <200502190202.08782.vicente.feito@gmail.com> (Vicente Feito's message of "Sat, 19 Feb 2005 02:02:08 +0000")
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
next prev parent reply other threads:[~2005-02-19 5:04 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-19 1:48 workqueue - process context Vicente Feito
2005-02-19 4:57 ` Roland Dreier
2005-02-19 2:02 ` Vicente Feito
2005-02-19 5:03 ` Roland Dreier [this message]
2005-02-19 14:31 ` Rene Herman
2005-02-19 16:19 ` Roland Dreier
2005-02-19 16:52 ` Rene Herman
-- strict thread matches above, loose matches on Subject: below --
2005-02-19 2:38 Vicente Feito
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52ekfdta2p.fsf@topspin.com \
--to=roland@topspin.com \
--cc=linux-kernel@vger.kernel.org \
--cc=vicente.feito@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox