lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20091019200320.GA30464@psychosis.jim.sh>
Date:	Mon, 19 Oct 2009 16:03:20 -0400
From:	Jim Paris <jim@...n.com>
To:	Geoff Levand <geoffrey.levand@...sony.com>
Cc:	Jens Axboe <jens.axboe@...cle.com>,
	Cell Broadband Engine OSS Development 
	<cbe-oss-dev@...abs.org>,
	Geert Uytterhoeven <Geert.Uytterhoeven@...ycom.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] block/ps3: Fix slow VRAM IO

Geoff Levand wrote:
> 
> From: Hideyuki Sasaki <Hideyuki_Sasaki@...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@...scei.sony.co.jp>
> Signed-off-by: Geoff Levand <geoffrey.levand@...sony.com>

Acked-by: Jim Paris <jim@...n.com>

Thanks for tracking this down.

-jim

> ---
> 
>  drivers/block/ps3vram.c |   10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)
> 
> --- a/drivers/block/ps3vram.c
> +++ b/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])
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ