lkml.org 
[lkml]   [2002]   [May]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 2.5.13 IDE and preemptible kernel problems
Uz.ytkownik John Weber napisa?:
> Tim Schmielau wrote:
>
>> On Sat, 4 May 2002, Linus Torvalds wrote:
>>
>>
>>> Hmm.. Something like
>>>
>>> #define timeout_expired(x) time_after(jiffies, (x))
>>>
>>> migth indeed make sense.
>>>
>>> But I'm a lazy bastard. Is there some victim^H^H^H^H^H^Hhero who would
>>> want to do the 'sed s/time_after(jiffies,/timeout_expired(/g' and verify
>>> that it does the right thing and send it to me as a patch?
>>>
>>> The thing is, I wonder if it should be "time_after(jiffies,x)" or
>>> "time_after_eq(jiffies,x)". There's a single-tick difference there..
>>>
>> That probably means we need both, as something like
>> timeout_expired(x+1) seems to call for new "off by one" errors.
>
>
> Here's a patch with the s/time_after(jiffies,/timeout_expired(/g and
> s/time_after_eq(jiffies,/timeout_expired(/g

Yeep. And now please take the next step and grep for "jiffies + 1"

to realize that a timeout primitive along the following

take_a_nap(temeout_function, timeout_data);

would help simpify the usage of timers and speed up the kernel
due to cache locality for stuff which is added to the global
timer list just for doing short micro-polls and beeing taken
out ther on the next scheduler round. In esp. nearly every
single eth driver out there shows precisely what I mean.

Becouse most of the timers get only added for one jiffie!




-
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:25    [W:0.044 / U:0.732 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site