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 v7 1/2] Mutex: Add pthread mutex tunables


On 07/06/2018 10:53 AM, Carlos O'Donell wrote:
> On 07/06/2018 03:50 AM, Kemi Wang wrote:
...
>> diff --git a/manual/tunables.texi b/manual/tunables.texi
>> index be33c9f..8cdfde1 100644
>> --- a/manual/tunables.texi
>> +++ b/manual/tunables.texi
>> @@ -32,6 +32,7 @@ their own namespace.
>>  * Tunable names::  The structure of a tunable name
>>  * Memory Allocation Tunables::  Tunables in the memory allocation subsystem
>>  * Elision Tunables::  Tunables in elision subsystem
>> +* Pthread Mutex Tunables:: Tunables in pthread subsystem
> 
> POSIX Thread Tunables:: Tunables in the POSIX thread subsystem

Good.

>>  * Hardware Capability Tunables::  Tunables that modify the hardware
>>  				  capabilities seen by @theglibc{}
>>  @end menu
>> @@ -281,6 +282,28 @@ of try lock attempts.
>>  The default value of this tunable is @samp{3}.
>>  @end deftp
>>  
>> +@node Pthread Mutex Tunables
> 
> POSIX Thread Tunables

Good.

>> +@section Pthread Mutex Tunables
> 
> Mutex Tunables

Why call the node POSIX Thread Tunables but the section Mutex Tunables?

>> +@cindex pthread mutex tunables
> 
> thread mutex tunables

I have no objection to loading up the Concept Index.  It's meant for
second-guessing your audience; e.g.:

@cindex pthread mutex tunables
@cindex thread mutex tunables
@cindex mutex tunables
@cindex tunables thread mutex

>> +
>> +@deftp {Tunable namespace} glibc.pthread
>> +The behavior of pthread mutexes can be tuned to gain performance improvements
>> +according to specific hardware capabilities and workload characteristics by
>> +setting the following tunables in the @code{pthread} namespace:
> 
> The behavior of POSIX threads can be tuned to gain performance improvements
> according to specific hardware capabilities and workload characteristics by
> setting the following tunables in the @code{pthread} namespace:

Good.

>> +@end deftp
>> +
>> +@deftp Tunable glibc.pthread.mutex_spin_count
>> +The @code{glibc.pthread.mutex_spin_count} tunable sets the maximum number of times
>> +a thread should spin on the lock before calling into the kernel to block.
>> +Adaptive spin is used for mutexes initialized with the PTHREAD_MUTEX_ADAPTIVE_NP
>> +GNU extension.  It affects both pthread_mutex_lock and pthread_mutex_timedlock.
>> +
>> +The spinning is done until either the maximum spin times is reached or
>> +the lock is acquired.
>> +
>> +The default value of this tunable is @samp{100}.
>> +@end deftp
>> +
> 
> OK.

I think PTHREAD_MUTEX_ADAPTIVE_NP and pthread_mutex_(timed)?lock should
be in @code.

Also, "the maximum spin count is reached".

>>  @node Hardware Capability Tunables
>>  @section Hardware Capability Tunables
>>  @cindex hardware capability tunables

Rical


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