[PATCH v2 1/3] Tunables: Add tunables of spin count for pthread adaptive spin mutex
kemi
kemi.wang@intel.com
Wed Apr 25 05:14:00 GMT 2018
Hi, Rical
Thanks for your help to polish this description.
That's much better than before, I will fold these changes in the next version.
On 2018å¹´04æ25æ¥ 12:02, Rical Jasan wrote:
> On 04/24/2018 07:56 PM, Kemi Wang wrote:
> ...
>> diff --git a/manual/tunables.texi b/manual/tunables.texi
>> index be33c9f..c2cf8c6 100644
>> --- a/manual/tunables.texi
>> +++ b/manual/tunables.texi
>> @@ -281,6 +281,27 @@ of try lock attempts.
>> The default value of this tunable is @samp{3}.
>> @end deftp
>>
>> +@node Pthread Mutex Tunables
>> +@section Pthread Mutex Tunables
>> +@cindex pthread mutex tunables
>> +
>> +@deftp {Tunable namespace} glibc.mutex
>> +Behavior of pthread mutex can be tuned to gain performance improvement
>> +according to specific hardware capability and workload character by setting
>> +the following tunables in the @code{mutex} namespace.
>
> 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{mutex}
> namespace:
>
OK.
>> +@end deftp
>> +
>> +@deftp Tunable glibc.mutex.spin_count
>> +The @code{glibc.mutex.spin_count} tunable sets the maximum spin times that
>> +a thread should spin on the lock before calling into the kernel to block.
>
> "maximum number of times a thread should spin"
>
OK
>> +Adaptive spin is used for the mutex initialized with PTHREAD_MUTEX_ADAPTIVE_NP
>
> "used for mutexes initialized with the"
>
>> +GNU extension. It affects both pthread_mutex_lock and pthread_mutex_timedlock.
>
> Double spaces between sentences.
>
Sure.
>> +The spinning is done in case of either the maximum spin times is reached or
>> +the lock is acquired during spinning.
>
> Why would we spin after we've maxed out spinning (or acquired the lock)?
> Perhaps this should read:
>
> "Spinning is done until either the maximum spin count is reached or the
> lock is acquired."
>
more readable, thanks.
>> +
>> +The default value of this tunable is @samp{1000}.
>> +@end deftp
>> +
>> @node Hardware Capability Tunables
>> @section Hardware Capability Tunables
>> @cindex hardware capability tunables
>
> Rical
>
More information about the Libc-alpha
mailing list