From: "H.J. Lu" <hjl.tools@gmail.com>
To: Erich Elsen <eriche@google.com>
Cc: "Carlos O'Donell" <carlos@redhat.com>,
GNU C Library <libc-alpha@sourceware.org>
Subject: Re: memcpy performance regressions 2.19 -> 2.24(5)
Date: Wed, 24 May 2017 03:42:00 -0000 [thread overview]
Message-ID: <CAMe9rOqMKv-h42iW=+Sxj-bx2qE=joNy3Xc6y3EHOaxWtx7mmw@mail.gmail.com> (raw)
In-Reply-To: <CAOVZoANm9xSOvLxfZ6+25prAyhrQ+UvcK-DubHC_UQ2QWkuYUQ@mail.gmail.com>
On Tue, May 23, 2017 at 5:56 PM, Erich Elsen <eriche@google.com> wrote:
> Ok. Do you have any specific concerns? It would help make it easier
> for us to do the testing internally to switch to memcpy.c.
We use libc_ifunc to implement IFUNC, like x86_64/multiarch/strstr.c. It may be
a good idea to switch to a different format and require all IFUNCs in
C for x86-64
if compilers with IFUNC attribute are required to build glibc. But this is
independent to tunables.
> Interesting, thanks for the info. More reason for being able to
> select the implementation!
> On Tue, May 23, 2017 at 3:55 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
>> On Tue, May 23, 2017 at 3:12 PM, Erich Elsen <eriche@google.com> wrote:
>>> Sounds good to me. Even if tunables aren't added, does memcpy.S ->
>>> memcpy.c seem reasonable?
>>
>> I prefer not to do it for now. We can revisit it later after tunable is added
>> to cpu_features.
>>
>> BTW, REP MOV is expected to have lower bandwidth on multi-socket
>> systems, but has the benefit of lower cache disruption throughout the
>> cache hierarchy. This is trade off of between overall system throughput
>> and single program performance.
>>
>>
>>> On Tue, May 23, 2017 at 3:07 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
>>>> On Tue, May 23, 2017 at 1:57 PM, Erich Elsen <eriche@google.com> wrote:
>>>>> Maybe there's room for both?
>>>>>
>>>>> Setting the cpu_features would affect everything; it would be useful
>>>>> to be able to target only specific (and very important) routines.
>>>>
>>>> I prefer to do the cpu_features first. If it turns out not
>>>> sufficient, we then do
>>>> the IFUNC implementation.
>>>>
>>>>> On Tue, May 23, 2017 at 1:46 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
>>>>>> On Tue, May 23, 2017 at 1:39 PM, Erich Elsen <eriche@google.com> wrote:
>>>>>>> I was also thinking that it might be nice to have a TUNABLE that sets
>>>>>>> the implementation of memcpy directly. It would be easier to do this
>>>>>>> if memcpy.S was memcpy.c. Attached is a patch that does the
>>>>>>> conversion but doesn't add the tunables. How would you feel about
>>>>>>> this? It has no runtime impact, probably increases the size slightly,
>>>>>>> and makes the code easier to read / modify.
>>>>>>>
>>>>>>
>>>>>> It depends on how far you want to go. We can add TUNABLE support
>>>>>> to each IFUNC implementation or we can add TUNABLE support to
>>>>>> cpu_features to update processor features. I prefer latter.
>>>>>>
>>>>>>
>>>>>> --
>>>>>> H.J.
>>>>
>>>>
>>>>
>>>> --
>>>> H.J.
>>
>>
>>
>> --
>> H.J.
--
H.J.
next prev parent reply other threads:[~2017-05-24 3:42 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-05 17:09 Erich Elsen
2017-05-05 18:09 ` Carlos O'Donell
2017-05-06 0:57 ` Erich Elsen
2017-05-06 15:41 ` H.J. Lu
2017-05-09 23:48 ` Erich Elsen
2017-05-10 17:33 ` H.J. Lu
2017-05-11 2:17 ` Carlos O'Donell
2017-05-12 19:47 ` Erich Elsen
[not found] ` <CAOVZoAPp3_T+ourRkNFXHfCSQUOMFn4iBBm9j50==h=VJcGSzw@mail.gmail.com>
2017-05-12 20:21 ` H.J. Lu
2017-05-12 21:21 ` H.J. Lu
2017-05-18 20:59 ` Erich Elsen
2017-05-22 19:17 ` H.J. Lu
2017-05-22 20:22 ` H.J. Lu
2017-05-23 1:23 ` Erich Elsen
2017-05-23 2:25 ` H.J. Lu
2017-05-23 3:19 ` Erich Elsen
2017-05-23 20:39 ` Erich Elsen
2017-05-23 20:46 ` H.J. Lu
2017-05-23 20:57 ` Erich Elsen
2017-05-23 22:08 ` H.J. Lu
2017-05-23 22:12 ` Erich Elsen
2017-05-23 22:55 ` H.J. Lu
2017-05-24 0:56 ` Erich Elsen
2017-05-24 3:42 ` H.J. Lu [this message]
2017-05-24 21:03 ` Erich Elsen
2017-05-24 21:36 ` H.J. Lu
2017-05-25 21:23 ` Erich Elsen
2017-05-25 21:57 ` Erich Elsen
2017-05-25 22:03 ` H.J. Lu
2017-05-27 0:31 ` Erich Elsen
2017-05-27 21:35 ` H.J. Lu
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='CAMe9rOqMKv-h42iW=+Sxj-bx2qE=joNy3Xc6y3EHOaxWtx7mmw@mail.gmail.com' \
--to=hjl.tools@gmail.com \
--cc=carlos@redhat.com \
--cc=eriche@google.com \
--cc=libc-alpha@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).