This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v2 1/2] Add framework for tunables
- From: "Tulio Magno Quites Machado Filho" <tuliom at linux dot vnet dot ibm dot com>
- To: Siddhesh Poyarekar <sid at reserved-bit dot com>
- Cc: libc-alpha at sourceware dot org, roland at hack dot frob dot com, carlos at redhat dot com, Andi Kleen <andi at firstfloor dot org>, "Paul E. Murphy" <murphyp at linux dot vnet dot ibm dot com>, munroesj at linux dot vnet dot ibm dot com
- Cc:
- Date: Wed, 03 Feb 2016 11:47:43 -0200
- Subject: Re: [PATCH v2 1/2] Add framework for tunables
- Authentication-results: sourceware.org; auth=none
- References: <20160116185545 dot GA17772 at devel dot intra dot reserved-bit dot com>
Siddhesh Poyarekar <sid@reserved-bit.com> writes:
> The tunables framework allows us to uniformly manage and expose global
> variables inside glibc as switches to users. tunables/README has
> instructions for glibc developers to add new tunables.
>
> Tunables support can be enabled by passing the --enable-tunables
> configure flag to the configure script. This patch only adds a
> framework and does not pose any limitations on how tunable values are
> read from the user. It also adds environment variables used in malloc
> behaviour tweaking to the tunables framework as a PoC of the
> compatibility interface.
LGTM, but I have some cosmetic comments.
I tested this on powerpc, powerpc64 and powerpc64le.
> diff --git a/tunables/README b/tunables/README
> new file mode 100644
> index 0000000..02a3f7a
> --- /dev/null
> +++ b/tunables/README
> @@ -0,0 +1,93 @@
> + TUNABLE FRAMEWORK
> + =================
> +
> +The tunable framework allows modules within glibc to register variables that
Tunables instead of tunable?
Both in the subject and in the previous line.
> diff --git a/tunables/tunables.c b/tunables/tunables.c
> new file mode 100644
> index 0000000..8834aff
> --- /dev/null
> +++ b/tunables/tunables.c
> @@ -0,0 +1,163 @@
> ...
> +
> +/* Initialize tunables from the GLIBC_TUNABLES environment variable. The
> + variable is set as colon separated name=value pairs. This routine may be
> + called from the constructor of either libpthread.so or lic.so. Constructor
s/lic.so/libc.so/
> diff --git a/tunables/tunables.h b/tunables/tunables.h
> new file mode 100644
> index 0000000..6aef30e
> --- /dev/null
> +++ b/tunables/tunables.h
> @@ -0,0 +1,110 @@
> ...
> +/* Register a tunable ID in namespace NS inside the glibc top namespace with
> + SET as the setter function. */
> +#define TUNABLE_REGISTER(ns,id,set) \
> + TUNABLE_REGISTER_FULL (TOP_NAMESPACE, ns, id, set)
> +
> +/* Register a tunable ID in namespace NS inside the TNS top namespace with
> + SET as the setter function. */
> +#define TUNABLE_REGISTER_FULL(tns,ns,id,set) \
> + __tunable_register (TUNABLE_ENUM_NAME (tns, ns, id), (set))
> +
> +
^
Is this character intentional?
--
Tulio Magno