lkml.org 
[lkml]   [2010]   [Oct]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 2/2] scsi: don't use execute_in_process_context()
From
On Tue, 19 Oct 2010 14:58:04 +0200
Tejun Heo <tj@kernel.org> wrote:

> SCSI is the only subsystem which uses execute_in_process_context().
> With the recent workqueue updates, unconditionally using work wouldn't
> cause deadlocks around execution resources and the two places where
> SCSI uses them are cold paths where using work unconditionally
> wouldn't make any difference. Drop execute_in_process_context() and
> use work directly.
>
> * scsi_device->ew is replaced with release_work. scsi_target->ew is
> replaced with reap_work.
>
> * Both works are initialized with the respective release/reap function
> during device/target init. scsi_target_reap_usercontext() is moved
> upwards to avoid needing forward declaration.
>
> * scsi_alloc_target() now explicitly flushes the reap_work of the
> found dying target before putting it instead of depending on
> flush_scheduled_work().
>
> This is in preparation of deprecation of flush_scheduled_work() and
> execute_in_process_context().
>
> Signed-off-by: Tejun Heo <tj@kernel.org>
> ---
> drivers/scsi/scsi_scan.c | 26 +++++++++++++-------------
> drivers/scsi/scsi_sysfs.c | 8 +++++---
> include/scsi/scsi_device.h | 4 ++--
> 3 files changed, 20 insertions(+), 18 deletions(-)

Looks fine to me.


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