From: Mel Gorman <mel@csn.ul.ie>
To: Michel Lespinasse <walken@google.com>
Cc: Rik van Riel <riel@redhat.com>,
Wu Fengguang <fengguang.wu@intel.com>,
"H. Peter Anvin" <hpa@zytor.com>,
linux-arch@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org, Ying Han <yinghan@google.com>,
Andrea Arcangeli <aarcange@redhat.com>
Subject: [BUG] Commit d065bd81 severely regresses huge page allocation success rates
Date: Thu, 11 Nov 2010 12:15:46 +0000 [thread overview]
Message-ID: <20101111121545.GF19679@csn.ul.ie> (raw)
When testing 2.6.37-rc1, I noticed that huge page allocation success
rates were severely impaired. Bisection showed that commit [d065bd81: mm:
retry page fault when blocking on disk transfer] was the biggest factor.
Reverting the patch confirmed this. Here are the results of a high-order
allocation stress test. The vanilla kernel is 2.6.37-rc1 and the revert
kernel has this commit removed with minor conflicts cleaned up.
STRESS-HIGHALLOC
highalloc-vanilla revert-d065bd81
Pass 1 7.00 ( 0.00%) 73.00 (66.00%)
Pass 2 7.00 ( 0.00%) 92.00 (85.00%)
At Rest 13.00 ( 0.00%) 93.00 (80.00%)
The "pass 1" and "pass 2" are allocation attempts while the machine is
under heavy load. One might expect that allocations fail there but when the
machine is fully at rest, all memory freed and nothing else is going on,
the pages still cannot be allocated.
I had ftrace enabled and found this.
FTrace Reclaim Statistics: vmscan
vanilla revert-d065bd81
Direct reclaims 3687 889
Direct reclaim pages scanned 39767013 195182
Direct reclaim pages reclaimed 115079 107891
Direct reclaim write file async I/O 13598 5777
Direct reclaim write anon async I/O 70886 40954
Direct reclaim write file sync I/O 0 0
Direct reclaim write anon sync I/O 37 178
Wake kswapd requests 6508 868
Kswapd wakeups 1291 521
Kswapd pages scanned 77859381 3240330
Kswapd pages reclaimed 2548099 1965881
Kswapd reclaim write file async I/O 51266 56838
Kswapd reclaim write anon async I/O 935070 392199
Kswapd reclaim write file sync I/O 0 0
Kswapd reclaim write anon sync I/O 0 0
Time stalled direct reclaim (seconds) 1160.57 636.24
Time kswapd awake (seconds) 1453.81 654.25
Total pages scanned 117626394 3435512
Total pages reclaimed 2663178 2073772
%age total pages scanned/reclaimed 2.26% 60.36%
%age total pages scanned/written 0.91% 14.44%
%age file pages scanned/written 0.06% 1.82%
Percentage Time Spent Direct Reclaim 25.92% 15.98%
Percentage Time kswapd Awake 65.57% 36.01%
Reverting the commit improves overall reclaim behaviour when allocating huge
pages. Note in particular the low percentage for scanned/reclaimed in the
vanilla kernel which implies the vanilla kernel is endlessly scans pages it
cannot reclaim. I also note that with the vanilla kernel that nr_inactive_*
remains high but when the patch is reverted, it drops implying that the
patch is preventing pages being reclaimed.
It does not make a difference if compaction is used - the figures are
still brutal.
I have not digested what the patch is doing but am reporting it in case
people familiar with the patch spot the problem quickly.
--
Mel Gorman
Part-time Phd Student Linux Technology Center
University of Limerick IBM Dublin Software Lab
next reply other threads:[~2010-11-11 12:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-11 12:15 Mel Gorman [this message]
2010-11-11 12:15 ` [BUG] Commit d065bd81 severely regresses huge page allocation success rates Mel Gorman
2010-11-11 12:25 ` Michel Lespinasse
2010-11-11 14:25 ` Mel Gorman
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=20101111121545.GF19679@csn.ul.ie \
--to=mel@csn.ul.ie \
--cc=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=fengguang.wu@intel.com \
--cc=hpa@zytor.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=riel@redhat.com \
--cc=walken@google.com \
--cc=yinghan@google.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