Re: 2.5.13 IDE and preemptible kernel problems

From: Martin Dalecki (dalecki@evision-ventures.com)
Date: Sun May 05 2002 - 10:13:27 EST


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/



This archive was generated by hypermail 2b29 : Tue May 07 2002 - 22:00:24 EST