mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Jeff Garzik <jeff@garzik.org>
Cc: 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:21:40 +0200	[thread overview]
Message-ID: <20070522112140.GB16308@elte.hu> (raw)
In-Reply-To: <4652C640.3090806@garzik.org>


* 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 ;-)

	Ingo

  reply	other threads:[~2007-05-22 11:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-22 10:25 Thomas Gleixner
2007-05-22 10:30 ` Jeff Garzik
2007-05-22 11:21   ` Ingo Molnar [this message]
2007-05-22 11:20     ` Jens Axboe
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=20070522112140.GB16308@elte.hu \
    --to=mingo@elte.hu \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=jeff@garzik.org \
    --cc=linux-kernel@vger.kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®