public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@suse.de>
To: Lorenzo Allegrucci <lenstra@tiscalinet.it>
Cc: Linus Torvalds <torvalds@transmeta.com>, linux-kernel@vger.kernel.org
Subject: Re: 2.4.1-pre10 deadlock (Re: ps hang in 241-pre10)
Date: Sun, 28 Jan 2001 19:23:06 +0100	[thread overview]
Message-ID: <20010128192306.C4871@suse.de> (raw)
In-Reply-To: <3.0.6.32.20010127220102.01367ce0@pop.tiscalinet.it> <Pine.LNX.4.10.10101271524010.1076-100000@penguin.transmeta .com> <3.0.6.32.20010128104843.01367eb0@pop.tiscalinet.it>
In-Reply-To: <3.0.6.32.20010128104843.01367eb0@pop.tiscalinet.it>; from lenstra@tiscalinet.it on Sun, Jan 28, 2001 at 10:48:43AM +0100

On Sun, Jan 28 2001, Lorenzo Allegrucci wrote:
> >Ho humm. Jens: imagine that you have more people waiting for requests than
> >"batchcount". Further, imagine that you have multiple requests finishing
> >at the same time. Not unlikely. Now, imagine that one request finishes,
> >and causes "batchcount" users to wake up, and immediately another request
> >finishes but THAT one doesn't wake anybody up because it notices that the
> >freelist isn't empty - so it thinks that it doesn't need to wake anybody.
> >
> >Lorenzo, does the problem go away for you if you remove the
> >
> >	if (!list_empty(&q->request_freelist[rw])) {
> >		...
> >	}
> >
> >code from blkdev_release_request() in drivers/block/ll_rw_block.c?
> 
> Yes, it does.

How about this instead?

--- /opt/kernel/linux-2.4.1-pre10/drivers/block/ll_rw_blk.c	Thu Jan 25 19:15:12 2001
+++ drivers/block/ll_rw_blk.c	Sun Jan 28 19:22:20 2001
@@ -633,6 +634,8 @@
 		if (!list_empty(&q->request_freelist[rw])) {
 			blk_refill_freelist(q, rw);
 			list_add(&req->table, &q->request_freelist[rw]);
+			if (waitqueue_active(&q->wait_for_request))
+				wake_up_nr(&q->wait_for_request, 2);
 			return;
 		}
 

-- 
* Jens Axboe <axboe@suse.de>
* SuSE Labs
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

  reply	other threads:[~2001-01-28 18:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Pine.LNX.4.10.10101271524010.1076-100000@penguin.transmeta .com>
     [not found] ` <3.0.6.32.20010127220102.01367ce0@pop.tiscalinet.it>
2001-01-28  9:48   ` 2.4.1-pre10 deadlock (Re: ps hang in 241-pre10) Lorenzo Allegrucci
2001-01-28 18:23     ` Jens Axboe [this message]
2001-01-28 18:29       ` Linus Torvalds
2001-01-28 18:39         ` Jens Axboe
     [not found] <20010128024635.C31648@suse.de>
2001-01-28  2:03 ` Linus Torvalds
2001-01-28  2:17   ` Jens Axboe
2001-01-28  2:04     ` Marcelo Tosatti

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=20010128192306.C4871@suse.de \
    --to=axboe@suse.de \
    --cc=lenstra@tiscalinet.it \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.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