Received: by 10.223.164.202 with SMTP id h10csp688614wrb; Tue, 14 Nov 2017 08:05:10 -0800 (PST) X-Google-Smtp-Source: AGs4zMbpeiykukREG1TVmEs5cuC4DlC9jFyNiw+LZ0dHygFv4BHgv6exWVEr5cEDuzfYrao6DjS4 X-Received: by 10.98.75.71 with SMTP id y68mr14373725pfa.45.1510675510235; Tue, 14 Nov 2017 08:05:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510675510; cv=none; d=google.com; s=arc-20160816; b=SDSbwqUdvTmhYGrpliSqwfF+rMDB21yQJdXOwta2z7kKogEVmJdwbH4PQuLVB/8vr1 ybMNn+L3CVL+KOLVu/qf4vHUIcAA4iGk1TNoZq7hwMUKZlgUpBzw9inwr4tSiluOby4P rP9BqJeY8rDvw1YJdVMCMNUw5hJ++FtfvaaIrFhZji2aMxtTKzqL2rreEd2xgbOcEFs4 AxTLHON8BmzxdNCu3r4str8N8nohFml+CB6g+ssRCv6e57JOgqa5itOu51hC0IhYw7e9 QsJhTUtuzjR//43J63ZKUuMRiy8YekWoNuXpXnPn8YpqQA+I+69n42k6JA/pHjUlEuY0 L8UQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=vFt0Ngd3o5HLAnJi2GTB/FDs6O+1elLoBvyR9YhFcNs=; b=Aj+eATP3yTiZo4/HXyZvzlask1/RldPL95AZ1DvWm63mk1l6BgJDzuuo8FVGfJZZ3e AgP0uAQtpERZ3l70mcEDiGm06ymiQ/BJg+HvAIkvJXFIsAbQ5CXl0r4/F4kZovLtavRw o7aRbMm2fk3baMAptRFONrCmIiMU1v6GufshUdnLYqAZcwdakADzuYest+2iavnT3RXK MFgoqQa21xVlsnj+74u1sjgoaD5z7WCdSxTjbsS7yk6HGPQqzezr1Q9eSzfQ0TgOekdl zVxOrLE/Efkh3q50BBugynMlgl4Ep27ZGchNayM10r8Z/klZrXWCN8G7ioTYJBO65+ZO 3fCQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p8si16351259pls.804.2017.11.14.08.04.58; Tue, 14 Nov 2017 08:05:10 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754742AbdKNPxw (ORCPT + 88 others); Tue, 14 Nov 2017 10:53:52 -0500 Received: from mx2.suse.de ([195.135.220.15]:49838 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755654AbdKNPxa (ORCPT ); Tue, 14 Nov 2017 10:53:30 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 31DD581313; Tue, 14 Nov 2017 15:53:29 +0000 (UTC) Date: Tue, 14 Nov 2017 15:53:27 +0000 From: Mel Gorman To: YASUAKI ISHIMATSU 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 Message-ID: <20171114155327.5ugozxxsofqoohv2@suse.de> References: <9631b871-99cc-82bb-363f-9d429b56f5b9@gmail.com> <20171114114633.6ltw7f4y7qwipcqp@suse.de> <48b66fc4-ef82-983c-1b3d-b9c0a482bc51@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <48b66fc4-ef82-983c-1b3d-b9c0a482bc51@gmail.com> User-Agent: NeoMutt/20170421 (1.8.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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: > >> > >> > >> 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 > 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 From 1584042124681872708@xxx Tue Nov 14 11:51:30 +0000 2017 X-GM-THRID: 1583974053563537096 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread