diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2020-06-01 14:11:32 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2020-09-29 09:03:47 -0700 |
commit | dfb8e514cf4d770a9ce4e7858a351b9a2893614d (patch) | |
tree | c6d59af2a286ae6a241c23ce26be7d97223741d3 /manual | |
parent | c6702789344043fa998923c8f32ed0bdb2edfa9c (diff) | |
download | glibc-dfb8e514cf4d770a9ce4e7858a351b9a2893614d.tar.gz glibc-dfb8e514cf4d770a9ce4e7858a351b9a2893614d.tar.xz glibc-dfb8e514cf4d770a9ce4e7858a351b9a2893614d.zip |
Set tunable value as well as min/max values
Some tunable values and their minimum/maximum values must be determinted at run-time. Add TUNABLE_SET_WITH_BOUNDS and TUNABLE_SET_WITH_BOUNDS_FULL to update tunable value together with minimum and maximum values. __tunable_set_val is updated to set tunable value as well as min/max values.
Diffstat (limited to 'manual')
-rw-r--r-- | manual/README.tunables | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/manual/README.tunables b/manual/README.tunables index f87a31a65e..fff6c2a87e 100644 --- a/manual/README.tunables +++ b/manual/README.tunables @@ -67,7 +67,7 @@ The list of allowed attributes are: non-AT_SECURE subprocesses. NONE: Read all the time. -2. Use TUNABLE_GET/TUNABLE_SET to get and set tunables. +2. Use TUNABLE_GET/TUNABLE_SET/TUNABLE_SET_WITH_BOUNDS to get and set tunables. 3. OPTIONAL: If tunables in a namespace are being used multiple times within a specific module, set the TUNABLE_NAMESPACE macro to reduce the amount of @@ -112,9 +112,29 @@ form of the macros as follows: where 'glibc' is the top namespace, 'cpu' is the tunable namespace and the remaining arguments are the same as the short form macros. +The minimum and maximum values can updated together with the tunable value +using: + + TUNABLE_SET_WITH_BOUNDS (check, int32_t, val, min, max) + +where 'check' is the tunable name, 'int32_t' is the C type of the tunable, +'val' is a value of same type, 'min' and 'max' are the minimum and maximum +values of the tunable. + +To set the minimum and maximum values of tunables in a different namespace +from that module, use the full form of the macros as follows: + + val = TUNABLE_GET_FULL (glibc, cpu, hwcap_mask, uint64_t, NULL) + + TUNABLE_SET_WITH_BOUNDS_FULL (glibc, cpu, hwcap_mask, uint64_t, val, min, max) + +where 'glibc' is the top namespace, 'cpu' is the tunable namespace and the +remaining arguments are the same as the short form macros. + When TUNABLE_NAMESPACE is not defined in a module, TUNABLE_GET is equivalent to TUNABLE_GET_FULL, so you will need to provide full namespace information for -both macros. Likewise for TUNABLE_SET and TUNABLE_SET_FULL. +both macros. Likewise for TUNABLE_SET, TUNABLE_SET_FULL, +TUNABLE_SET_WITH_BOUNDS and TUNABLE_SET_WITH_BOUNDS_FULL. ** IMPORTANT NOTE ** |