linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* DWord alignment on ARMv7
@ 2016-03-03 22:27 Marc Kleine-Budde
  2016-03-03 23:54 ` Will Deacon
  0 siblings, 1 reply; 17+ messages in thread
From: Marc Kleine-Budde @ 2016-03-03 22:27 UTC (permalink / raw)
  To: linux-arm-kernel

Hello, (now sending to linux-arm-kernel)

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   |



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 455 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160303/78229449/attachment-0001.sig>

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2016-03-04 15:49 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-03 22:27 DWord alignment on ARMv7 Marc Kleine-Budde
2016-03-03 23:54 ` Will Deacon
2016-03-04  8:01   ` btrfs_get_token_64() alignment problem on ARM (was: Re: DWord alignment on ARMv7) Marc Kleine-Budde
2016-03-04  9:16     ` David Sterba
2016-03-04 10:48   ` DWord alignment on ARMv7 Ard Biesheuvel
2016-03-04 11:02     ` Russell King - ARM Linux
2016-03-04 11:14       ` Ard Biesheuvel
2016-03-04 11:19         ` Marc Kleine-Budde
2016-03-04 11:26           ` Ard Biesheuvel
2016-03-04 11:38         ` Arnd Bergmann
2016-03-04 11:44           ` Ard Biesheuvel
2016-03-04 13:30             ` Arnd Bergmann
2016-03-04 13:33               ` Ard Biesheuvel
2016-03-04 13:46               ` Russell King - ARM Linux
2016-03-04 14:41                 ` Arnd Bergmann
2016-03-04 14:56                   ` Russell King - ARM Linux
2016-03-04 15:49                     ` Arnd Bergmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).