public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Rical Jasan <rj@2c3t.io>
To: Kemi Wang <kemi.wang@intel.com>,
	Adhemerval Zanella <adhemerval.zanella@linaro.org>,
	Glibc alpha <libc-alpha@sourceware.org>
Cc: Dave Hansen <dave.hansen@linux.intel.com>,
	Tim Chen <tim.c.chen@intel.com>,
	Andi Kleen <andi.kleen@intel.com>,
	Ying Huang <ying.huang@intel.com>, Aaron Lu <aaron.lu@intel.com>,
	Lu Aubrey <aubrey.li@intel.com>
Subject: Re: [PATCH v2 1/3] Tunables: Add tunables of spin count for pthread adaptive spin mutex
Date: Wed, 25 Apr 2018 04:02:00 -0000	[thread overview]
Message-ID: <4be95d44-6f73-d6f8-c60b-6f7be7361ef4@2c3t.io> (raw)
In-Reply-To: <1524624988-29141-1-git-send-email-kemi.wang@intel.com>

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:

> +@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"

> +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.

> +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."

> +
> +The default value of this tunable is @samp{1000}.
> +@end deftp
> +
>  @node Hardware Capability Tunables
>  @section Hardware Capability Tunables
>  @cindex hardware capability tunables

Rical

  parent reply	other threads:[~2018-04-25  4:02 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-25  2:59 Kemi Wang
2018-04-25  2:59 ` [PATCH v2 2/3] benchtests: Add pthread adaptive spin mutex microbenchmark Kemi Wang
2018-04-25  2:59 ` [PATCH v2 3/3] Mutex: Optimize adaptive spin algorithm Kemi Wang
2018-05-02  8:19   ` Florian Weimer
2018-05-02 11:07     ` kemi
2018-05-08 15:08       ` Florian Weimer
2018-05-14  8:12         ` kemi
2018-04-25  4:02 ` Rical Jasan [this message]
2018-04-25  5:14   ` [PATCH v2 1/3] Tunables: Add tunables of spin count for pthread adaptive spin mutex kemi
2018-05-02  1:54 ` kemi
2018-05-02  8:04 ` Florian Weimer
2018-05-02 11:08   ` kemi
2018-05-08 15:44     ` Florian Weimer
2018-05-14  4:06       ` kemi
2018-05-14  5:05         ` kemi
2018-05-14  7:30         ` Florian Weimer
2018-05-14  7:39           ` kemi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4be95d44-6f73-d6f8-c60b-6f7be7361ef4@2c3t.io \
    --to=rj@2c3t.io \
    --cc=aaron.lu@intel.com \
    --cc=adhemerval.zanella@linaro.org \
    --cc=andi.kleen@intel.com \
    --cc=aubrey.li@intel.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=kemi.wang@intel.com \
    --cc=libc-alpha@sourceware.org \
    --cc=tim.c.chen@intel.com \
    --cc=ying.huang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).