lkml.org 
[lkml]   [2002]   [May]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] Add i8253 spinlocks where needed.
Alan Cox wrote:
>
> On Mon, 2002-05-27 at 11:10, Vojtech Pavlik wrote:
> > Well, probably yes, but still hd.c is a glacial relict, a driver nobody
> > (almost - it's for non-IDE "two ribbon" AT harddrives) uses. So this
> > driver is probably not enough justification for a global (as in all
> > archs) spinlock being added.
>
> It only uses the timer in the case that HD_DELAY > 0. This code is
> ultimately used for timing functions. A better approach would be to
> remove the use of the timer chip from the file entirely and use the
> perfectly adequate udelay() function instead.
>
> That would also conveniently make it do cpu_relax properly improving the
> performance of your ancient IDE controller when plugged into
> hyperthreading pentium IV 8)
>
It would also allow the high-res-timers to "mess" with the
timer (as it does) to generate sub-jiffie interrupts.
Actually, I would prefer moving the timer out of the general
code and making what ever uses it has come thru an
abstraction that hides exactly how it is done or even if it
access the timer chip or uses some other time source. This
could also be done accross archs. It is also possible that
code such as udelay() and friends already do all that is
needed. In short, I think the clock code should "own" the
timer and others should have to use what ever the clock code
exports.


--
George Anzinger george@mvista.com
High-res-timers:
http://sourceforge.net/projects/high-res-timers/
Real time sched: http://sourceforge.net/projects/rtsched/
Preemption patch:
http://www.kernel.org/pub/linux/kernel/people/rml
-
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:26    [from the cache]
©2003-2011 Jasper Spaans