public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@suse.de>
To: rwhron@earthlink.net
Cc: viro@math.psu.edu, linux-kernel@vger.kernel.org
Subject: Re: 2.5.2-pre1 dbench 32 hangs in vmstat "b" state
Date: Sat, 29 Dec 2001 18:33:15 +0100	[thread overview]
Message-ID: <20011229183315.E1821@suse.de> (raw)
In-Reply-To: <20011221154654.E811@suse.de> <20011221185538.A131@earthlink.net> <20011224150337.A593@suse.de> <20011224115953.A118@earthlink.net> <20011224180244.C1241@suse.de> <20011227140723.A4713@earthlink.net> <20011228124037.K2973@suse.de> <20011228091401.A15569@earthlink.net> <20011228153022.D1248@suse.de> <20011229014248.A17257@earthlink.net>
In-Reply-To: <20011229014248.A17257@earthlink.net>

On Sat, Dec 29 2001, rwhron@earthlink.net wrote:
> > > Kernel panic: Out of memory and no killable processes...
> > 
> > Someone else did report a similar case. Very strange, doesn't look bio
> 
> Al Viro posted a fix:
> http://marc.theaimsgroup.com/?l=linux-kernel&m=100959128922157&w=2
> 
> I used Al's patch and 2.5.2-pre3 boots with reiserfs root_fs
> and no panic.
> 
> Below is the trace on 2.5.2-pre3 after dbench 32 livelocked.

Thanks, could you try with this patch? It's not a fix (haven't found the
bug yet), but I think we are looking at list corruption so please check
if this patch at least alters when it hangs etc.

--- /opt/kernel/linux-2.5.2-pre3/drivers/block/elevator.c	Sat Dec 29 12:17:53 2001
+++ drivers/block/elevator.c	Sat Dec 29 12:30:20 2001
@@ -142,7 +142,7 @@
 int elevator_linus_merge(request_queue_t *q, struct request **req,
 			 struct bio *bio)
 {
-	struct list_head *entry;
+	struct list_head *entry, *head = &q->queue_head;
 	struct request *__rq;
 	int ret;
 
@@ -160,17 +160,22 @@
 		}
 	}
 
+	if ((__rq = __elv_next_request(q)))
+		if (__rq->flags & REQ_STARTED)
+			head = head->next;
+
 	entry = &q->queue_head;
 	ret = ELEVATOR_NO_MERGE;
-	while ((entry = entry->prev) != &q->queue_head) {
+	while ((entry = entry->prev) != head) {
 		__rq = list_entry_rq(entry);
 
+		if (__rq->flags & (REQ_BARRIER | REQ_STARTED))
+			break;
+
 		/*
 		 * simply "aging" of requests in queue
 		 */
 		if (__rq->elevator_sequence-- <= 0)
-			break;
-		if (__rq->flags & (REQ_BARRIER | REQ_STARTED))
 			break;
 		if (!(__rq->flags & REQ_CMD))
 			continue;

-- 
Jens Axboe


  reply	other threads:[~2001-12-29 17:33 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-21 14:11 2.5.2-pre1 dbench 32 hangs in vmstat "b" state rwhron
2001-12-21 14:46 ` Jens Axboe
2001-12-21 16:43   ` rwhron
2001-12-21 17:01     ` Jens Axboe
2001-12-21 18:47       ` rwhron
2001-12-21 22:19         ` Jens Axboe
2001-12-21 23:55   ` rwhron
2001-12-24 14:03     ` Jens Axboe
2001-12-24 16:59       ` rwhron
2001-12-24 17:02         ` Jens Axboe
2001-12-24 22:14           ` rwhron
2001-12-27 19:07           ` rwhron
2001-12-28 11:40             ` Jens Axboe
2001-12-28 14:14               ` rwhron
2001-12-28 14:30                 ` Jens Axboe
2001-12-28 17:49                   ` rwhron
2001-12-28 19:29                   ` rwhron
2001-12-29  6:42                   ` rwhron
2001-12-29 17:33                     ` Jens Axboe [this message]
2001-12-29 17:48                       ` Jens Axboe
2001-12-29 19:43                         ` rwhron

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=20011229183315.E1821@suse.de \
    --to=axboe@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rwhron@earthlink.net \
    --cc=viro@math.psu.edu \
    /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