linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] cell: 2.6.17-rc3 bug fixes
@ 2006-04-29  0:40 Arnd Bergmann
  2006-04-29  0:40 ` [PATCH 2/3] spufs: Disable local interrupts for SPE hash_page calls Arnd Bergmann
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Arnd Bergmann @ 2006-04-29  0:40 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: linuxppc-dev, cbe-oss-dev, linux-kernel

Two small bug fixes for cell, and an update to cell_defconfig.
Please apply.

	Arnd <><

^ permalink raw reply	[flat|nested] 10+ messages in thread
* [PATCH] powerpc: Make rtas console _much_ faster
@ 2006-04-18 18:55 Michael Ellerman
  2006-04-18 19:30 ` Olof Johansson
  2006-04-20 20:03 ` Ryan Arnold
  0 siblings, 2 replies; 10+ messages in thread
From: Michael Ellerman @ 2006-04-18 18:55 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: cbe-oss-dev

Currently the hvc_rtas driver is painfully slow to use. Our "benchmark" is
ls -R /etc, which spits out about 27866 characters. The theoretical maximum
speed would be about 2.2 seconds, the current code takes ~50 seconds.

The core of the problem is that sometimes when the tty layer asks us to push
characters the firmware isn't able to handle some or all of them, and so
returns an error. The current code sees this and just returns to the tty code
with the buffer half sent.

There's the khvcd thread which will eventually wake up and try to push more
characters, that will usually work because the firmware's had time to push
the characters out. But the thread only wakes up every 10 milliseconds, which
isn't fast enough.

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.

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.

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

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
---

 drivers/char/hvc_console.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: cell/drivers/char/hvc_console.c
===================================================================
--- cell.orig/drivers/char/hvc_console.c
+++ cell/drivers/char/hvc_console.c
@@ -570,7 +570,7 @@ static int hvc_poll(struct hvc_struct *h
 		hvc_push(hp);
 	/* Reschedule us if still some write pending */
 	if (hp->n_outbuf > 0)
-		poll_mask |= HVC_POLL_WRITE;
+		poll_mask |= HVC_POLL_WRITE | HVC_POLL_QUICK;
 
 	/* No tty attached, just skip */
 	tty = hp->tty;

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2006-04-30  3:07 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-29  0:40 [PATCH 0/3] cell: 2.6.17-rc3 bug fixes Arnd Bergmann
2006-04-29  0:40 ` [PATCH 2/3] spufs: Disable local interrupts for SPE hash_page calls Arnd Bergmann
2006-04-29  0:40 ` [PATCH 3/3] powerpc: update cell_defconfig Arnd Bergmann
2006-04-29  0:45 ` [PATCH 1/3] powerpc: Make rtas console _much_ faster Arnd Bergmann
2006-04-29  1:56   ` Michael Ellerman
2006-04-29  8:00     ` Arnd Bergmann
2006-04-30  3:07       ` [PATCH] " Michael Ellerman
  -- strict thread matches above, loose matches on Subject: below --
2006-04-18 18:55 Michael Ellerman
2006-04-18 19:30 ` Olof Johansson
2006-04-20 20:03 ` Ryan Arnold

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).