From: Manfred Spraul <manfred@colorfullife.com>
To: Andrew Morton <akpm@zip.com.au>,
linux-kernel@vger.kernel.org,
Marcelo Tosatti <marcelo@conectiva.com.br>
Subject: Re: [patch] block/IDE/interrupt lockup
Date: Mon, 01 Apr 2002 11:23:23 +0200 [thread overview]
Message-ID: <3CA8270B.748EB3A3@colorfullife.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 454 bytes --]
I've attached an alternative patch:
ide assumes that blk_init_queue doesn't sleep or enable interrupts. As a
quick fix, make block_grow_request_list() nonblocking:
both spin_lock_irqsave() and SLAB_ATOMIC allocations. Just
spin_lock_irqsave() with SLAB_KERNEL allocations doesn't fix the
problem.
The better fix would be cleaning up init_irq() in
drivers/ide/ide-probe.c, but that's something for 2.5 or someone who
understand the ide code.
--
Manfred
[-- Attachment #2: patch-alternative --]
[-- Type: text/plain, Size: 1060 bytes --]
--- 2.4/drivers/block/ll_rw_blk.c Mon Apr 1 10:53:25 2002
+++ build-2.4/drivers/block/ll_rw_blk.c Mon Apr 1 11:00:21 2002
@@ -336,14 +336,17 @@
*/
int blk_grow_request_list(request_queue_t *q, int nr_requests)
{
- spin_lock_irq(&io_request_lock);
+ unsigned long flags;
+ /* Several broken drivers assume that this function doesn't sleep,
+ * this causes system hangs during boot.
+ * As a temporary fix, make the the function non-blocking.
+ */
+ spin_lock_irqsave(&io_request_lock, flags);
while (q->nr_requests < nr_requests) {
struct request *rq;
int rw;
- spin_unlock_irq(&io_request_lock);
- rq = kmem_cache_alloc(request_cachep, SLAB_KERNEL);
- spin_lock_irq(&io_request_lock);
+ rq = kmem_cache_alloc(request_cachep, SLAB_ATOMIC);
if (rq == NULL)
break;
memset(rq, 0, sizeof(*rq));
@@ -356,7 +359,7 @@
q->batch_requests = q->nr_requests / 4;
if (q->batch_requests > 32)
q->batch_requests = 32;
- spin_unlock_irq(&io_request_lock);
+ spin_unlock_irqrestore(&io_request_lock, flags);
return q->nr_requests;
}
next reply other threads:[~2002-04-01 9:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-04-01 9:23 Manfred Spraul [this message]
-- strict thread matches above, loose matches on Subject: below --
2002-03-30 9:35 [patch] block/IDE/interrupt lockup Manfred Spraul
2002-03-30 18:28 ` Andrew Morton
2002-03-30 18:52 ` Alan Cox
2002-03-30 19:06 ` Andrew Morton
2002-03-30 23:23 ` Keith Owens
2002-03-30 5:45 Andrew Morton
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=3CA8270B.748EB3A3@colorfullife.com \
--to=manfred@colorfullife.com \
--cc=akpm@zip.com.au \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo@conectiva.com.br \
/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.