public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Szabolcs Nagy <szabolcs.nagy@arm.com>
To: Kemi Wang <kemi.wang@intel.com>,
	Adhemerval Zanella <adhemerval.zanella@linaro.org>,
	Florian Weimer <fweimer@redhat.com>, Rical Jason <rj@2c3t.io>,
	Carlos Donell <carlos@redhat.com>,
	Glibc alpha <libc-alpha@sourceware.org>
Cc: nd@arm.com, 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 v3 1/3] Tunables: Add tunables of spin count for pthread adaptive spin mutex
Date: Thu, 07 Jun 2018 13:07:00 -0000	[thread overview]
Message-ID: <339c2b6d-5175-efff-ca17-a964c15a1b3c@arm.com> (raw)
In-Reply-To: <1527067354-13333-1-git-send-email-kemi.wang@intel.com>

On 23/05/18 10:22, Kemi Wang wrote:
> This patch does not have any functionality change, we only provide a spin
> count tunes for pthread adaptive spin mutex. The tunable
> glibc.mutex.spin_count tunes can be used by system administrator to squeeze
> system performance according to different hardware capabilities and
> workload characteristics.
> 
> The maximum value of spin count is limited to 30000 to avoid the overflow
> of mutex->__data.__spins variable with the possible type of short in
> pthread_mutex_lock ().
> 
> The default value of spin count is set to 100 with the reference to the
> previous number of times of spinning via trylock. This value would be
> architecture-specific and can be tuned with kinds of benchmarks to fit most
> cases in future.
> 

i'm not against this tunable, but do ppl use
PTHREAD_MUTEX_ADAPTIVE_NP in practice?

it's a non-standard extension, if the normal mutex is not
good enough that should be fixed (e.g. it should do some
spinning on SMP systems if that's useful in general, the
futex syscall overhead is way bigger than a few atomic loads).

  parent reply	other threads:[~2018-06-07 13:07 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-23  9:25 Kemi Wang
2018-05-23  9:25 ` [PATCH v3 3/3] Mutex: Replace trylock by read only while spinning Kemi Wang
2018-05-23  9:25 ` [PATCH v3 2/3] benchtests: Add pthread adaptive spin mutex microbenchmark Kemi Wang
2018-05-25  8:52 ` [PATCH v3 1/3] Tunables: Add tunables of spin count for pthread adaptive spin mutex Wang, Kemi
2018-05-30  3:03   ` kemi
2018-06-07  4:57     ` kemi
2018-06-07 13:07 ` Szabolcs Nagy [this message]
2018-06-07 14:58   ` Wang, Kemi
2018-06-07 13:09 ` Florian Weimer
2018-06-07 15:00   ` Wang, Kemi
2018-06-08  8:02   ` kemi
2018-06-08 14:54     ` Florian Weimer
2018-06-14  1:39       ` kemi
2018-06-07 13:10 ` Florian Weimer
2018-06-07 15:02   ` Wang, 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=339c2b6d-5175-efff-ca17-a964c15a1b3c@arm.com \
    --to=szabolcs.nagy@arm.com \
    --cc=aaron.lu@intel.com \
    --cc=adhemerval.zanella@linaro.org \
    --cc=andi.kleen@intel.com \
    --cc=aubrey.li@intel.com \
    --cc=carlos@redhat.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=fweimer@redhat.com \
    --cc=kemi.wang@intel.com \
    --cc=libc-alpha@sourceware.org \
    --cc=nd@arm.com \
    --cc=rj@2c3t.io \
    --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).