mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Renaud Barbier <Renaud.Barbier@ametek.com>
To: Lucas Stach <l.stach@pengutronix.de>,
	Ahmad Fatoum <a.fatoum@pengutronix.de>,
	Barebox List <barebox@lists.infradead.org>
Subject: RE: LS1021A performance
Date: Thu, 30 Mar 2023 15:17:27 +0000	[thread overview]
Message-ID: <BL0PR07MB566585849809C53B0FB60734EC8E9@BL0PR07MB5665.namprd07.prod.outlook.com> (raw)
In-Reply-To: <6bdf136861036d5c9362360db82ea153d576ec3c.camel@pengutronix.de>


> > > Can you compare SHA256 instead and see if the difference is still as stark?
> > > Make sure that CONFIG_DIGEST_SHA256_ARM is enabled.
> > The SHA256 is enabled. SHA256 on a 1 MB file:
> > Barebox: 843ms
> > Linux:
> > [root@openware]# time sha256sum /tmp/mtd0
> > eef67a3327e3eaa50ee7b1dad87901465f00d76a6308e360a2fedab82c79f493
> > /tmp/mtd0
> >
> > real    0m0.059s
> > user    0m0.056s
> > sys     0m0.001s
> >
> > On another note, the boot loader using the LS1021A is much slower than
> using the PPC P1014.
> > I compare those two as we used the LS1021A as a replacement for P1014
> > on a board (same peripherals, same boot sequence) The P1014 reach the
> prompt in 200ms while the LS1021 takes 700ms.
> >
> > Also, I noticed that the pageflags is different for the DDR memory on
> Barebox and Linux as seen by the Lauterbach:
> > Barebox: write-back/no allocate
> > Linux : Inner:write-back/allocate outer: write-back/allocate Could
> > that mean the L2 cache Is not used?
> > >
> > > Do barebox and Linux run at the same CPU frequency?
> > According to the Lauterbach, clock ratio have not changed in the
> > clocking registers
> > >
> 
> As the LS1021A is based on a Cortex A7 your board lowlevel init needs to call
> cortex_a7_lowlevel_init() for the caches to work properly.
> 
> It's probably a good idea to add a ls1021 lowlevel init function which calls both
> of those functions together, like imx6ul_cpu_lowlevel_init().
> 

With this function call, the boot loader boots 3 times faster and sha256sum for 1MB dropped to 118ms from 843ms
This now breaks the gianfar Ethernet driver which likely needs cache flush or dma allocated descriptors.

Thanks.

      reply	other threads:[~2023-03-30 15:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-30 11:34 Renaud Barbier
2023-03-30 11:45 ` Ahmad Fatoum
2023-03-30 13:31   ` Renaud Barbier
2023-03-30 14:17     ` Lucas Stach
2023-03-30 15:17       ` Renaud Barbier [this message]

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=BL0PR07MB566585849809C53B0FB60734EC8E9@BL0PR07MB5665.namprd07.prod.outlook.com \
    --to=renaud.barbier@ametek.com \
    --cc=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=l.stach@pengutronix.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