From: Jens Axboe <jens.axboe@oracle.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: Jeff Garzik <jeff@garzik.org>,
Thomas Gleixner <tglx@linutronix.de>,
LKML <linux-kernel@vger.kernel.org>,
Alan Cox <alan@lxorguk.ukuu.org.uk>
Subject: Re: [PATCH] CDROM: replace jiffies busyloop with msleep
Date: Tue, 22 May 2007 13:20:49 +0200 [thread overview]
Message-ID: <20070522112047.GS4705@kernel.dk> (raw)
In-Reply-To: <20070522112140.GB16308@elte.hu>
On Tue, May 22 2007, Ingo Molnar wrote:
>
> * Jeff Garzik <jeff@garzik.org> wrote:
>
> > >@@ -1709,12 +1710,11 @@ static int __init sjcd_init(void)
> > > printk(KERN_INFO "SJCD: Resetting: ");
> > > sjcd_send_cmd(SCMD_RESET);
> > > for (i = 1000; i > 0 && !sjcd_status_valid; --i) {
> > >- unsigned long timer;
> > >-
> > > /*
> > > * Wait 10ms approx.
> > > */
> > >- for (timer = jiffies; time_before_eq(jiffies, timer););
> > >+ msleep(10);
> > >+
> >
> > I always worry when I see code like this, wondering if there is some
> > arcane reason that I cannot fathom, that is being removed. You gotta
> > wonder how long it has been since this driver was used, by anybody.
> >
> > Oh well, I cannot find fault with the patch, paranoia worries aside.
>
> well, while i dont have that hardware, i found this by booting an
> allyesconfig bzImage which runs the code above, which locks up without
> this change. And then it booted fine with this change. So arcane issues
> aside, it does visibly improve things ;-)
But if you looked at the driver, you'd see 2 other identical busy loops
in the very same function :-)
--
Jens Axboe
next prev parent reply other threads:[~2007-05-22 11:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-22 10:25 [PATCH] CDROM: replace jiffies busyloop with msleep Thomas Gleixner
2007-05-22 10:30 ` Jeff Garzik
2007-05-22 11:21 ` Ingo Molnar
2007-05-22 11:20 ` Jens Axboe [this message]
2007-05-23 18:41 ` Rene Herman
2007-05-23 19:28 ` Ingo Molnar
2007-05-23 19:37 ` Rene Herman
2007-05-23 19:34 ` Alan Cox
2007-05-23 19:38 ` Rene Herman
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=20070522112047.GS4705@kernel.dk \
--to=jens.axboe@oracle.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=jeff@garzik.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
/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.