lkml.org 
[lkml]   [2004]   [Oct]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] QStor SATA/RAID driver for 2.6.9-rc3
James Bottomley wrote:
> On Fri, 2004-10-08 at 10:38, Mark Lord wrote:
>
>>Can deadlock occur here, since qstor.c is already using schedule_work()
>>as part of it's internal bottom-half handling for abnormal conditions?
>>
>>Eg. hotplug event -> schedule_work -> mid-layer -> queuecommand
>> --> sleep :: interrupt -> schedule_work -> deadlock?
>>
>
>
> Since you wouldn't go straight from schedule_work->mid-layer, I assume
> you mean that when the workqueue thread runs the work?

Yes. The workqueue thread will invoke the mid-layer function,
which will do a queuecommand, which will return to the mid-layer,
which will then SLEEP waiting for the command to complete,
which will sleep that workqueue thread.

As part of the interrupt processing to complete the command in the LLD,
it is possible that schedule_work may be necessary, requiring that
a workqueue thread be run. If this means the same thread that is
already sleeping courtesy of the mid-layer, then we could have a problem.

Comments?
--
Mark Lord
(hdparm keeper & the original "Linux IDE Guy")
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:06    [W:0.093 / U:1.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site