From: Rabin Vincent <rabin@rab.in>
To: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: linux-mm@kvack.org, LKML <linux-kernel@vger.kernel.org>
Subject: CMA and zone watermarks
Date: Mon, 8 Oct 2012 17:41:14 +0200 [thread overview]
Message-ID: <CAH+eYFCJTtF+FeqKs_ho5yyX0tkUBoaa-yfsd1rVshcQ5Xxp=A@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1235 bytes --]
It appears that when CMA is enabled, the zone watermarks are not properly
respected, leading to for example GFP_NOWAIT allocations getting access to the
high pools.
I ran the following test code which simply allocates pages with GFP_NOWAIT
until it fails, and then tries GFP_ATOMIC. Without CMA, the GFP_ATOMIC
allocation succeeds, with CMA, it fails too.
Logs attached (includes my patch which prints the migration type in the failure
message http://marc.info/?l=linux-mm&m=134971041701306&w=2), taken on 3.6
kernel.
Thanks.
diff --git a/arch/arm/mach-ux500/board-mop500.c
b/arch/arm/mach-ux500/board-mop500.c
index a534d88..b98d0df 100644
--- a/arch/arm/mach-ux500/board-mop500.c
+++ b/arch/arm/mach-ux500/board-mop500.c
@@ -854,3 +854,25 @@ DT_MACHINE_START(U8500_DT, "ST-Ericsson U8500
platform (Device Tree Support)")
.dt_compat = u8500_dt_board_compat,
MACHINE_END
#endif
+
+static int __init late(void)
+{
+ while (1) {
+ void *p;
+
+ p = alloc_page(GFP_NOWAIT);
+ if (!p) {
+ pr_err("GFP_NOWAIT failed, checking GFP_ATOMIC");
+
+ p = alloc_page(GFP_ATOMIC);
+ if (!p)
+ panic("GFP_ATOMIC failed too, fail!");
+
+ panic("GFP_ATOMIC OK, all good\n");
+ }
+
+ }
+
+ return 0;
+}
+late_initcall(late);
[-- Attachment #2: cmalog.txt.gz --]
[-- Type: application/x-gzip, Size: 6122 bytes --]
next reply other threads:[~2012-10-08 15:41 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-08 15:41 Rabin Vincent [this message]
2012-10-09 0:37 ` Marek Szyprowski
2012-10-09 15:25 ` Rabin Vincent
2012-10-09 3:10 ` Minchan Kim
2012-10-09 3:12 ` Marek Szyprowski
2012-10-09 4:43 ` Minchan Kim
2012-10-09 4:53 ` Marek Szyprowski
2012-10-09 5:07 ` Minchan Kim
2012-10-09 5:16 ` Marek Szyprowski
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='CAH+eYFCJTtF+FeqKs_ho5yyX0tkUBoaa-yfsd1rVshcQ5Xxp=A@mail.gmail.com' \
--to=rabin@rab.in \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=m.szyprowski@samsung.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