From: kemi <kemi.wang@intel.com>
To: 'Carlos O'Donell' <carlos@redhat.com>,
Adhemerval Zanella <adhemerval.zanella@linaro.org>,
Florian Weimer <fweimer@redhat.com>, Rical Jason <rj@2c3t.io>,
Glibc alpha <libc-alpha@sourceware.org>
Cc: Dave Hansen <dave.hansen@linux.intel.com>,
"Chen, Tim C" <tim.c.chen@intel.com>,
"Kleen, Andi" <andi.kleen@intel.com>,
"Huang, Ying" <ying.huang@intel.com>,
"Lu, Aaron" <aaron.lu@intel.com>,
"Li, Aubrey" <aubrey.li@intel.com>
Subject: Re: [PATCH v7 2/2] Mutex: Replace trylock by read only while spinning
Date: Wed, 11 Jul 2018 03:21:00 -0000 [thread overview]
Message-ID: <02492c47-0a47-3d4d-7333-bec1dd2172f2@intel.com> (raw)
In-Reply-To: <25017BF213203E48912DB000DE5F5E1E6B8343D2@SHSMSX101.ccr.corp.intel.com>
Hi, Carlos
>> Do you need to do a whole system performance measurement?
>
> I thought the data posted here is good enough to demonstrate the effectiveness of this patch.
> But if you insist, I will try to do something to figure it out.
>
To measure a whole system performance:
We run *two* processes with locking at the same time. Each process has multiple threads, and
each thread do the following:
a) lock
b) delay 1000ns in the critical section
c) unlock
d) delay 6000ns in the non-critical section
in a loop for 5 seconds, and measure the total iterations for each process.
Each test run 4 times with stable testing result.
Test result:
threads base(CAS) head(test and CAS)
28 1681975 1813090(+7.8%)
56 1801954 1890549(+4.9%)
========================cut==========================================
I also run a *single* process and post the test result as below (each test run 4 times with
stable testing result):
threads base(CAS) head(test and CAS)
28 2262848 2274362 (+0.5%)
56 1949439 1994526 (+2.3%)
This is what I got in my test, this change is not a big optimization, but should have some
limited performance improvement. Additionally, the workload I run here is not so Macro
(Some Micro benchmarks make the size of critical section and non-critical section extremely
small), so I believe this change is helpful with some practical workload.
next prev parent reply other threads:[~2018-07-11 3:21 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-06 7:53 [PATCH v7 1/2] Mutex: Add pthread mutex tunables Kemi Wang
2018-07-06 7:53 ` [PATCH v7 2/2] Mutex: Replace trylock by read only while spinning Kemi Wang
2018-07-06 18:04 ` Carlos O'Donell
2018-07-08 14:05 ` Wang, Kemi
2018-07-11 3:21 ` kemi [this message]
2018-07-11 5:39 ` kemi
2018-07-11 9:04 ` kemi
2018-07-06 17:53 ` [PATCH v7 1/2] Mutex: Add pthread mutex tunables Carlos O'Donell
2018-07-06 22:48 ` Rical Jasan
2018-07-09 1:08 ` kemi
2018-07-09 20:23 ` Rical Jasan
2018-07-10 1:04 ` kemi
2018-07-09 1:04 ` 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=02492c47-0a47-3d4d-7333-bec1dd2172f2@intel.com \
--to=kemi.wang@intel.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=libc-alpha@sourceware.org \
--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).