All of lore.kernel.org
 help / color / mirror / Atom feed
From: siarhei.siamashka@gmail.com (Siarhei Siamashka)
To: linux-arm-kernel@lists.infradead.org
Subject: Call for testing/opinions: Optimized memset/memcpy
Date: Sun, 14 Jul 2013 18:21:33 +0300	[thread overview]
Message-ID: <20130714182133.7971180d@i7> (raw)
In-Reply-To: <loom.20130714T124137-382@post.gmane.org>

On Sun, 14 Jul 2013 11:00:50 +0000 (UTC)
Harm Hanemaaijer <fgenfb@yahoo.com> wrote:

> Willy Tarreau <w <at> 1wt.eu> writes:
> 
> > 
> > Please find the results attached. It seems that memcpy improved by 0.8%
> > though that's not even certain.
> > 
> 
> What is interesting is that
> http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0388f/Caccifbd.html,
> and several other sources (such as other
> optimized memcpy implementations) document the cache line size of the Cortex
> A9 as 32 bytes, which is an anomaly in the armv7 family.

Yes, the cache line size is 32 bytes in Cortex-A9. However in order to
mitigate poor memory memory bandwidth utilization, the L2 cache
controller implements 'double linefill' feature:

    http://infocenter.arm.com/help/topic/com.arm.doc.ddi0246h/CHDHIECI.html

But 'double linefill' only first appeared in r3p0 revision of L2C-310
L2 cache controller (also known as PL310) and was a bit buggy in the
revisions older than r3p2 according to the errata list:

    http://infocenter.arm.com/help/topic/com.arm.doc.uan0013b/index.html

Which only makes double linefill usable in modern Cortex-A9 based SoCs
such as Exynos4412, but unfortunately not in the older Cortex-A9 based
systems.

When double linefill is enabled, two cache lines are allocated at once
in L2, so for the memcpy alike workloads it looks somewhat similar to
real 64 byte cache line size. Welcome to the diverse world of ARM
hardware :)

-- 
Best regards,
Siarhei Siamashka

      parent reply	other threads:[~2013-07-14 15:21 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-13 15:51 Call for testing/opinions: Optimized memset/memcpy Harm Hanemaaijer
2013-07-13 16:48 ` Dr. David Alan Gilbert
2013-07-13 21:13   ` Harm Hanemaaijer
2013-07-15 13:15     ` Catalin Marinas
2013-07-14 11:19   ` Harm Hanemaaijer
2013-07-14 11:32     ` Dr. David Alan Gilbert
2013-07-14 11:37     ` Ard Biesheuvel
2013-07-14 13:13       ` Russell King - ARM Linux
2013-07-14 13:33       ` Harm Hanemaaijer
2013-07-14 14:09         ` Ard Biesheuvel
2013-07-14 14:32           ` Russell King - ARM Linux
2013-07-13 17:24 ` Willy Tarreau
2013-07-13 21:51   ` Harm Hanemaaijer
2013-07-14  6:13     ` Willy Tarreau
2013-07-14 11:00       ` Harm Hanemaaijer
2013-07-14 13:09         ` Russell King - ARM Linux
2013-07-14 13:59           ` Harm Hanemaaijer
2013-07-14 15:21         ` Siarhei Siamashka [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=20130714182133.7971180d@i7 \
    --to=siarhei.siamashka@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.