PLoP Boot Manager test on IBM Thinkpad 600 and IBM Thinkpad T20

Started by qiet72, August 14, 2009, 07:58:49 AM

Previous topic - Next topic

qiet72

Hi,

I find it facinating that somebody finally started creating USB booting support for those machines that don't support booting from USB so I started testing version 5.0.3 on two IBM Thinkpads.

Both laptops have a UHCI controller based on the Intel 82371AB/EB/MB PIIX4 chipset.

I have both a CD and a USB key that have RIPLinux on it.  The USB key uses syslinux as a boot loader and the CD uses isolinux as a boot loader.

If I boot the CD via the BIOS, the load speed is around 1.7MB/sec.
If I boot the USB key via PLOP, both models loads the key fine, but is extremely slow - around 40KB/sec
The 600 sometimes does not boot the key at all, but works if I reboot the machine again.
I believe one should be able to get around 1MB/sec when booting via USB 1.1.

I noticed under the Bootmanager status page that the work is active where the last entry is from August 8th, 2009 but the latest version one can download is from March 2009.

Do you have a later version that may have fixes to the USB speed?

Do you have any plans on making this code open source/GPL compliant?

qiet72

Elmar

Quote from: qiet72 on August 14, 2009, 07:58:49 AM
Both laptops have a UHCI controller based on the Intel 82371AB/EB/MB PIIX4 chipset.

please try this test version. it will be available only for a few days.
http://download.plop.at/files/tmp/plpbt-test.zip

Quote from: qiet72 on August 14, 2009, 07:58:49 AMDo you have any plans on making this code open source/GPL compliant?

i think about it. maybe in the future it will became open source, but dont count on it.

regards
elmar

qiet72

Hi,

Ok, now I have also tested your code via the open source virtual machine qemu which emulates a pc with a UHCI controller based on the Intel 82371SB PIIX3 chipset - same results for version 5.0.3.

As for the test version you posted, it was really bad.  The Thinkpad 600 came out with all sort of weird results when selecting USB from the PLOP menu like syslinux giving EBIOS errors or just hanging - most of the time it wouldn't show anything.  The T20 was much more consistent - PLOP would come up, but selecting USB would just hang the machine.  Qemu on the otherhand was working quite well with the new code, but still extremely slow, but at least it was a little quicker than last time - I measured about 80KB/sec.

You should also be able to test your code with qemu as it is free and open source software - I have been testing your code using qemu under Ubuntu Linux using something like this at the command line:

  qemu -fda boot.img -m 256 -usb -usbdevice disk:/dev/sdb

Note: /dev/sdb is my usb key.

I have also made sure my key was working properly by booting the key directly in qemu:

  qemu -hda /dev/sdb -m 256

The key also worked fine on my ASUS Desktop which can boot USB via the BIOS.

Hope this information helps you.

qiet72

Elmar

hi,
currently i compiled the latest qemu version 0.10.5 for testing. btw i am an old fan of qemu!

you say the test version is slow. i say its not my fault.

my tests:
1) plop boot manager test version:
usb booting loads the plop linux kernel with syslinux, it needs 48 seconds

2) plop linux livecd is running with linux kernel 2.6.30.4
copy the same kernel as above from the usb drive to ram, it needs 68 seconds

the kernel size is 4,7MB.

you are right its slow, but my driver was faster than the linux kernel (that surprised myself)!

------

I am wondering that my driver does not work fine with the Thinkpads.
Maybe i can do some tests on a Thinkpad 600E. I dont know what chipset it has.

------

I corrected the subject from PLOT to PLoP


regards
elmar




qiet72

Hi Elmer,

You say your driver is faster than the linux kernel.  What you do mean by that?  How do you measure that?  If it were me, I would boot up into linux and do something like this to test the load speed under linux:

time dd if=/media/usb-key/vmlinuz of=/dev/null
9697+1 records in
9697+1 records out
4964880 bytes (5,0 MB) copied, 0,31356 s, 15,8 MB/s

real   0m0.321s
user   0m0.016s
sys   0m0.040s

You say that you also use syslinux/isolinux.  Have you noticed the dots when syslinux/isolinux loads a kernel.  Each dot represents 64KB of data (according to the syslinux source files).  When I look at the dots when syslinux is loaded via PLOP, each dot takes almost a second before printing, so 80 dots (a full row of dots on the screen) takes about 120 seconds to load.  If I use the BIOS, it takes less than three seconds for a full row of dots.

By the way I tested my USB key with a Thinkpad R40 which has BIOS USB boot support (1.1).  A full row of dots (80) takes about 5 seconds which calculates to about 1MB/sec which is correct for USB 1.1.

Have you check that you initialized the USB UHCI bus for 12 Mbit/sec and not 1.5 Mbit/sec?

I have now included a Thinkpad R40 in the test.  I used your latest test version which seems to work perfectly on this laptop.  The speed is also definetly better.  The R40 has both UHCI and EHCI controller, though the BIOS only uses UHCI when booting from USB.  When PLOP loads my key using EHCI, it loads very quick (3 seconds per line).  I then tested USB 1.1 mode (SHIFT-U at the PLOP main menu) and it took 8 seconds per line - that's about 640 KB/sec - this is getting close to 1.1 max bandwidth.

The R40 has an Intel 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) chipset controller.

qiet72

Elmar

Quote from: qiet72 on August 14, 2009, 23:42:43 PM
Hi Elmer,
my name is Elmar, not Elmer

Quote from: qiet72 on August 14, 2009, 23:42:43 PM
you say your driver is faster than the linux kernel.  What you do mean by that?  How do you measure that?  If it were me, I would boot up into linux and do something like this to test the load speed under linux:

i measure it at the simpliest way that is possible. you did not read my test correct, or you dont understand it!

first test was taking the time that syslinux needs to load the kernel with my driver.
for dummies: syslinux is loaded with my driver and pressing enter, measure the time until initrfs.gz starts to load

second test was the time that a booted linux need to copy the same file (the kernel) with the midnight commander into the ram. for dummies, press f5 and enter and wait until the copy is finished

do you understand, was it easy enough to understand the procedure?

Quote from: qiet72 on August 14, 2009, 23:42:43 PM
time dd if=/media/usb-key/vmlinuz of=/dev/null
9697+1 records in
9697+1 records out
4964880 bytes (5,0 MB) copied, 0,31356 s, 15,8 MB/s

first of all, copy to /dev/null is copy to nothing, you can not compare it with copy to ram or another device!

Quote from: qiet72 on August 14, 2009, 23:42:43 PM
Have you check that you initialized the USB UHCI bus for 12 Mbit/sec and not 1.5 Mbit/sec?

hey man,it seems, you dont understand the uhci bus! or, do you think i do not know what i  am doing? my drivers have a size of 4kb and can handle mass storage devices. are you thinking you can make it better? feel free to do it!

and last but not least, qemu is an emulator and not real hardware. results of qemu say nothing about real hardware behaivour! so your test about speed with qemu is shit.


best regads
elmar

qiet72

Hi Elmar,

First, sorry about getting your name wrong, a typo on my side.  Second, I am not trying to insult you, I am just trying to understand how you do things.

Regarding the UHCI bus speed, when I said about initializing at 1.5 Mbit/sec or 12 Mbit/sec, I know that you are trying to initialize it at 12 Mbit/sec, but is it possible that just some hardware don't follow standard UHCI specifications and require a certain initialization procedure for it to work?  It is because it looks like the speed results are different from hardware to hardware.  For example, under PLoP, the R40 with the Intel 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) chipset looks like it is running at 12 Mbit/sec but not the T20/600 with the Intel 82371AB/EB/MB PIIX4 chipsets or even qemu.

The qemu version I was testing under was 0.9.1.  I will test again with a later version.

I will re-run my tests with your test procedure - measuring the time to load a 4.7MB linux kernel under syslinux and the time to copy the kernel to ram via Midnight Commander F5 function - that way we can better compare our test results.

Again, sorry if I insulted you in some way, it was not my intention.

qiet72

Elmar

Quote from: qiet72 on August 15, 2009, 10:20:01 AM
Regarding the UHCI bus speed, when I said about initializing at 1.5 Mbit/sec or 12 Mbit/sec, I know that you are trying to initialize it at 12 Mbit/sec, but is it possible that just some hardware don't follow standard UHCI specifications

Mass storage devices must be full speed devices. This means, they must run at 12 Mbit/sec. 1.5Mbit/sec will not work.
You have to know, 12 Mbit/sec speed is used to transmit data over the bus. but you have to add timings for the device to be ready to transmit data. its not easy for me to explain.

in the case of qemu, i have to say qemu usb support is at the moment not faster. i am sure the qemu developers will change this in the furure.
in the case of real hardware, if usb is slow then its my driver that have to became better.


regards
elmar

Elmar

hi qiet72,

i have news for you

i have a thinkpad 600E and it has the same chipset like yours. my driver works sometimes and sometimes not. i hope i can fix it.

regards
elmar

Elmar


qiet72

Hi,

I have been busy lately and I haven't had time to test.  I am testing right now and will report the results soon.

qiet72

qiet72

Hi,

I have now completed my testing.  Here are my results for different machines with three different versions of PLoP:

Test settings
-------------

Test file: bzImage from "PLoP Linux"
Test filesize: 4798432 bytes
USB key boot manager: syslinux 3.72
PLoP Version: 5.0.3
PLoP Test1 Version: 2009-08-14
PLoP Test2 Version: 2009-08-20

Machine 1
---------
Name: Toshiba 3020CT:
USB hardware: NEC Corporation USB (1033:0035) OHCI controller
Results:
Linux copy from usb to tmpfs filesystem via mc: 5.5 sec
PLoP 5.0.3 speed: N/A see error message
PLoP Test1 speed: N/A see error message
PLoP Test2 speed: N/A see error message
PLoP 5.0.3/Test1 Boot Manager error message:
LOADING EHCI DRIVER
SEARCHING ON HOSTS
DRIVER REMOVED
LOADING UHCI DRIVER
SEARCHING ON HOSTS
DRIVER REMOVED
LOADING OHCI DRIVER
SEARCHING ON HOSTS
HOST 1
***  BOOT ERROR  ***
NO BOOT DEVICE FOUND, PLEASE RETRY IT

PLoP Test2 Boot Manager error message:
LOADING EHCI DRIVER
SEARCHING ON HOSTS
DRIVER REMOVED
LOADING UHCI DRIVER
SEARCHING ON HOSTS
DRIVER REMOVED
LOADING OHCI DRIVER
SEARCHING ON HOSTS
HOST 1

<Machine 1 hangs here>


Machine 2
---------
Name: IBM ThinkPad T20
USB hardware: Intel Corporation 82371AB/EB/MB PIIX4 USB (8086:7112) UHCI controller
Results:
Linux copy from usb to tmpfs filesystem via mc: 4.9 sec
PLoP 5.0.3 speed: 111 sec
PLoP Test1 speed: N/A, blank scrren or error message, see below
PLoP Test2 speed: N/A, syslinux error message, see below
PLoP Test1 error messages:
Missing operating system
PLoP Test2 error messages:
SYSLINUX 3.72 2009-09-25 EBIOS Load error - Boot error


Machine 3
---------
Name: ThinkPad 600E
USB hardware: Intel Corporation 82371AB/EB/MB PIIX4 USB (8086:7113) UHCI controller
Results:
Linux copy from usb to tmpfs filesystem via mc: 4.9 sec
PLoP 5.0.3 speed: 105 sec
PLoP Test1 speed: N/A, blank scrren or error message, see below
PLoP Test2 speed: 15 sec
PLoP Test1 error messages:
Missing operating system
I9990305


Machine 4
---------
Name: Qemu 0.10.5
USB hardware (emulated): Intel Corporation 82371SB PIIX3 USB (8086:7020) UHCI controller
Results:
Linux copy from usb to tmpfs filesystem via mc: 108 sec
PLoP 5.0.3 speed: 161 sec
PLoP Test1 speed: 60 sec
PLoP Test2 speed: 31 sec


It is nice to see that PLoP has improved under qemu for each version.  Like you said, PLoP is now faster the linux kernel. :-)

Hope you can use this information to good use.

qiet72

Elmar

hi,
many thanks for the test report.

bad thing about the thinkpad T20. i have to think about why this happens. i give you a new test version soon.

a new test version for the ohci driver will come soon too.

best regards
elmar

Elmar


qiet72

Hi,

Success! 
PLoP testqiet72 speed: 47.3 sec on ThinkPad T20
Now if we could just get the time down to 15 sec or under like the ThinkPad 600E. :-)

qiet72

Elmar


qiet72

Hi,

I get the following error when I boot this last version (plpbt-testqiet72-2.zip):

SYSLINUX 3.72 2008-09-25 EBIOS Load error - Boot error


Regards,
qiet72

Elmar


qiet72

Hi,

This version works.  Time: 24.4 seconds.  Fastest version yet on a ThinkPad T20.

qiet72

Elmar

how fast is it on the 600e? i am sure it will be slower than the first test version

qiet72

Hi,

I have been busy all day but I managed to test just before going to bed.  This version gives exactly the same results on the 600e as it does on the T20: 24.4 seconds. :-)  Fantastic work!!!

Do you think it is possible to tune the code to be as fast as the linux kernel which i believe we measured to around 5 seconds?

qiet72

qiet72

Hmm,  looking at the past results, it seems the "test2" version is still the fastest on the 600e with a time of 15 seconds.  Oh well, at least we have some consistency. :-)

qiet72

Elmar

it would be possible to tune the code, maybe i can reach the 5 seconds but this requires additional error handling and i have no more space for this. so i think a bit slower and it works is better than its faster but it hangs on some machines.

at the moment i am happy that it works in this way :)

qiet72

ok, maybe sometime in the future you will find some time to optimize your code.  How goes with the OHCI code?  Is it ready for testing?

qiet72