public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "luofengwc at qq dot com" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug libc/31492] ARM ldp instruction trigger bus error when kernel open option CONFIG_IO_STRICT_DEVMEM
Date: Wed, 20 Mar 2024 08:47:34 +0000	[thread overview]
Message-ID: <bug-31492-131-zxwj5QU0Hz@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-31492-131@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=31492

--- Comment #5 from luofeng14 <luofengwc at qq dot com> ---
(In reply to Adhemerval Zanella from comment #4)
> This is most likely unaligned access to a device region (due to the
> CONFIG_IO_STRICT_DEVMEM), which is not supported by the ISA [1]. Although
> the input is aligned, aarch64 memcpy assumes unaligned access;the size of
> '724' will trigger the 'copy_long' branch, which copies a multiple of 128
> bytes, with the remaining 84 bytes that it is not aligned to 8 bytes (thus
> potentially triggering an unaligned load of the 'copy64_from_end' code path.
> 
> We had a similar issue on POWER, which prevented us from adding an unaligned
> memcpy optimization as default because memcpy was used in some video drivers
> on non-cacheable memory and unaligned VSX operations triggered some bad
> performance issues (it is essentially emulated by the kernel). We had to
> gate this optimization through a tunable instead [2].
> 
> You can raise this to ARM maintainers, but I think it is unlikely that they
> will change the default implementation to avoid unaligned access since this
> is really a performance improvement for all cases.
> 
> [1]
> https://developer.arm.com/documentation/102376/0200/Alignment-and-endianness/
> Alignment
> [2] https://sourceware.org/pipermail/libc-alpha/2017-December/089357.html

Zanella thanks your reply

-- 
You are receiving this mail because:
You are on the CC list for the bug.

      parent reply	other threads:[~2024-03-20  8:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-15  7:51 [Bug libc/31492] New: " luofengwc at qq dot com
2024-03-15  8:09 ` [Bug libc/31492] " luofengwc at qq dot com
2024-03-15  9:51 ` fweimer at redhat dot com
2024-03-17  2:02 ` luofengwc at qq dot com
2024-03-19 11:56 ` adhemerval.zanella at linaro dot org
2024-03-20  8:47 ` luofengwc at qq dot com [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=bug-31492-131-zxwj5QU0Hz@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs@sourceware.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 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 read-only IMAP folder(s) and NNTP newsgroup(s).