From: Amol Lad <amol@verismonetworks.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: linux kernel <linux-kernel@vger.kernel.org>,
James.Bottomley@steeleye.com,
kernel Janitors <kernel-janitors@lists.osdl.org>
Subject: Re: [PATCH 3/3] drivers/scsi/NCR5380.c: Replacing yield() with a better alternative
Date: Thu, 12 Oct 2006 09:59:04 +0530 [thread overview]
Message-ID: <1160627344.19143.351.camel@amol.verismonetworks.com> (raw)
In-Reply-To: <1160589175.16513.58.camel@localhost.localdomain>
> You want cond_resched() for this driver as its polling the hardware for
> a change that should occur very soon. (Actually you want to throw the
> hardware in the bin)
>
Replaced schedule_timeout_interruptible() with cond_resched()
Signed-off-by: Amol Lad <amol@verismonetworks.com>
---
diff -uprN -X linux-2.6.19-rc1-orig/Documentation/dontdiff linux-2.6.19-rc1-orig/drivers/scsi/NCR5380.c linux-2.6.19-rc1/drivers/scsi/NCR5380.c
--- linux-2.6.19-rc1-orig/drivers/scsi/NCR5380.c 2006-09-21 10:15:39.000000000 +0530
+++ linux-2.6.19-rc1/drivers/scsi/NCR5380.c 2006-10-11 17:57:02.000000000 +0530
@@ -347,7 +347,7 @@ static int NCR5380_poll_politely(struct
if((r & bit) == val)
return 0;
if(!in_interrupt())
- yield();
+ cond_resched();
else
cpu_relax();
}
prev parent reply other threads:[~2006-10-12 4:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-11 12:54 Amol Lad
2006-10-11 17:52 ` Alan Cox
2006-10-12 4:29 ` Amol Lad [this message]
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=1160627344.19143.351.camel@amol.verismonetworks.com \
--to=amol@verismonetworks.com \
--cc=James.Bottomley@steeleye.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=kernel-janitors@lists.osdl.org \
--cc=linux-kernel@vger.kernel.org \
/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®