diff mbox series

x86: Remove the default REP MOVSB threshold tunable value [BZ #27061]

Message ID 20201213145143.809557-1-hjl.tools@gmail.com
State Superseded
Delegated to: Carlos O'Donell
Headers show
Series x86: Remove the default REP MOVSB threshold tunable value [BZ #27061] | expand

Commit Message

H.J. Lu Dec. 13, 2020, 2:51 p.m. UTC
Since the default REP MOVSB threshold is 2048 * (vector size / 16),
remove its default tunable value so that the correct default value
will be set correctly by init_cacheinfo ().
---
 sysdeps/x86/dl-tunables.list | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

Carlos O'Donell Dec. 14, 2020, 2:59 p.m. UTC | #1
On 12/13/20 9:51 AM, H.J. Lu via Libc-alpha wrote:
> Since the default REP MOVSB threshold is 2048 * (vector size / 16),
> remove its default tunable value so that the correct default value
> will be set correctly by init_cacheinfo ().

This is a failure in the tunables framework. We should have internal
APIs to detect:
* Set by user.
* Still set to default.
I've run into this before when we were looking at some of the other
tunables for x86. Please file an enhancement request for this and
then we can look at implementing this and adding back the defaults.

OK with the typo fix and upstream bug reference.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>

> ---
>  sysdeps/x86/dl-tunables.list | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/sysdeps/x86/dl-tunables.list b/sysdeps/x86/dl-tunables.list
> index 1a4a93a070..348616fb69 100644
> --- a/sysdeps/x86/dl-tunables.list
> +++ b/sysdeps/x86/dl-tunables.list
> @@ -39,9 +39,10 @@ glibc {
>        # REP MOVSB.  Since larger register size can move more data with a
>        # single load and store, the threshold is higher with larger register
>        # size.  Note: Since the REP MOVSB threshold must be greater than 8
> -      # times of vector size, the minium value must be updated at run-time.
> +      # times of vector size and the default value is 2048 * (vector size
> +      # / 16), the default value and the minium value must be updated at

s/minium/minimum/g

Please add references to upstream bug.

> +      # run-time.
>        minval: 1
> -      default: 2048
>      }
>      x86_rep_stosb_threshold {
>        type: SIZE_T
>
diff mbox series

Patch

diff --git a/sysdeps/x86/dl-tunables.list b/sysdeps/x86/dl-tunables.list
index 1a4a93a070..348616fb69 100644
--- a/sysdeps/x86/dl-tunables.list
+++ b/sysdeps/x86/dl-tunables.list
@@ -39,9 +39,10 @@  glibc {
       # REP MOVSB.  Since larger register size can move more data with a
       # single load and store, the threshold is higher with larger register
       # size.  Note: Since the REP MOVSB threshold must be greater than 8
-      # times of vector size, the minium value must be updated at run-time.
+      # times of vector size and the default value is 2048 * (vector size
+      # / 16), the default value and the minium value must be updated at
+      # run-time.
       minval: 1
-      default: 2048
     }
     x86_rep_stosb_threshold {
       type: SIZE_T