lkml.org 
[lkml]   [2003]   [Oct]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/3] 2.6.0 aacraid driver update
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



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:49    [W:0.421 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site