From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: Siddhesh Poyarekar <siddhesh@sourceware.org>, libc-alpha@sourceware.org
Cc: fweimer@redhat.com
Subject: Re: [PATCH 3/3] x86: Use SIZE_MAX instead of (long int)-1 for tunable range value
Date: Thu, 4 Feb 2021 14:25:40 -0300 [thread overview]
Message-ID: <75dd8025-74ae-eff0-d355-66383c680edf@linaro.org> (raw)
In-Reply-To: <20210203173406.2075480-4-siddhesh@sourceware.org>
On 03/02/2021 14:34, Siddhesh Poyarekar via Libc-alpha wrote:
> The tunable types are SIZE_T, so set the ranges to the correct maximum
> value, i.e. SIZE_MAX.
LGTM, thanks.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
> ---
> sysdeps/x86/dl-cacheinfo.h | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/sysdeps/x86/dl-cacheinfo.h b/sysdeps/x86/dl-cacheinfo.h
> index e0a72568d8..6f91651f0d 100644
> --- a/sysdeps/x86/dl-cacheinfo.h
> +++ b/sysdeps/x86/dl-cacheinfo.h
> @@ -917,14 +917,14 @@ dl_init_cacheinfo (struct cpu_features *cpu_features)
> rep_stosb_threshold = TUNABLE_GET (x86_rep_stosb_threshold,
> long int, NULL);
>
> - TUNABLE_SET_WITH_BOUNDS (x86_data_cache_size, data, 0, (long int) -1);
> - TUNABLE_SET_WITH_BOUNDS (x86_shared_cache_size, shared, 0, (long int) -1);
> + TUNABLE_SET_WITH_BOUNDS (x86_data_cache_size, data, 0, SIZE_MAX);
> + TUNABLE_SET_WITH_BOUNDS (x86_shared_cache_size, shared, 0, SIZE_MAX);
> TUNABLE_SET_WITH_BOUNDS (x86_non_temporal_threshold, non_temporal_threshold,
> - 0, (long int) -1);
> + 0, SIZE_MAX);
> TUNABLE_SET_WITH_BOUNDS (x86_rep_movsb_threshold, rep_movsb_threshold,
> - minimum_rep_movsb_threshold, (long int) -1);
> + minimum_rep_movsb_threshold, SIZE_MAX);
> TUNABLE_SET_WITH_BOUNDS (x86_rep_stosb_threshold, rep_stosb_threshold, 1,
> - (long int) -1);
> + SIZE_MAX);
> #endif
>
> cpu_features->data_cache_size = data;
>
prev parent reply other threads:[~2021-02-04 17:25 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-03 17:34 [PATCH 0/3] TUNABLE_SET fixes Siddhesh Poyarekar
2021-02-03 17:34 ` [PATCH 1/3] Fix casts when setting tunable range Siddhesh Poyarekar
2021-02-04 13:44 ` Adhemerval Zanella
2021-02-04 14:55 ` Siddhesh Poyarekar
2021-02-03 17:34 ` [PATCH 2/3] tunables: Remove C type arg from TUNABLE_SET* macros Siddhesh Poyarekar
2021-02-04 17:24 ` Adhemerval Zanella
2021-02-04 18:02 ` Siddhesh Poyarekar
2021-02-04 19:37 ` Adhemerval Zanella
2021-02-04 19:42 ` H.J. Lu
2021-02-05 2:30 ` Siddhesh Poyarekar
2021-02-05 2:31 ` Siddhesh Poyarekar
2021-02-03 17:34 ` [PATCH 3/3] x86: Use SIZE_MAX instead of (long int)-1 for tunable range value Siddhesh Poyarekar
2021-02-04 17:25 ` Adhemerval Zanella [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=75dd8025-74ae-eff0-d355-66383c680edf@linaro.org \
--to=adhemerval.zanella@linaro.org \
--cc=fweimer@redhat.com \
--cc=libc-alpha@sourceware.org \
--cc=siddhesh@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).