unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Carlos O'Donell via Libc-alpha <libc-alpha@sourceware.org>
To: Adhemerval Zanella <adhemerval.zanella@linaro.org>,
	libc-alpha@sourceware.org
Subject: Re: [PATCH 0/3] RFC: Platform Support for AMD Zen and AVX2/AVX
Date: Tue, 17 Mar 2020 17:37:05 -0400	[thread overview]
Message-ID: <11fbb273-bced-f806-d949-3a3bd2f54818@redhat.com> (raw)
In-Reply-To: <ccad489b-6ce8-bec0-9b75-66d224410958@linaro.org>

On 3/17/20 3:27 PM, Adhemerval Zanella via Libc-alpha wrote:
> On 17/03/2020 10:17, Carlos O'Donell via Libc-alpha wrote:
>> Agreed. This is the only sensible plan. The platform directories already
>> imply some of this, but it's not well structured.
> 
> Which should be our policy regarding the platform name over releases?
> Should the names set in previous release being supported in a 
> compatibility manner or should it not be constraint (as for tunables)
> and subject of change?

It should be subject to change just like tunables.

It should be an optimization, and not a requirement, and applications
should always provide a fallback implementaiton to allow the application
to load.

Failure to load the libraries *may* result in a failure to start the
application and we need to be OK with that. That is to say that a
particularly package may only ship an optimized library (going against
the recommendation).

We should verify that downstream distributions can use /etc/ld.so.conf
as a way to add back directories into the search of the existing 
additional multilib search directories e.g. Add back /lib64/haswell
for a few years.

Does that answer your question?
 
> If the former, with a defined subset of the CPU features flags it might
> be possible to share folder over x86 chips without using chips release
> names.

Yes.

>> And this is the hard part that we can't solve without AMD's help.
>>
>> Even if you ignore "future CPUs" it would be useful to get this list
>> for all current CPUs given your architectural knowledge, errata, and
>> other factors like microcode, that covers the currently released CPUs.
> 
> So the question is how should be move forward: let the chip vendor
> (Intel, AMD, etc.) define its own naming scheme based on its own
> chip roadmap, or create subsets of features to set a common naming
> folder (as suggested by Richard Biener on BZ#24080 [1])?

In the end I think we'll want:

(a) Try CPU vendor directories first.
- Each vendor should name their directories and the explicit
  compiler options to target them (printed by LD_DEBUG).

(b) Try shared directories second.
- Based on a common set of identified features.
  - Compiler options to target the shared set should be explicitly
    stated (printed by LD_DEBUG).

My understanding is that Florian is asking for help with (b)
to identify what things should be enabled for current CPUs, and
that we'll compare that list to the Intel list and make a common
shared directory that the downstream distributions can used
for the most optimized library we can have in common.

What we can do:
- Cleanup the generic code to allow a CPU vendor split?
  - We have a mix of hwcap bit handling and list handling
    for platforms. This is also a bit messy.
  - Allow vendors to drop in their CPU vendor search list
    ahead of the shared list, again based on feature presence.
- Prepare the code for a shared common directory based on
  some shared subset of features, and enable it only if
  those features are present. Today doing this is a bit
  messy in cpu-features.c.


> [1] https://sourceware.org/bugzilla/show_bug.cgi?id=24080
 

-- 
Cheers,
Carlos.


  reply	other threads:[~2020-03-17 21:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-17  4:46 [PATCH 0/3] RFC: Platform Support for AMD Zen and AVX2/AVX Prem Mallappa via Libc-alpha
2020-03-17  4:46 ` [PATCH 1/3] x86: Refactor platform support in cpu_features Prem Mallappa via Libc-alpha
2020-03-17  4:46 ` [PATCH 2/3] x86: Add AMD Zen and AVX2/AVX platform support Prem Mallappa via Libc-alpha
2020-03-17  4:46 ` [PATCH 3/3] x86: test to load from PLATFORM path Prem Mallappa via Libc-alpha
2020-03-17  9:02 ` [PATCH 0/3] RFC: Platform Support for AMD Zen and AVX2/AVX Florian Weimer
2020-03-17 13:17   ` Carlos O'Donell via Libc-alpha
2020-03-17 19:27     ` Adhemerval Zanella via Libc-alpha
2020-03-17 21:37       ` Carlos O'Donell via Libc-alpha [this message]
2020-03-27 14:26         ` Florian Weimer

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

  List information: https://www.gnu.org/software/libc/involved.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=11fbb273-bced-f806-d949-3a3bd2f54818@redhat.com \
    --to=libc-alpha@sourceware.org \
    --cc=adhemerval.zanella@linaro.org \
    --cc=carlos@redhat.com \
    /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).