x86: Add bounds `x86_non_temporal_threshold`
authorNoah Goldstein <goldstein.w.n@gmail.com>
Wed, 15 Jun 2022 17:41:29 +0000 (10:41 -0700)
committerNoah Goldstein <goldstein.w.n@gmail.com>
Wed, 15 Jun 2022 21:25:55 +0000 (14:25 -0700)
commitb446822b6ae4e8149902a78cdd4a886634ad6321
tree417d3ee01f93bd92db817203660b6f8591f625f8
parent686216945a7873237bf892bbe38a2eef23aadeba
x86: Add bounds `x86_non_temporal_threshold`

The lower-bound (16448) and upper-bound (SIZE_MAX / 16) are assumed
by memmove-vec-unaligned-erms.

The lower-bound is needed because memmove-vec-unaligned-erms unrolls
the loop aggressively in the L(large_memset_4x) case.

The upper-bound is needed because memmove-vec-unaligned-erms
right-shifts the value of `x86_non_temporal_threshold` by
LOG_4X_MEMCPY_THRESH (4) which without a bound may overflow.

The lack of lower-bound can be a correctness issue. The lack of
upper-bound cannot.
manual/tunables.texi
sysdeps/x86/dl-cacheinfo.h