From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/6] usb:udc:samsung: Remove redundant cache operation from Samsung UDC driver
Date: Sat, 1 Feb 2014 23:49:26 +0100 [thread overview]
Message-ID: <201402012349.26505.marex@denx.de> (raw)
In-Reply-To: <20140201105627.4d6c06b3@jawa>
On Saturday, February 01, 2014 at 10:56:27 AM, Lukasz Majewski wrote:
> 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.
And you do correct cache management on those in the UDC driver or in the gadget
driver ?
> This is the key speed improvement here.
This should be in the commit message really ;-)
Best regards,
Marek Vasut
next prev parent reply other threads:[~2014-02-01 22:49 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-31 12:16 [U-Boot] [PATCH 0/6] usb:samsung: Exynos4 SoC USB code improvements Lukasz Majewski
2014-01-31 12:16 ` [U-Boot] [PATCH 1/6] usb:gadget:ums: Replace malloc calls with memalign to fix cache buffer alignment Lukasz Majewski
2014-02-01 2:48 ` Marek Vasut
2014-02-01 9:10 ` Lukasz Majewski
2014-01-31 12:16 ` [U-Boot] [PATCH 2/6] usb:udc:samsung: Remove redundant cache operation from Samsung UDC driver Lukasz Majewski
2014-02-01 2:50 ` Marek Vasut
2014-02-01 9:56 ` Lukasz Majewski
2014-02-01 22:49 ` Marek Vasut [this message]
2014-02-03 8:05 ` Lukasz Majewski
2014-02-03 18:06 ` Marek Vasut
2014-02-04 6:23 ` Lukasz Majewski
2014-01-31 12:16 ` [U-Boot] [PATCH 3/6] usb:udc:samsung: Allow burst transfers for non EP0 endpints Lukasz Majewski
2014-01-31 12:16 ` [U-Boot] [PATCH 4/6] usb:udc:samsung: Zero copy approach for data passed to Samsung's UDC driver Lukasz Majewski
2014-02-01 2:55 ` Marek Vasut
2014-02-01 11:05 ` Lukasz Majewski
2014-02-01 22:55 ` Marek Vasut
2014-02-03 11:06 ` Lukasz Majewski
2014-02-03 18:11 ` Marek Vasut
2014-02-04 7:29 ` Lukasz Majewski
2014-02-04 20:21 ` Marek Vasut
2014-02-04 21:49 ` Lukasz Majewski
2014-02-05 2:35 ` Marek Vasut
2014-01-31 12:16 ` [U-Boot] [PATCH 5/6] usb:gadget:f_thor: Allocate request up to THOR_PACKET_SIZE not ep->maxpacket Lukasz Majewski
2014-01-31 12:16 ` [U-Boot] [PATCH 6/6] usb:gadget:f_thor: cosmetic: Remove debug memset Lukasz Majewski
2014-02-05 9:10 ` [U-Boot] [PATCH v2 0/6] usb:samsung: Exynos4 SoC USB code improvements Lukasz Majewski
2014-02-05 9:10 ` [U-Boot] [PATCH v2 1/6] usb:gadget:ums: Replace malloc calls with memalign to fix cache buffer alignment Lukasz Majewski
2014-02-06 1:20 ` Marek Vasut
2014-02-06 6:33 ` Lukasz Majewski
2014-02-06 6:41 ` Marek Vasut
2014-02-06 8:16 ` Lukasz Majewski
2014-02-05 9:10 ` [U-Boot] [PATCH v2 2/6] usb:udc:samsung: Remove redundant cache operation from Samsung UDC driver Lukasz Majewski
2014-02-05 9:10 ` [U-Boot] [PATCH v2 3/6] usb:udc:samsung: Allow burst transfers for non EP0 endpints Lukasz Majewski
2014-02-05 9:10 ` [U-Boot] [PATCH v2 4/6] usb:udc:samsung: Zero copy approach for data passed to Samsung's UDC driver Lukasz Majewski
2014-02-05 9:10 ` [U-Boot] [PATCH v2 5/6] usb:gadget:f_thor: Allocate request up to THOR_PACKET_SIZE not ep->maxpacket Lukasz Majewski
2014-02-05 9:10 ` [U-Boot] [PATCH v2 6/6] usb:gadget:f_thor: cosmetic: Remove debug memset Lukasz Majewski
2014-02-06 1:24 ` [U-Boot] [PATCH v2 0/6] usb:samsung: Exynos4 SoC USB code improvements Marek Vasut
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201402012349.26505.marex@denx.de \
--to=marex@denx.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox