aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHideyuki Sasaki <Hideyuki_Sasaki@hq.scei.sony.co.jp>2009-11-04 09:09:28 +0100
committerJens Axboe <jens.axboe@oracle.com>2009-11-04 09:09:28 +0100
commitf21121cde6e617b90cd03ce083652ca543004dc2 (patch)
tree9a2401e05c403cc4f6ce59e7936b89c1000798af
parente00ef7997195e4f8e10593727a6286e2e2802159 (diff)
downloadkernel_samsung_aries-f21121cde6e617b90cd03ce083652ca543004dc2.zip
kernel_samsung_aries-f21121cde6e617b90cd03ce083652ca543004dc2.tar.gz
kernel_samsung_aries-f21121cde6e617b90cd03ce083652ca543004dc2.tar.bz2
block/ps3: fix slow VRAM IO
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: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
-rw-r--r--drivers/block/ps3vram.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/block/ps3vram.c b/drivers/block/ps3vram.c
index 3bb7c47..1fb6c31 100644
--- a/drivers/block/ps3vram.c
+++ b/drivers/block/ps3vram.c
@@ -123,7 +123,15 @@ static int ps3vram_notifier_wait(struct ps3_system_bus_device *dev,
{
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])