[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4CB467A3.4010200@kernel.org>
Date: Tue, 12 Oct 2010 15:50:27 +0200
From: Tejun Heo <tj@...nel.org>
To: Stefan Richter <stefanr@...6.in-berlin.de>
CC: linux1394-devel@...ts.sourceforge.net, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] firewire: sbp2: parallelize login/inquiry, reconnect,
and shutdown
Hello,
On 10/11/2010 11:27 PM, Stefan Richter wrote:
>> Hmmm... from glancing the code, there doesn't seem to anything which
>> can guarantee sbp2_release_target/reconnect() are finished before
>> sbp2_cleanup() returns, so the code section might go away with code
>> still running. It seems like the right thing to do here would be
>> using alloc_workqueue(KBUILD_MODNAME, WQ_NON_REENTRANT, 0). Am I
>> missing something?
>
> There are indeed situations where the last module reference was already
> put down before the work is run for the last time. Thanks for the hint.
>
> What is preferable, an own workqueue instance whose destroy_workqueue()
> lets sbp2_cleanup wait for unfinished work, or module ref-counting like
> below?
The best would be flushing the specific works but that isn't possible
when works are used to do the final put. I would go for using a
separate workqueue. With cmwq, each workqueue is much cheaper than
before anyway.
Thanks.
--
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists