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 V11] Mutex: Add pthread mutex tunables


On 11/30/18 8:38 PM, Kemi Wang wrote:
> ChangeLog:
>     V10->V11:
> 	a) Fix comment style to use GNU style, and fixing indent in
> 	adaptive_spin_count.h.
> 	b) Update Changelog.

This patch is basically done and you should check this into master.

> diff --git a/ChangeLog b/ChangeLog
> index 87d3863..773a7ec 100644
> --- a/ChangeLog
> +++ b/ChangeLog
> @@ -1,3 +1,21 @@

This needs a little cleanup.

> +2018-12-1  Kemi Wang  <kemi.wang@intel.com>
> +
> +	* sysdeps/nptl/dl-tunables.list: Add glibc.pthread.mutex_spin_count entry.
> +	* manual/tunables.texi: Add glibc.pthread.mutex_spin_count description.
> +	* nptl/pthread_mutex_conf.h: New file.
> +	* nptl/pthread_mutex_conf.c: New file.
> +	* nptl/Makefile: Add pthread_mutex_conf.c for compilation.
> +	* nptl/nptl-init.c: Put pthread mutex tunable initialization in pthread
> +	initialization.
> +	* nptl/pthreadP.h: Add a new function max_adaptive_count() to get the
> +	maximum adaptive spin value.
> +	* sysdeps/generic/adaptive_spin_count.h: Move DEFAULT_ADAPTIVE_COUNT
> +	macro to a generic header.
> +	* nptl/pthread_mutex_lock.c: Replace MAX_ADAPTIVE_COUNT by
> +	max_adaptive_count().
> +	* nptl/pthread_mutex_timedlock.c: Replace MAX_ADAPTIVE_COUNT by
> +	max_adaptive_count().

I suggest this:

2018-12-01  Kemi Wang  <kemi.wang@intel.com>

	* manual/tunables.texi (POSIX Thread Tunables): New node.
	* nptl/Makefile (libpthread-routines): Add pthread_mutex_conf.
	* nptl/nptl-init.c: Include pthread_mutex_conf.h
	(__pthread_initialize_minimal_internal) [HAVE_TUNABLES]: Call 
	pthread_tunables_init.
	* nptl/pthreadP.h (MAX_ADAPTIVE_COUNT): Remove.
	(max_adaptive_count): Define.
	* nptl/pthread_mutex_conf.c: New file.
	* nptl/pthread_mutex_conf.h: New file.
	* sysdeps/generic/adaptive_spin_count.h: New file.
	* sysdeps/nptl/dl-tunables.list: New file.
	* nptl/pthread_mutex_lock.c (__pthread_mutex_lock): Use
	max_adaptive_count () not MAX_ADAPTIVE_COUNT.
	* nptl/pthread_mutex_timedlock.c (__pthrad_mutex_timedlock): Likewise.

-- 
Cheers,
Carlos.


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