lkml.org 
[lkml]   [2010]   [Oct]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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


\
 
 \ /
  Last update: 2010-10-12 15:53    [W:0.181 / U:1.268 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site