All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@suse.de>
To: Eric Valette <eric.valette@free.fr>
Cc: linux-kernel@vger.kernel.org
Subject: Re: 2.6.5-rc1-mm2 : Badness in elv_requeue_request at drivers/block/elevator.c:157
Date: Thu, 18 Mar 2004 11:06:06 +0100	[thread overview]
Message-ID: <20040318100606.GG22234@suse.de> (raw)
In-Reply-To: <20040318100222.GE22234@suse.de>

On Thu, Mar 18 2004, Jens Axboe wrote:
> On Thu, Mar 18 2004, Eric Valette wrote:
> > I have this message two times as I have two adaptec controllers...
> > 
> > Attached my .config and the dmesg output
> > 
> > ksymoops 2.4.9 on i686 2.6.5-rc1-mm2.  Options used
> >      -V (default)
> >      -k /proc/ksyms (default)
> >      -l /proc/modules (default)
> >      -o /lib/modules/2.6.5-rc1-mm2/ (default)
> >      -m /System.map (specified)
> > 
> > Error (regular_file): read_ksyms stat /proc/ksyms failed
> > No modules in ksyms, skipping objects
> > No ksyms, skipping lsmod
> > CPU 0 irqstacks, hard=c05f7000 soft=c05f6000
> > Call Trace:
> >  [<c02b268d>] elv_requeue_request+0x8d/0xa0
> 
> Ah damn, requeue through blk_insert_request... Let me think about this
> a bit, I'll post a fix for you.

Does this work for you?

--- drivers/block/elevator.c~	2004-03-18 10:56:34.494431670 +0100
+++ drivers/block/elevator.c	2004-03-18 11:05:00.115063157 +0100
@@ -153,7 +153,7 @@
 	 * it already went through dequeue, we need to decrement the
 	 * in_flight count again
 	 */
-	if (blk_rq_started(rq)) {
+	if (blk_account_rq(rq)) {
 		WARN_ON(q->in_flight == 0);
 		q->in_flight--;
 	}
@@ -244,7 +244,7 @@
 	 * driver has seen (REQ_STARTED set), to avoid false accounting
 	 * for request-request merges
 	 */
-	if (blk_rq_started(rq)) {
+	if (blk_account_rq(rq)) {
 		q->in_flight++;
 		WARN_ON(q->in_flight > 2 * q->nr_requests);
 	}
@@ -341,7 +341,7 @@
 	/*
 	 * request is released from the driver, io must be done
 	 */
-	if (blk_rq_started(rq)) {
+	if (blk_account_rq(rq)) {
 		WARN_ON(q->in_flight == 0);
 		q->in_flight--;
 	}
--- include/linux/blkdev.h~	2004-03-18 11:03:59.431584757 +0100
+++ include/linux/blkdev.h	2004-03-18 11:05:16.980250506 +0100
@@ -381,6 +381,8 @@
 #define blk_noretry_request(rq)	((rq)->flags & REQ_FAILFAST)
 #define blk_rq_started(rq)	((rq)->flags & REQ_STARTED)
 
+#define blk_account_rq(rq)	(blk_rq_started(rq) && blk_fs_request(rq))
+
 #define blk_pm_suspend_request(rq)	((rq)->flags & REQ_PM_SUSPEND)
 #define blk_pm_resume_request(rq)	((rq)->flags & REQ_PM_RESUME)
 #define blk_pm_request(rq)	\

-- 
Jens Axboe


  reply	other threads:[~2004-03-18 10:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-18  9:45 2.6.5-rc1-mm2 : Badness in elv_requeue_request at drivers/block/elevator.c:157 Eric Valette
2004-03-18 10:02 ` Jens Axboe
2004-03-18 10:06   ` Jens Axboe [this message]
2004-03-18 10:37     ` Eric Valette
2004-03-18 11:07       ` Jens Axboe
2004-03-18 23:19     ` J.A. Magallon
2004-03-19  7:37       ` Jens Axboe
2004-03-19 23:25         ` J.A. Magallon
2004-03-20 10:05           ` 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=20040318100606.GG22234@suse.de \
    --to=axboe@suse.de \
    --cc=eric.valette@free.fr \
    --cc=linux-kernel@vger.kernel.org \
    /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.