[PATCH] powerpc: Make rtas console _much_ faster

Ryan Arnold rsa at us.ibm.com
Fri Apr 21 06:03:11 EST 2006


On Tue, 2006-04-18 at 20:55 +0200, Michael Ellerman wrote:

> There's already code in the hvc_console driver to make the khvcd thread do
> a "quick" loop, where it just calls yield() instead of sleeping. The only code
> that triggered that behaviour was recently removed though, which I don't
> quite understand.

I think I'm the guilty part and I removed that code because it was silly
to be pushing to the tty with a partially filled buffer when we could
pack it up full.  The original intention of HVC_POLL_QUICK was for
letting the TTY grok the data read from firmware.  I think I was just
worried about 'off by one' errors and did it to be safe.  I didn't count
on the write frequency side-effect

The hvc_console was originally quite speedy after I added khvcd (before
it was broken apart into back-end/front-end).  We should review it for
performance on all platforms again in the future.

> Still, if we set HVC_POLL_QUICK whenever the push hvc_push() doesn't push all
> characters (ie. RTAS blocks), we can get good performance out of the hvc_rtas
> backend. With this patch the "benchmark" takes ~2.8 seconds.

You might as well use HVC_POLL_QUICK to speed up the write.  I put that
construct in for quick reading, not quick writing but it is a dead at
the moment.  Maybe rename it HVC_WRITE_QUICK?

> I'll test this on P5 LPAR, is there anyone else that uses hvc_console?
> Thoughts?

btw, there are a lot of users of hvc_console, power4 (non-interrupt
driven), power5 (interrupt-driven), cbe simulator, and rtas console.

Is it possible to make the poll frequency platform dependent?

-- 
Ryan S. Arnold <rsa at us.ibm.com>
IBM Linux Technology Center
Linux on Power Toolchain




More information about the Linuxppc-dev mailing list