From: Andrew Morton <akpm@osdl.org>
To: Jens Axboe <axboe@suse.de>
Cc: mikem@beardog.cca.cpqcorp.net, marcelo.tosatti@cyclades.com,
linux-kernel@vger.kernel.org, mike.miller@hp.com,
scott.benesh@hp.com
Subject: Re: cciss update for 2.4.24-pre1, 2 of 2
Date: Wed, 17 Dec 2003 15:49:19 -0800 [thread overview]
Message-ID: <20031217154919.6ab61960.akpm@osdl.org> (raw)
In-Reply-To: <20031217225007.GN2495@suse.de>
Jens Axboe <axboe@suse.de> wrote:
>
> > + for (i=0; i < 1200; i++) {
> > + scratchpad = readl(c->vaddr + SA5_SCRATCHPAD_OFFSET);
> > + if (scratchpad == 0xffff0000) {
> > + ready = 1;
> > + break;
> > + }
> > + set_current_state(TASK_INTERRUPTIBLE);
> > + schedule_timeout(HZ / 10); /* wait 100ms */
> > + }
> > + if (!ready) {
> > + printk(KERN_WARNING "cciss: Board not ready. Timed out.\n");
> > + return -1;
> > + }
>
> Fine as well, aren't you happy you changed this to schedule_timeout()
> instead of busy looping? :)
It will still be a busy loop if this task has a signal pending.
TASK_UNINTERRUPTIBLE may be more appropriate...
next prev parent reply other threads:[~2003-12-17 23:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-12-16 23:57 cciss update for 2.4.24-pre1, 2 of 2 mikem
2003-12-17 22:50 ` Jens Axboe
2003-12-17 23:49 ` Andrew Morton [this message]
2003-12-18 0:57 ` Jeff Garzik
2003-12-18 7:47 ` Jens Axboe
2003-12-18 15:05 ` mikem
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=20031217154919.6ab61960.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=axboe@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo.tosatti@cyclades.com \
--cc=mike.miller@hp.com \
--cc=mikem@beardog.cca.cpqcorp.net \
--cc=scott.benesh@hp.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;
as well as URLs for NNTP newsgroup(s).