Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1699078

Re: blk_mq_sched_insert_request: inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage

From Brian King <brking@linux.vnet.ibm.com>
Newsgroups linux.kernel
Subject Re: blk_mq_sched_insert_request: inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage
Date 2017-07-28 22:50 +0200
Message-ID <u8kmR-er-5@gated-at.bofh.it> (permalink)
References (2 earlier) <u7SgW-7jy-5@gated-at.bofh.it> <u7TPI-8oO-19@gated-at.bofh.it> <u86MV-8s7-1@gated-at.bofh.it> <u8er8-4Rs-19@gated-at.bofh.it> <u8kmR-er-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 07/28/2017 10:17 AM, Brian J King wrote:
> Jens Axboe <axboe@kernel.dk> wrote on 07/28/2017 09:25:48 AM:
> 
>> Can you try the below fix? Should be more palatable than the previous
>> one. Brian, maybe you can take a look at the IRQ issue mentioned above?

Michael,

Does this address the issue you are seeing?

Thanks,

Brian

8<

Index: linux-2.6.git/drivers/scsi/ipr.c
===================================================================
--- linux-2.6.git.orig/drivers/scsi/ipr.c
+++ linux-2.6.git/drivers/scsi/ipr.c
@@ -3351,6 +3351,16 @@ static void ipr_worker_thread(struct wor
 		return;
 	}
 
+	if (ioa_cfg->scsi_unblock) {
+		ioa_cfg->scsi_unblock = 0;
+		ioa_cfg->scsi_blocked = 0;
+		spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags);
+		scsi_unblock_requests(ioa_cfg->host);
+		spin_lock_irqsave(ioa_cfg->host->host_lock, lock_flags);
+		if (ioa_cfg->scsi_blocked)
+			scsi_block_requests(ioa_cfg->host);
+	}
+
 	if (!ioa_cfg->scan_enabled) {
 		spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags);
 		return;
@@ -7211,9 +7221,8 @@ static int ipr_ioa_bringdown_done(struct
 	ENTER;
 	if (!ioa_cfg->hrrq[IPR_INIT_HRRQ].removing_ioa) {
 		ipr_trace;
-		spin_unlock_irq(ioa_cfg->host->host_lock);
-		scsi_unblock_requests(ioa_cfg->host);
-		spin_lock_irq(ioa_cfg->host->host_lock);
+		ioa_cfg->scsi_unblock = 1;
+		schedule_work(&ioa_cfg->work_q);
 	}
 
 	ioa_cfg->in_reset_reload = 0;
@@ -7287,13 +7296,7 @@ static int ipr_ioa_reset_done(struct ipr
 	list_add_tail(&ipr_cmd->queue, &ipr_cmd->hrrq->hrrq_free_q);
 	wake_up_all(&ioa_cfg->reset_wait_q);
 
-	spin_unlock(ioa_cfg->host->host_lock);
-	scsi_unblock_requests(ioa_cfg->host);
-	spin_lock(ioa_cfg->host->host_lock);
-
-	if (!ioa_cfg->hrrq[IPR_INIT_HRRQ].allow_cmds)
-		scsi_block_requests(ioa_cfg->host);
-
+	ioa_cfg->scsi_unblock = 1;
 	schedule_work(&ioa_cfg->work_q);
 	LEAVE;
 	return IPR_RC_JOB_RETURN;
@@ -9249,8 +9252,11 @@ static void _ipr_initiate_ioa_reset(stru
 		spin_unlock(&ioa_cfg->hrrq[i]._lock);
 	}
 	wmb();
-	if (!ioa_cfg->hrrq[IPR_INIT_HRRQ].removing_ioa)
+	if (!ioa_cfg->hrrq[IPR_INIT_HRRQ].removing_ioa) {
+		ioa_cfg->scsi_unblock = 0;
+		ioa_cfg->scsi_blocked = 1;
 		scsi_block_requests(ioa_cfg->host);
+	}
 
 	ipr_cmd = ipr_get_free_ipr_cmnd(ioa_cfg);
 	ioa_cfg->reset_cmd = ipr_cmd;
@@ -9306,9 +9312,8 @@ static void ipr_initiate_ioa_reset(struc
 			wake_up_all(&ioa_cfg->reset_wait_q);
 
 			if (!ioa_cfg->hrrq[IPR_INIT_HRRQ].removing_ioa) {
-				spin_unlock_irq(ioa_cfg->host->host_lock);
-				scsi_unblock_requests(ioa_cfg->host);
-				spin_lock_irq(ioa_cfg->host->host_lock);
+				ioa_cfg->scsi_unblock = 1;
+				schedule_work(&ioa_cfg->work_q);
 			}
 			return;
 		} else {
Index: linux-2.6.git/drivers/scsi/ipr.h
===================================================================
--- linux-2.6.git.orig/drivers/scsi/ipr.h
+++ linux-2.6.git/drivers/scsi/ipr.h
@@ -1488,6 +1488,8 @@ struct ipr_ioa_cfg {
 	u8 cfg_locked:1;
 	u8 clear_isr:1;
 	u8 probe_done:1;
+	u8 scsi_unblock:1;
+	u8 scsi_blocked:1;
 
 	u8 revid;
 

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

blk_mq_sched_insert_request: inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage Michael Ellerman <mpe@ellerman.id.au> - 2017-07-27 07:20 +0200
  Re: blk_mq_sched_insert_request: inconsistent {SOFTIRQ-ON-W} ->  {IN-SOFTIRQ-W} usage Jens Axboe <axboe@kernel.dk> - 2017-07-27 16:10 +0200
    Re: blk_mq_sched_insert_request: inconsistent {SOFTIRQ-ON-W} ->  {IN-SOFTIRQ-W} usage Bart Van Assche <Bart.VanAssche@wdc.com> - 2017-07-27 16:50 +0200
      Re: blk_mq_sched_insert_request: inconsistent {SOFTIRQ-ON-W} ->  {IN-SOFTIRQ-W} usage Jens Axboe <axboe@kernel.dk> - 2017-07-27 18:30 +0200
        Re: blk_mq_sched_insert_request: inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage Michael Ellerman <mpe@ellerman.id.au> - 2017-07-28 08:20 +0200
          Re: blk_mq_sched_insert_request: inconsistent {SOFTIRQ-ON-W} ->  {IN-SOFTIRQ-W} usage Jens Axboe <axboe@kernel.dk> - 2017-07-28 16:30 +0200
            Re: blk_mq_sched_insert_request: inconsistent {SOFTIRQ-ON-W} ->  {IN-SOFTIRQ-W} usage Bart Van Assche <Bart.VanAssche@wdc.com> - 2017-07-28 17:20 +0200
              Re: blk_mq_sched_insert_request: inconsistent {SOFTIRQ-ON-W} ->  {IN-SOFTIRQ-W} usage Jens Axboe <axboe@kernel.dk> - 2017-07-28 17:20 +0200
            Re: blk_mq_sched_insert_request: inconsistent {SOFTIRQ-ON-W} ->  {IN-SOFTIRQ-W} usage Brian King <brking@linux.vnet.ibm.com> - 2017-07-28 22:50 +0200
              Re: blk_mq_sched_insert_request: inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage Michael Ellerman <mpe@ellerman.id.au> - 2017-07-31 14:10 +0200

csiph-web