* Re: [PATCH 3/3] 2.6.0 aacraid driver update [not found] ` <3F81E34A.1040201@pobox.com> @ 2003-10-06 21:59 ` Matthew Wilcox 2003-10-06 22:06 ` Jeff Garzik 0 siblings, 1 reply; 2+ messages in thread From: Matthew Wilcox @ 2003-10-06 21:59 UTC (permalink / raw) To: Jeff Garzik; +Cc: Mark Haverkamp, linux-scsi, linux-kernel On Mon, Oct 06, 2003 at 05:48:58PM -0400, Jeff Garzik wrote: > >+ /* > >+ * Yield the processor in case we are slow > >+ */ > >+ set_current_state(TASK_UNINTERRUPTIBLE); > >+ schedule_timeout(1); > > hmmm... why not simply call yield() here instead? I think yield() is > closer to the intent you wish to achieve... Gods, no. I believe it is always a bug for drivers to call yield() in 2.6. What is probably meant here is cond_resched(). I'd support deleting the EXPORT_SYMBOL(yield) line and fixing the breakage afterwards as it causes lots of very subtle breakage ("Under certain circumstances, Linux just stops doing anything for 5 seconds"). -- "It's not Hollywood. War is real, war is primarily not about defeat or victory, it is about death. I've seen thousands and thousands of dead bodies. Do you think I want to have an academic debate on this subject?" -- Robert Fisk ^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH 3/3] 2.6.0 aacraid driver update 2003-10-06 21:59 ` [PATCH 3/3] 2.6.0 aacraid driver update Matthew Wilcox @ 2003-10-06 22:06 ` Jeff Garzik 0 siblings, 0 replies; 2+ messages in thread From: Jeff Garzik @ 2003-10-06 22:06 UTC (permalink / raw) To: Matthew Wilcox; +Cc: Mark Haverkamp, linux-scsi, linux-kernel Matthew Wilcox wrote: > On Mon, Oct 06, 2003 at 05:48:58PM -0400, Jeff Garzik wrote: > >>>+ /* >>>+ * Yield the processor in case we are slow >>>+ */ >>>+ set_current_state(TASK_UNINTERRUPTIBLE); >>>+ schedule_timeout(1); >> >>hmmm... why not simply call yield() here instead? I think yield() is >>closer to the intent you wish to achieve... > > > Gods, no. I believe it is always a bug for drivers to call yield() > in 2.6. What is probably meant here is cond_resched(). I'd support > deleting the EXPORT_SYMBOL(yield) line and fixing the breakage afterwards > as it causes lots of very subtle breakage ("Under certain circumstances, > Linux just stops doing anything for 5 seconds"). Yes, you're right, and thank you for the correction. I was thinking if (need_resched) schedule(); which I incorrectly translated to yield() when searching my brain for the 2.6 equivalent. Jeff ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-10-06 22:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1065475285.17021.79.camel@markh1.pdx.osdl.net>
[not found] ` <3F81E34A.1040201@pobox.com>
2003-10-06 21:59 ` [PATCH 3/3] 2.6.0 aacraid driver update Matthew Wilcox
2003-10-06 22:06 ` Jeff Garzik
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox