[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070522112047.GS4705@kernel.dk>
Date: Tue, 22 May 2007 13:20:49 +0200
From: Jens Axboe <jens.axboe@...cle.com>
To: Ingo Molnar <mingo@...e.hu>
Cc: Jeff Garzik <jeff@...zik.org>,
Thomas Gleixner <tglx@...utronix.de>,
LKML <linux-kernel@...r.kernel.org>,
Alan Cox <alan@...rguk.ukuu.org.uk>
Subject: Re: [PATCH] CDROM: replace jiffies busyloop with msleep
On Tue, May 22 2007, Ingo Molnar wrote:
>
> * Jeff Garzik <jeff@...zik.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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists