This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v2 1/2] Add framework for tunables


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]