From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6993 invoked by alias); 9 Jul 2018 01:08:53 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 6981 invoked by uid 89); 9 Jul 2018 01:08:52 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_LAZY_DOMAIN_SECURITY autolearn=ham version=3.3.2 spammy=audience X-HELO: mga02.intel.com Subject: Re: [PATCH v7 1/2] Mutex: Add pthread mutex tunables To: Rical Jasan , Carlos O'Donell Cc: Adhemerval Zanella , Florian Weimer , Glibc alpha , Dave Hansen , Tim Chen , Andi Kleen , Ying Huang , Aaron Lu , Lu Aubrey References: <1530863409-326-1-git-send-email-kemi.wang@intel.com> <68bc2770-0b82-1dd7-9022-4c2d022bdd9f@2c3t.io> From: kemi Message-ID: Date: Mon, 09 Jul 2018 01:08:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <68bc2770-0b82-1dd7-9022-4c2d022bdd9f@2c3t.io> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-SW-Source: 2018-07/txt/msg00230.txt.bz2 Hi, Rical Thanks for your time to review. On 2018年07月07日 06:47, Rical Jasan wrote: > 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. > agree. >>> * 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. > Agree. >>> +@section Pthread Mutex Tunables >> >> Mutex Tunables > > Why call the node POSIX Thread Tunables but the section Mutex Tunables? > I tend to keep the same name unless there is some other reason. >>> +@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 > Do you suggest to include all of these Concept Index entry? >>> + >>> +@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. > OK. Will fold it. > Also, "the maximum spin count is reached". > OK. >>> @node Hardware Capability Tunables >>> @section Hardware Capability Tunables >>> @cindex hardware capability tunables > > Rical >