linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Joonsoo Kim <iamjoonsoo.kim@lge.com>
To: Sascha Silbe <x-linux@infra-silbe.de>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Vlastimil Babka <vbabka@suse.cz>,
	mgorman@techsingularity.net, Minchan Kim <minchan@kernel.org>,
	Alexander Potapenko <glider@google.com>,
	Hugh Dickins <hughd@google.com>, Michal Hocko <mhocko@kernel.org>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	Sasha Levin <sasha.levin@oracle.com>
Subject: Re: [v3,6/9] mm/page_owner: use stackdepot to store stacktrace
Date: Thu, 27 Oct 2016 09:17:15 +0900	[thread overview]
Message-ID: <20161027001715.GA5655@js1304-P5Q-DELUXE> (raw)
In-Reply-To: <toe60ofdzuq.fsf@twin.sascha.silbe.org>

Hello,

Thanks for the report.

On Wed, Oct 26, 2016 at 03:06:05PM +0200, Sascha Silbe wrote:
> Dear Joonsoo,
> 
> Joonsoo Kim <js1304@gmail.com> writes:
> 
> > Currently, we store each page's allocation stacktrace on corresponding
> > page_ext structure and it requires a lot of memory.  This causes the
> > problem that memory tight system doesn't work well if page_owner is
> > enabled.  Moreover, even with this large memory consumption, we cannot get
> > full stacktrace because we allocate memory at boot time and just maintain
> > 8 stacktrace slots to balance memory consumption.  We could increase it to
> > more but it would make system unusable or change system behaviour.
> [...]
> 
> This patch causes my Wandboard Quad [1] not to boot anymore. I don't get
> any kernel output, even with earlycon enabled
> (earlycon=ec_imx6q,0x02020000). git bisect pointed towards your patch;
> reverting the patch causes the system to boot fine again. Config is
> available at [2]; none of the defconfigs I tried (defconfig =
> multi_v7_defconfig, imx_v6_v7_defconfig) works for me.
> 
> Haven't looked into this any further so far; hooking up a JTAG adapter
> requires some hardware changes as the JTAG header is unpopulated.
> 
> Sascha
> 
> PS: Please CC me on replies; I'm not subscribed to any of the lists.
> 
> [1] http://www.wandboard.org/index.php/details/wandboard
> [2] https://sascha.silbe.org/tmp/config-4.8.4-wandboard-28-00003-g9e9b5d6
> -- 
> Softwareentwicklung Sascha Silbe, Niederhofenstrasse 5/1, 71229 Leonberg
> https://se-silbe.de/
> USt-IdNr.: DE281696641


I cannot see your config. Link [2] shows "No such file or directory"

Anyway, I find that there is an issue in early boot phase in
!CONFIG_SPARSEMEM. Could you try following one?
(It's an completely untested patch, even I don't try to compile it.)

Thanks.

---------->8---------------
diff --git a/include/linux/page_ext.h b/include/linux/page_ext.h
index 9298c39..db31f58 100644
--- a/include/linux/page_ext.h
+++ b/include/linux/page_ext.h
@@ -47,6 +47,7 @@ struct page_ext {
 };
 
 extern void pgdat_page_ext_init(struct pglist_data *pgdat);
+extern void __init invoke_init_callbacks(void);
 
 #ifdef CONFIG_SPARSEMEM
 static inline void page_ext_init_flatmem(void)
@@ -57,6 +58,7 @@ static inline void page_ext_init_flatmem(void)
 extern void page_ext_init_flatmem(void);
 static inline void page_ext_init(void)
 {
+       invoke_init_callbacks();
 }
 #endif
 
diff --git a/mm/page_ext.c b/mm/page_ext.c
index 121dcff..a405869 100644
--- a/mm/page_ext.c
+++ b/mm/page_ext.c
@@ -91,7 +91,7 @@ static bool __init invoke_need_callbacks(void)
        return need;
 }
 
-static void __init invoke_init_callbacks(void)
+void __init invoke_init_callbacks(void)
 {
        int i;
        int entries = ARRAY_SIZE(page_ext_ops);
@@ -190,7 +190,6 @@ void __init page_ext_init_flatmem(void)
                        goto fail;
        }
        pr_info("allocated %ld bytes of page_ext\n", total_usage);
-       invoke_init_callbacks();
        return;
 
 fail:

--
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>

  reply	other threads:[~2016-10-27  0:16 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-17  7:57 [PATCH v3 0/9] reduce memory usage by page_owner js1304
2016-06-17  7:57 ` [PATCH v3 1/9] mm/compaction: split freepages without holding the zone lock js1304
2016-06-17  7:57 ` [PATCH v3 2/9] mm/page_owner: initialize page owner " js1304
2016-06-17  7:57 ` [PATCH v3 3/9] mm/page_owner: copy last_migrate_reason in copy_page_owner() js1304
2016-06-17  7:57 ` [PATCH v3 4/9] mm/page_owner: introduce split_page_owner and replace manual handling js1304
2016-06-17  7:57 ` [PATCH v3 5/9] tools/vm/page_owner: increase temporary buffer size js1304
2016-06-17 12:56   ` Vlastimil Babka
2016-06-17  7:57 ` [PATCH v3 6/9] mm/page_owner: use stackdepot to store stacktrace js1304
2016-10-26 13:06   ` [v3,6/9] " Sascha Silbe
2016-10-27  0:17     ` Joonsoo Kim [this message]
2016-12-22 23:37       ` Sascha Silbe
2016-06-17  7:57 ` [PATCH v3 7/9] mm/page_owner: avoid null pointer dereference js1304
2016-06-17 13:32   ` Vlastimil Babka
2016-06-24 20:19     ` Andrew Morton
2016-06-17  7:57 ` [PATCH v3 8/9] mm/page_alloc: introduce post allocation processing on page allocator js1304
2016-06-17  7:57 ` [PATCH v3 9/9] mm/page_isolation: clean up confused code js1304
2016-06-17 13:34   ` Vlastimil Babka
2016-06-24 23:19 ` [PATCH v3 0/9] reduce memory usage by page_owner Andrew Morton
2016-06-27  5:45   ` Joonsoo Kim

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=20161027001715.GA5655@js1304-P5Q-DELUXE \
    --to=iamjoonsoo.kim@lge.com \
    --cc=akpm@linux-foundation.org \
    --cc=glider@google.com \
    --cc=hughd@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@techsingularity.net \
    --cc=mhocko@kernel.org \
    --cc=minchan@kernel.org \
    --cc=sasha.levin@oracle.com \
    --cc=vbabka@suse.cz \
    --cc=x-linux@infra-silbe.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;
as well as URLs for NNTP newsgroup(s).