mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jens Axboe <jens.axboe@oracle.com>
To: Andrew Vasquez <andrew.vasquez@qlogic.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	mike.miller@hp.com, k-ueda@ct.jp.nec.com, j-nomura@ce.jp.nec.com,
	tony.luck@intel.com
Subject: Re: kernel BUG at drivers/block/cciss.c:1260! (with recent  linux-2.6  tree)
Date: Tue, 29 Jan 2008 22:24:35 +0100	[thread overview]
Message-ID: <20080129212435.GC15220@kernel.dk> (raw)
In-Reply-To: <20080129211634.GB15220@kernel.dk>

On Tue, Jan 29 2008, Jens Axboe wrote:
> On Tue, Jan 29 2008, Andrew Vasquez wrote:
> > On Tue, 29 Jan 2008, Jens Axboe wrote:
> > 
> > > Great, thanks for confirming. It does look like a clear bug in cciss, it
> > > just got exposed now that it uses proper end request handling. We never
> > > need to clear ->data_len, since for blk_fs_request() it will be cleared
> > > on init. So just setting a residual count there for blk_fs_request()
> > > like cciss does is fine.
> > > 
> > > Anyway, it's in my pending queue for Linus.
> > > 
> > 
> > 
> > Hmm, probably not related to the block changes in your tree, but I'm
> > seeing yet another problem after working (compile jobs) the machine:
> > 
> > 	[   61.423922] BUG: spinlock recursion on CPU#2, kjournald/2317
> > 	[   61.427843]  lock: ffff81042c5a4988, .magic: dead4ead, .owner: kjournald/2317, .owner_cpu: 2
> > 	[   61.427843] Pid: 2317, comm: kjournald Not tainted 2.6.24 #45
> > 	[   61.427843] 
> > 	[   61.427843] Call Trace:
> > 	[   61.427843]  [<ffffffff803332e1>] _raw_spin_lock+0xe9/0x12a
> > 	[   61.427843]  [<ffffffff80324ccf>] as_merged_requests+0xfe/0x115
> > 	[   61.427843]  [<ffffffff8031b558>] elv_merge_requests+0x1f/0x45
> > 	[   61.427843]  [<ffffffff8031e6f7>] attempt_merge+0x281/0x347
> > 	[   61.427843]  [<ffffffff8031f153>] __make_request+0x1e6/0x598
> > 	[   61.427843]  [<ffffffff8031d6ea>] generic_make_request+0x1c8/0x276
> > 	[   61.427843]  [<ffffffff8031d7f9>] submit_bio+0x61/0xdb
> > 	[   61.427843]  [<ffffffff8029b0d2>] submit_bh+0xe2/0x118
> > 	[   61.427843]  [<ffffffff802f69f3>] journal_do_submit_data+0x28/0x39
> > 	[   61.427843]  [<ffffffff802f77da>] journal_commit_transaction+0xdbe/0x1394
> > 	[   61.427843]  [<ffffffff802381a8>] lock_timer_base+0x26/0x4e
> > 	[   61.427843]  [<ffffffff802fb85f>] kjournald+0x104/0x373
> > 	[   61.427843]  [<ffffffff80242087>] autoremove_wake_function+0x0/0x2e
> > 	[   61.427843]  [<ffffffff802fb75b>] kjournald+0x0/0x373
> > 	[   61.427843]  [<ffffffff80241cd4>] kthread+0x3d/0x61
> > 	[   61.427843]  [<ffffffff8020c0e8>] child_rip+0xa/0x12
> > 	[   61.427843]  [<ffffffff80241c97>] kthread+0x0/0x61
> > 	[   61.427843]  [<ffffffff8020c0de>] child_rip+0x0/0x12
> 
> Ah crap, I see the problem, nioc is most often equal to rioc. Dang.
> Please try this bandaid, will push a real fix now.

This is way cleaner.

diff --git a/block/as-iosched.c b/block/as-iosched.c
index b201d16..9603684 100644
--- a/block/as-iosched.c
+++ b/block/as-iosched.c
@@ -1275,9 +1275,13 @@ static void as_merged_requests(struct request_queue *q, struct request *req,
 			 * Don't copy here but swap, because when anext is
 			 * removed below, it must contain the unused context
 			 */
-			double_spin_lock(&rioc->lock, &nioc->lock, rioc < nioc);
-			swap_io_context(&rioc, &nioc);
-			double_spin_unlock(&rioc->lock, &nioc->lock, rioc < nioc);
+			if (rioc != nioc) {
+				double_spin_lock(&rioc->lock, &nioc->lock,
+								rioc < nioc);
+				swap_io_context(&rioc, &nioc);
+				double_spin_unlock(&rioc->lock, &nioc->lock,
+								rioc < nioc);
+			}
 		}
 	}
 

-- 
Jens Axboe


  reply	other threads:[~2008-01-29 21:24 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-29 17:54 Andrew Vasquez
2008-01-29 18:02 ` Jens Axboe
2008-01-29 18:05   ` Jens Axboe
2008-01-29 18:22     ` Andrew Vasquez
2008-01-29 18:28       ` Jens Axboe
2008-01-29 18:37         ` Andrew Vasquez
2008-01-29 18:44           ` Jens Axboe
2008-01-29 18:49             ` Andrew Vasquez
2008-01-29 18:53               ` Jens Axboe
2008-01-29 19:03                 ` Miller, Mike (OS Dev)
2008-01-29 19:07                   ` Jens Axboe
2008-01-29 19:11                   ` Andrew Vasquez
2008-01-29 21:08                 ` Andrew Vasquez
2008-01-29 21:16                   ` Jens Axboe
2008-01-29 21:24                     ` Jens Axboe [this message]
2008-01-29 21:32                       ` Luck, Tony
2008-01-29 21:35                         ` Jens Axboe
2008-01-29 21:53                           ` Luck, Tony
2008-01-29 22:02                             ` Andrew Vasquez

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=20080129212435.GC15220@kernel.dk \
    --to=jens.axboe@oracle.com \
    --cc=andrew.vasquez@qlogic.com \
    --cc=j-nomura@ce.jp.nec.com \
    --cc=k-ueda@ct.jp.nec.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mike.miller@hp.com \
    --cc=tony.luck@intel.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®