[Cbe-oss-dev] ps3-utils performance issue

Jiafu Gao jiafu_gao at yahoo.com
Wed Nov 5 14:51:03 EST 2008


Hi,

One of the handy tool in ps3-utils [0] is ps3-dump-bootloader. It is implemented as a shell script using dd util. The main command is:

   dd if=/dev/ps3flash bs=1 skip=$ldr_offset count=$ldr_size

Note that the parameter bs=1. Trying to dump the boot loader under Ubuntu Intrepid (size of 3M: 3037844), it takes more than 6 minutes. I am not sure the reason, but I guess it could be dd is not using read/write buffer when bs is set to 1. This translate to 3M reads and writes. Also notes that read from flash is in the form of block. 

There are several solutions:
1. change bs to a reasonable size, say 1024. Then we have an issue of leftover that is not multiple of 1024. We can either read this left over separately by set bs=1 or read an extra block and truncate the file to the proper size.

2. add an option to ps3-flash-util to dump boot loader. The implementation is really simple: just read /dev/ps3flash and write in reasonable blocks. I've came up a quick patch (attached) to do this. 

Both methods only take under 1 second.

Geoff, I've leave to you to decide which method to use. Use the patch if you like.

Thanks for your attention.


[0] http://www.kernel.org/pub/linux/kernel/people/geoff/cell/ps3-utils/, version 2.3



      
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ps3-flash-util.c.patch
Type: text/x-diff
Size: 2967 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/cbe-oss-dev/attachments/20081104/3c6e3fcf/attachment.patch>


More information about the cbe-oss-dev mailing list