lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20171114155327.5ugozxxsofqoohv2@suse.de>
Date:   Tue, 14 Nov 2017 15:53:27 +0000
From:   Mel Gorman <mgorman@...e.de>
To:     YASUAKI ISHIMATSU <yasu.isimatu@...il.com>
Cc:     rostedt@...dmis.org, mingo@...nel.org,
        linux-kernel@...r.kernel.org, linux-mm@...ck.org,
        koki.sanagi@...fujitsu.com
Subject: Re: Allocation failure of ring buffer for trace

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@...e.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ