lkml.org 
[lkml]   [2003]   [Sep]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Memory mapped IO vs Port IO
On Fri, 12 Sep 2003 11:24:30 -0700
jbarnes@sgi.com (Jesse Barnes) wrote:

> On Fri, Sep 12, 2003 at 11:11:48AM -0700, Tim Hockin wrote:
> > On Fri, Sep 12, 2003 at 08:00:03PM +0200, Andi Kleen wrote:
> > > jbarnes@sgi.com (Jesse Barnes) writes:
> > >
> > > > Ok, Andi asked for benchmarks, so I ran some. Let this should be a
> > > > lesson on why you shouldn't use port I/O :) I ran these on an SGI Altix
> > > > w/900 MHz McKinley processors.
> > > >
> > > > Just straight calls to the routines (all of these are based on the
> > > > average of 100 iterations):
> > > > writeq(val, reg) time: 64 cycles
> > > > outl(val, reg) time: 2126 cycles
> > > ^^^^^
> > > >
> > > > A simple branch:
> > > > if (use_mmio)
> > > > writeq(val, reg) time: 132 cycles
> > > > else
> > > > outl(val, reg) time: 1990 cycles
> > > ^^^^^
> > > Something seems to be wrong in your numbers.
> > >
> > > Surely the outl in the if () cannot be faster than the pure outl() ?
> >
> > Also - a perhaps more useful test is a write followed by a read.
>
> Well, someone else will have to run that test. On Altix, a read() is
> freakishly expensive, and I'm not really interested in showing everyone
> how bad it is ;)

I guess the read will be very bad everywhere, and the PIO inl even worse.

-Andi
-
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:48    [from the cache]
©2003-2011 Jasper Spaans