public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: MAHESH BODAPATI <bmahi496@linux.ibm.com>
To: Peter Bergner <bergner@linux.ibm.com>, libc-alpha@sourceware.org
Cc: rajis@linux.ibm.com, Mahesh Bodapati <mahesh.bodapati@ibm.com>
Subject: Re: [PATCH] PowerPC: Influence hwcaps via cpu arch-level GLIBC_TUNABLES.
Date: Tue, 20 Jun 2023 23:15:53 +0530	[thread overview]
Message-ID: <642ac186-f13b-8a0f-e007-5df706d9004b@linux.ibm.com> (raw)
In-Reply-To: <94be5917-3607-6e45-115f-a2f6db95b321@linux.ibm.com>


On 20/06/23 9:50 pm, Peter Bergner wrote:
> On 6/19/23 3:09 AM, bmahi496--- via Libc-alpha wrote:
>> This patch enables the option to influence hwcaps used by the powerpc.
>> The user can set a CPU arch-level tunable like power10 instead of single
>> HWCAP features.
>>
>> The influenced hwcap are stored in the powerpc-specific cpu_features struct.
>>
>> Below are the supported cpu arch-level tunables.
>> -  power10: power10 feature set
>> -  power9: power9 feature set
>> -  power8: power8 feature set
>> -  power7: power7 feature set
>> -  power6: power6 feature set
>> -  power5: power5 feature set
>> -  power4: power4 feature set.
> I'm all for allowing modifying full cpu specific hwcap tunables with one
> "cpu" option, but it's hard to tell whether this change allows modifying
> single HWCAP/HWCAP2 features too.  Say I only want to disable the VSX
> feature or the MMA feature and nothing else.  Does this patch support that?
> We *do* want that ability!
>
This patch will not support single HWCAP/HWCAP2 features. This is only 
for CPU arch-level features.
We can add tunable support for single HWCAP/HWCAP2 in a separate patch.
>
>
>> +            /* we don't disable altivec and vsx */
> This is not a correctly formatted sentence with proper capitalization, etc.
>
I will update the sentence.
>
>> +  if (disable_vsx)
>> +    cpu_features_curr.hwcap &= ~PPC_FEATURE_HAS_VSX;
> Why the special handling for the VSX feature here?  How is it different
> than say the Altivec feature or any of our other feature bits which don't
> have special handling?  It's not obvious to me why we need special handling,
> so it's probably not obvious to others either.  If we really do need special
> handling for this, you should add a comment explaining why.
>
On PowerPC32, The function selection happened through VSX feature on 
some libraries.
Say I set tunable as "power7,power6" then it should set to power6 but 
it's picking the power7 specific code
So I am disabling VSX feature on the machines which are lower than 
power7 and the code should work on the precedence as well,
For suppose "power6,power7" then it should set to power7.
>> +  /* Copy back the supported tunable features */
> Missing a '.' and 2 spaces before the */
>
I will update the sentence.
> Peter
>
>

  reply	other threads:[~2023-06-20 17:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-19  8:09 bmahi496
2023-06-20 16:20 ` Peter Bergner
2023-06-20 17:45   ` MAHESH BODAPATI [this message]
2023-06-21  4:11     ` Peter Bergner
2023-06-21  6:20       ` MAHESH BODAPATI

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=642ac186-f13b-8a0f-e007-5df706d9004b@linux.ibm.com \
    --to=bmahi496@linux.ibm.com \
    --cc=bergner@linux.ibm.com \
    --cc=libc-alpha@sourceware.org \
    --cc=mahesh.bodapati@ibm.com \
    --cc=rajis@linux.ibm.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).