From: Huang Ying <ying.huang@linux.intel.com>
To: Mel Gorman <mgorman@suse.de>
Cc: LKML <linux-kernel@vger.kernel.org>, LKP ML <lkp@01.org>
Subject: Re: [LKP] [mm] 3484b2de949: -46.2% aim7.jobs-per-min
Date: Sat, 28 Feb 2015 15:30:04 +0800 [thread overview]
Message-ID: <1425108604.10337.84.camel@linux.intel.com> (raw)
In-Reply-To: <20150228014642.GG3087@suse.de>
On Sat, 2015-02-28 at 01:46 +0000, Mel Gorman wrote:
> On Fri, Feb 27, 2015 at 03:21:36PM +0800, Huang Ying wrote:
> > FYI, we noticed the below changes on
> >
> > git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> > commit 3484b2de9499df23c4604a513b36f96326ae81ad ("mm: rearrange zone fields into read-only, page alloc, statistics and page reclaim lines")
> >
> > The perf cpu-cycles for spinlock (zone->lock) increased a lot. I suspect there are some cache ping-pong or false sharing.
> >
>
> Are you sure about this result? I ran similar tests here and found that
> there was a major regression introduced near there but it was commit
> 05b843012335 ("mm: memcontrol: use root_mem_cgroup res_counter") that
> cause the problem and it was later reverted. On local tests on a 4-node
> machine, commit 3484b2de9499df23c4604a513b36f96326ae81ad was within 1%
> of the previous commit and well within the noise.
After applying the below debug patch, the performance regression
restored. So I think we can root cause this regression to be cache line
alignment related issue?
If my understanding were correct, after the 3484b2de94, lock and low
address area free_area are in the same cache line, so that the cache
line of the lock and the low address area of free_area will be switched
between MESI "E" and "S" state because it is written in one CPU (page
allocating with free_area) and frequently read (spinning on lock) in
another CPU.
Best Regards,
Huang, Ying
---
include/linux/mmzone.h | 2 ++
1 file changed, 2 insertions(+)
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -468,6 +468,8 @@ struct zone {
/* Write-intensive fields used from the page allocator */
spinlock_t lock;
+ ZONE_PADDING(_pad_xx_)
+
/* free areas of different sizes */
struct free_area free_area[MAX_ORDER];
next prev parent reply other threads:[~2015-02-28 7:30 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-27 7:21 [LKP] [mm] 3484b2de949: -46.2% aim7.jobs-per-min Huang Ying
2015-02-27 11:53 ` Mel Gorman
2015-02-28 1:24 ` Huang Ying
2015-02-28 7:57 ` Huang Ying
2015-02-28 1:46 ` Mel Gorman
2015-02-28 2:30 ` Huang Ying
2015-02-28 2:42 ` Huang Ying
2015-02-28 7:30 ` Huang Ying [this message]
2015-03-05 5:34 ` Huang Ying
2015-03-05 10:26 ` Mel Gorman
2015-03-23 8:46 ` Huang Ying
2015-03-25 10:54 ` Mel Gorman
2015-03-27 8:49 ` Huang Ying
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=1425108604.10337.84.camel@linux.intel.com \
--to=ying.huang@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@01.org \
--cc=mgorman@suse.de \
/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