All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <jens.axboe@oracle.com>
To: "Chen, Kenneth W" <kenneth.w.chen@intel.com>
Cc: Andrew Morton <akpm@osdl.org>,
	linux-kernel@vger.kernel.org,
	Nick Piggin <nickpiggin@yahoo.com.au>,
	Nick Piggin <npiggin@suse.de>
Subject: Re: [PATCH] 4/4 block: explicit plugging
Date: Thu, 4 Jan 2007 15:39:00 +0100	[thread overview]
Message-ID: <20070104143900.GC11203@kernel.dk> (raw)
In-Reply-To: <000001c72f87$5bd8e520$ce34030a@amr.corp.intel.com>

On Wed, Jan 03 2007, Chen, Kenneth W wrote:
> Jens Axboe wrote on Wednesday, January 03, 2007 2:30 PM
> > > We are having some trouble with the patch set that some of our fiber channel
> > > host controller doesn't initialize properly anymore and thus lost whole
> > > bunch of disks (somewhere around 200 disks out of 900) at boot time.
> > > Presumably FC loop initialization command are done through block layer etc.
> > > I haven't looked into the problem closely.
> > > 
> > > Jens, I assume the spin lock bug in __blk_run_queue is fixed in this patch
> > > set?
> > 
> > It is. Are you still seeing problems after the initial mail exchange we
> > had prior to christmas,
> 
> Yes. Not the same kernel panic, but a problem with FC loop reset itself.
> 
> 
> > or are you referencing that initial problem?
> 
> No. we got passed that point thanks for the bug fix patch you give me
> prior to Christmas.  That fixed a kernel panic on boot up.
> 
> 
> > It's not likely to be a block layer issue, more likely the SCSI <->
> > block interactions. If you mail me a new dmesg (if your problem is with
> > the __blk_run_queue() fixups), I can take a look. Otherwise please do
> > test with the __blk_run_queue() fixup, just use the current patchset.
> 
> I will just retake the tip of your plug tree and retest.

That would be great! There's a busy race fixed in the current branch,
make sure that one is included as well.

>From 9174fea2184187209b1f851137bd1612728fae2c Mon Sep 17 00:00:00 2001
From: Jens Axboe <jens.axboe@oracle.com>
Date: Thu, 4 Jan 2007 10:42:33 +0100
Subject: [PATCH] [PATCH] scsi: race in checking sdev->device_busy

Save some code, create a new out label for the path that already checks
the busy count and delays the queue if necessary.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
---
 drivers/scsi/scsi_lib.c |   11 ++++-------
 1 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index fce5e2f..3ffa35d 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -1509,12 +1509,9 @@ static void scsi_request_fn(struct request_queue *q)
 		 * Dispatch the command to the low-level driver.
 		 */
 		rtn = scsi_dispatch_cmd(cmd);
-		if (rtn) {
-			if (sdev->device_busy == 0)
-				blk_delay_queue(q, SCSI_QUEUE_DELAY);
-			goto out_nolock;
-		}
 		spin_lock_irq(q->queue_lock);
+		if (rtn)
+			goto out_delay;
 	}
 
 	goto out;
@@ -1533,13 +1530,13 @@ static void scsi_request_fn(struct request_queue *q)
 	spin_lock_irq(q->queue_lock);
 	blk_requeue_request(q, req);
 	sdev->device_busy--;
+out_delay:
 	if (sdev->device_busy == 0)
 		blk_delay_queue(q, SCSI_QUEUE_DELAY);
- out:
+out:
 	/* must be careful here...if we trigger the ->remove() function
 	 * we cannot be holding the q lock */
 	spin_unlock_irq(q->queue_lock);
- out_nolock:
 	put_device(&sdev->sdev_gendev);
 	spin_lock_irq(q->queue_lock);
 }
-- 
1.5.0.rc0.gd222


-- 
Jens Axboe


  reply	other threads:[~2007-01-04 14:36 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-03  7:48 [BLOCK] 0/4 explicit io plugging Jens Axboe
2007-01-03  7:48 ` [PATCH] 1/4 qrcu: "quick" srcu implementation Jens Axboe
2007-01-03  7:48 ` [PATCH] 2/4 qrcu: add rcutorture test Jens Axboe
     [not found] ` <1167810508576-git-send-email-jens.axboe@oracle.com>
2007-01-03  8:09   ` [PATCH] 4/4 block: explicit plugging Andrew Morton
2007-01-03  8:22     ` Jens Axboe
2007-01-03 21:50       ` Chen, Kenneth W
2007-01-03 22:29         ` Jens Axboe
2007-01-03 22:34           ` Chen, Kenneth W
2007-01-04 14:39             ` Jens Axboe [this message]
2007-01-05 22:04               ` Chen, Kenneth W
2007-01-04  4:35   ` Nick Piggin
2007-01-05  7:23     ` Jens Axboe
2007-01-03  8:31 ` [PATCH] 3/4 qrcu: add documentation Jens Axboe
2007-01-03  9:29   ` Tomas Carnecky
2007-01-03  9:39     ` Jens Axboe
2007-01-03  9:41 ` [PATCH] 4/4 block: explicit plugging Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070104143900.GC11203@kernel.dk \
    --to=jens.axboe@oracle.com \
    --cc=akpm@osdl.org \
    --cc=kenneth.w.chen@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nickpiggin@yahoo.com.au \
    --cc=npiggin@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.