Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1349621 > unrolled thread

DWord alignment on ARMv7

Started byMarc Kleine-Budde <mkl@pengutronix.de>
First post2016-03-03 23:20 +0100
Last post2016-03-03 23:20 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  DWord alignment on ARMv7 Marc Kleine-Budde <mkl@pengutronix.de> - 2016-03-03 23:20 +0100

#1349621 — DWord alignment on ARMv7

FromMarc Kleine-Budde <mkl@pengutronix.de>
Date2016-03-03 23:20 +0100
SubjectDWord alignment on ARMv7
Message-ID<r8JLb-5k0-5@gated-at.bofh.it>

[Multipart message — attachments visible in raw view] — view raw

Hello,

I'm using btrfs on am ARMv7 and it turns out, that the kernel has to
fixup a lot of kernel originated alignment issues.

See /proc/cpu/alignment (~4h of uptime):
> System: 22304815 (btrfs_get_token_64+0x13c/0x148 [btrfs])

For example, when compiling the kernel on a btrfs volume the counter
increases by 100...1000 per second.

The function shown "btrfs_get_token_64()" is defined here:
> http://lxr.free-electrons.com/source/fs/btrfs/struct-funcs.c#L53
...it already uses get_unaligned_leXX accessors.

Quoting a comment in arch/arm/mm/alignment.c:

         * ARMv6 and later CPUs can perform unaligned accesses for
         * most single load and store instructions up to word size.
         * LDM, STM, LDRD and STRD still need to be handled.

But on a 32bit ARMv7 64bits are not word-sized.

Is the exception and fixup overhead neglectable? Do we have to introduce
something like HAVE_EFFICIENT_UNALIGNED_64BIT_ACCESS?

regards,
Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web