From: Mel Gorman <mgorman@suse.de>
To: YASUAKI ISHIMATSU <yasu.isimatu@gmail.com>
Cc: rostedt@goodmis.org, mingo@kernel.org,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
koki.sanagi@us.fujitsu.com
Subject: Re: Allocation failure of ring buffer for trace
Date: Tue, 14 Nov 2017 15:53:27 +0000 [thread overview]
Message-ID: <20171114155327.5ugozxxsofqoohv2@suse.de> (raw)
In-Reply-To: <48b66fc4-ef82-983c-1b3d-b9c0a482bc51@gmail.com>
On Tue, Nov 14, 2017 at 10:39:19AM -0500, YASUAKI ISHIMATSU wrote:
>
>
> On 11/14/2017 06:46 AM, Mel Gorman wrote:
> > On Mon, Nov 13, 2017 at 12:48:36PM -0500, YASUAKI ISHIMATSU wrote:
> >> When using trace_buf_size= boot option, memory allocation of ring buffer
> >> for trace fails as follows:
> >>
> >> [ ] x86: Booting SMP configuration:
> >> <SNIP>
> >>
> >> In my server, there are 384 CPUs, 512 GB memory and 8 nodes. And
> >> "trace_buf_size=100M" is set.
> >>
> >> When using trace_buf_size=100M, kernel allocates 100 MB memory
> >> per CPU before calling free_are_init_core(). Kernel tries to
> >> allocates 38.4GB (100 MB * 384 CPU) memory. But available memory
> >> at this time is about 16GB (2 GB * 8 nodes) due to the following commit:
> >>
> >> 3a80a7fa7989 ("mm: meminit: initialise a subset of struct pages
> >> if CONFIG_DEFERRED_STRUCT_PAGE_INIT is set")
> >>
> >
> > 1. What is the use case for such a large trace buffer being allocated at
> > boot time?
>
> I'm not sure the use case. I found the following commit log:
>
> commit 864b9a393dcb5aed09b8fd31b9bbda0fdda99374
> Author: Michal Hocko <mhocko@suse.com>
> Date: Fri Jun 2 14:46:49 2017 -0700
>
> mm: consider memblock reservations for deferred memory initialization sizing
>
> So I thought similar memory exhaustion may occurs on other boot option.
> And I reproduced the issue.
>
That was different, it was a premature OOM caused by reservations that
were of a known size. It's not related to trace_buf_size in any fashion.
>
> > 2. Is disabling CONFIG_DEFERRED_STRUCT_PAGE_INIT at compile time an
> > option for you given that it's a custom-built kernel and not a
> > distribution kernel?
>
> The issue also occurred on distribution kernels. So we have to fix the issue.
>
I'm aware of now bugs against a distribution kernel. However, does the
patch work for you?
--
Mel Gorman
SUSE Labs
--
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:[~2017-11-14 15:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-13 17:48 Allocation failure of ring buffer for trace YASUAKI ISHIMATSU
2017-11-13 23:53 ` Yang Shi
2017-11-14 11:46 ` Mel Gorman
2017-11-14 15:39 ` YASUAKI ISHIMATSU
2017-11-14 15:53 ` Mel Gorman [this message]
2017-11-14 16:40 ` YASUAKI ISHIMATSU
2017-11-14 17:05 ` Mel Gorman
2017-11-15 4:11 ` YASUAKI ISHIMATSU
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=20171114155327.5ugozxxsofqoohv2@suse.de \
--to=mgorman@suse.de \
--cc=koki.sanagi@us.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mingo@kernel.org \
--cc=rostedt@goodmis.org \
--cc=yasu.isimatu@gmail.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;
as well as URLs for NNTP newsgroup(s).