
On Sat, 1 Feb 2014 03:50:26 +0100 Marek Vasut marex@denx.de wrote:
On Friday, January 31, 2014 at 01:16:25 PM, Lukasz Majewski wrote:
A set of cache operations (both invalidation and flush) were redundant in the S3C HS OTG Samsung driver.
Test condition
- test HW + measurement: Trats - Exynos4210 rev.1
- test HW Trats2 - Exynos4412 rev.1
400 MiB compressed rootfs image download with `thor 0 mmc 0`
The commit message is missing a proper explanation _WHY_ were they redundant. I do not understand why they were redundant ... and no, the test you performed does not justify removal of cache management calls.
The s3c UDC driver is in u-boot since 2011. It has been added when at Samsung boards (s5p_goni) we didn't have cache enabled.
Then there was a transition, after which L1 was enabled. Since UDC is co-working with gadgets on the beginning it was easier to perform the cache management inside the UDC driver.
That is why we had to copy the buffers (since e.g. device descriptors tends to be unaligned) - which also degraded performance.
Now, all gadget code seems to be memalign'ed and ready for direct buffer passing (despite the two overlooked kmallocs in the mass storage gadget - which I fix in this patch set).
To sum up:
1. s3c_udc_ep0_zlp - EP0 ZLP packets don't need to invalidate the cache (since it is zero length transmission)
2. s3c_udc_pre_setup - cache invalidation is not needed when I setup buffer for OUT EP0 transmission.
The above two invalidation calls had been added by me, and are mine mistakes. Those don't contribute to transmission speed up (and shall be regarded as a cosmetic changes)
3. setdma_rx - here I invalidate parts of the s3c UDC driver's internal buffer. This call is not needed anymore since we reuse the buffers passed from gadgets.
This is the key speed improvement here.
Best regards, Lukasz Majewski
Best regards, Marek Vasut _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot