[POWERPC] merge iSeries i/o operations with the rest

Stephen Rothwell sfr at canb.auug.org.au
Tue Sep 5 15:39:52 EST 2006

Hi David,

On Mon, 04 Sep 2006 22:07:50 -0700 David Woodhouse <dwmw2 at infradead.org> wrote:
> On Tue, 2006-09-05 at 12:08 +1000, Stephen Rothwell wrote:
> > The low level i/o operations are now handled in iSeires by taking a
> > trap when we access the (inaccessible) io memory region and calling
> > the Hypervisor from the trap code.  
> There was some discussion of the possibility of using the 'alternatives'
> mechanism to patch the I/O instructions at run-time when we find we've
> booted on iSeries -- just turning each one into a jump to a trampoline
> which does the appropriate hypervisor calls, thus avoiding the overhead
> of the trap each time.
> Was that approach not viable, or not noticeably less of a performance
> hit on iSeries?

It has not been tried, yet, as I need to hone my PPC assembler skills :-)
If the performance on iSeries is unacceptably worse (we need to get some
more testing done), then it would probably be worth while doing as you
suggested (or, equivalently, patching on first trap).  This patch just
gets us along the way and may prove sufficient.

Note that the overhead of the trapping may not be as much as expected
since all i/o on iSeries has to be done with Hypervisor calls.

I have another version coming that modifies the inline assembler much
less, but may make the runtime patching approach slightly harder.

Stephen Rothwell                    sfr at canb.auug.org.au

More information about the Linuxppc-dev mailing list