From: Nathan Zimmer <nzimmer@sgi.com>
To: Vlastimil Babka <vbabka@suse.cz>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Nadia Yvette Chambers <nyc@holomorphy.com>,
Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>,
Mel Gorman <mgorman@suse.de>,
"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH] mempolicy: convert the shared_policy lock to a rwlock
Date: Wed, 18 Nov 2015 14:05:35 -0600 [thread overview]
Message-ID: <564CDA0F.40801@sgi.com> (raw)
In-Reply-To: <564C820D.1060105@suse.cz>
On 11/18/2015 07:50 AM, Vlastimil Babka wrote:
> On 11/17/2015 05:17 PM, Nathan Zimmer wrote:
>> When running the SPECint_rate gcc on some very large boxes it was noticed
>> that the system was spending lots of time in mpol_shared_policy_lookup.
>> The gamess benchmark can also show it and is what I mostly used to chase
>> down the issue since the setup for that I found a easier.
>>
>> To be clear the binaries were on tmpfs because of disk I/O reqruirements.
>> We then used text replication to avoid icache misses and having all the
>> copies banging on the memory where the instruction code resides.
>> This results in us hitting a bottle neck in mpol_shared_policy_lookup
>> since lookup is serialised by the shared_policy lock.
>>
>> I have only reproduced this on very large (3k+ cores) boxes. The problem
>> starts showing up at just a few hundred ranks getting worse until it
>> threatens to livelock once it gets large enough.
>> For example on the gamess benchmark at 128 ranks this area consumes only
>> ~1% of time, at 512 ranks it consumes nearly 13%, and at 2k ranks it is
>> over 90%.
>>
>> To alleviate the contention on this area I converted the spinslock to a
>> rwlock. This allows the large number of lookups to happen simultaneously.
>> The results were quite good reducing this to consumtion at max ranks to
>> around 2%.
> At first glance it seems that RCU would be a good fit here and achieve even
> better lookup scalability, have you considered it?
>
Originally that was my plan but when I saw how good the results were
with the rwlock, I chickened out and took the less prone to mistakes way.
I should also note that the 2% time left in system is not from this lookup
but another area.
Nate
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2015-11-18 20:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-12 17:11 [RFC] mempolicy: convert the shared_policy lock to a rwlock Nathan Zimmer
2015-11-12 21:10 ` David Rientjes
2015-11-17 16:17 ` [PATCH] " Nathan Zimmer
2015-11-18 13:50 ` Vlastimil Babka
2015-11-18 20:05 ` Nathan Zimmer [this message]
2015-11-19 10:50 ` Vlastimil Babka
2015-12-21 13:15 ` Vlastimil Babka
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=564CDA0F.40801@sgi.com \
--to=nzimmer@sgi.com \
--cc=akpm@linux-foundation.org \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@suse.de \
--cc=n-horiguchi@ah.jp.nec.com \
--cc=nyc@holomorphy.com \
--cc=vbabka@suse.cz \
/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 NNTP newsgroup(s).