All of lore.kernel.org
 help / color / mirror / Atom feed
* + block-ps3-fix-slow-vram-io.patch added to -mm tree
@ 2009-11-03  8:24 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2009-11-03  8:24 UTC (permalink / raw)
  To: mm-commits
  Cc: Hideyuki_Sasaki, Geert.Uytterhoeven, geoffrey.levand, jens.axboe,
	jim, xhide


The patch titled
     block/ps3: fix slow VRAM IO
has been added to the -mm tree.  Its filename is
     block-ps3-fix-slow-vram-io.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find
out what to do about this

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: block/ps3: fix slow VRAM IO
From: Hideyuki Sasaki <Hideyuki_Sasaki@hq.scei.sony.co.jp>

The current PS3 VRAM driver uses msleep() to wait for completion of RSX
DMA transfers between system memory and VRAM.  Depending on the system
timing, the processing delay and overhead of this msleep() call can
significantly impact VRAM driver IO.

To avoid the condition, add a short duration (200 usec max) udelay()
polling loop before entering the msleep() polling loop.

Signed-off-by: Hideyuki Sasaki <xhide@rd.scei.sony.co.jp>
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Acked-by: Jim Paris <jim@jtan.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
Cc: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 drivers/block/ps3vram.c |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff -puN drivers/block/ps3vram.c~block-ps3-fix-slow-vram-io drivers/block/ps3vram.c
--- a/drivers/block/ps3vram.c~block-ps3-fix-slow-vram-io
+++ a/drivers/block/ps3vram.c
@@ -123,7 +123,15 @@ static int ps3vram_notifier_wait(struct 
 {
 	struct ps3vram_priv *priv = ps3_system_bus_get_drvdata(dev);
 	u32 *notify = ps3vram_get_notifier(priv->reports, NOTIFIER);
-	unsigned long timeout = jiffies + msecs_to_jiffies(timeout_ms);
+	unsigned long timeout;
+
+	for (timeout = 20; timeout; timeout--) {
+		if (!notify[3])
+			return 0;
+		udelay(10);
+	}
+
+	timeout = jiffies + msecs_to_jiffies(timeout_ms);
 
 	do {
 		if (!notify[3])
_

Patches currently in -mm which might be from Hideyuki_Sasaki@hq.scei.sony.co.jp are

block-ps3-fix-slow-vram-io.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-11-03  8:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-03  8:24 + block-ps3-fix-slow-vram-io.patch added to -mm tree akpm

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.