linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
To: Dave Hansen <dave.hansen@intel.com>
Cc: linux-mm@kvack.org, Mel Gorman <mgorman@techsingularity.net>,
	Vlastimil Babka <vbabka@suse.cz>,
	Michal Hocko <mhocko@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Michael Ellerman <mpe@ellerman.id.au>,
	linuxppc-dev@lists.ozlabs.org, mahesh@linux.vnet.ibm.com,
	hbathini@linux.vnet.ibm.com
Subject: Re: [PATCH 1/2] mm: Allow disabling deferred struct page initialisation
Date: Thu, 4 Aug 2016 10:55:26 +0530	[thread overview]
Message-ID: <20160804052526.GB11268@linux.vnet.ibm.com> (raw)
In-Reply-To: <57A23547.1070207@intel.com>

* Dave Hansen <dave.hansen@intel.com> [2016-08-03 11:17:43]:

> On 08/02/2016 11:38 PM, Srikar Dronamraju wrote:
> > * Dave Hansen <dave.hansen@intel.com> [2016-08-02 11:09:21]:
> >> On 08/02/2016 06:19 AM, Srikar Dronamraju wrote:
> >>> Kernels compiled with CONFIG_DEFERRED_STRUCT_PAGE_INIT will initialise
> >>> only certain size memory per node. The certain size takes into account
> >>> the dentry and inode cache sizes. However such a kernel when booting a
> >>> secondary kernel will not be able to allocate the required amount of
> >>> memory to suffice for the dentry and inode caches. This results in
> >>> crashes like the below on large systems such as 32 TB systems.
> >>
> >> What's a "secondary kernel"?
> >>
> > I mean the kernel thats booted to collect the crash, On fadump, the
> > first kernel acts as the secondary kernel i.e the same kernel is booted
> > to collect the crash.
> 
> OK, but I'm still not seeing what the problem is.  You've said that it
> crashes and that it crashes during inode/dentry cache allocation.
> 
> But, *why* does the same kernel image crash in when it is used as a
> "secondary kernel"?
> 

I guess you already got it. But let me try to explain it again.

Lets say we have a 32 TB system with 16 nodes each node having 2T of
memory. We are assuming deferred page initialisation is configured.

When the regular kernel boots,
1. It reserves 5% of the memory for fadump.
2. It initializes 8GB per node, i.e 128GB
3. It allocated dentry/inode cache which is around 16GB.
4. It then kicks the parallel page struct initialization.

Now lets say kernel crashed and fadump was triggered.

1. The same kernel boots in the 5% reserved space which is 1600GB
2. It reserves the rest 95% memory.
3. It tries to initialize 8GB per node but can only initialize 8GB.
	(since except for 1st node the rest nodes are all reserved)
4. It tries to allocate dentry/inode cache of 16GB but fails.
	(tries to reclaim but reclaim needs spinlock 
	and spinlock is not yet initialized.)

-- 
Thanks and Regards
Srikar Dronamraju

--
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-08-04  5:25 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-02 13:19 [PATCH 0/0] Disable deferred struct page initialisation on Fadump Srikar Dronamraju
2016-08-02 13:19 ` [PATCH 1/2] mm: Allow disabling deferred struct page initialisation Srikar Dronamraju
2016-08-02 18:09   ` Dave Hansen
2016-08-03  6:38     ` Srikar Dronamraju
2016-08-03 18:17       ` Dave Hansen
2016-08-04  5:25         ` Srikar Dronamraju [this message]
2016-08-02 13:19 ` [PATCH 2/2] fadump: Disable deferred page struct initialisation Srikar Dronamraju
2016-08-03  5:20   ` Balbir Singh
2016-08-03  6:07     ` Vlastimil Babka
2016-08-03 11:34       ` Michael Ellerman
2016-08-03  6:35     ` Srikar Dronamraju
2016-08-03 19:40       ` Dave Hansen
2016-08-04  5:10         ` Srikar Dronamraju
2016-08-04 10:28           ` Mel Gorman
2016-08-04 13:54             ` Srikar Dronamraju

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=20160804052526.GB11268@linux.vnet.ibm.com \
    --to=srikar@linux.vnet.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=dave.hansen@intel.com \
    --cc=hbathini@linux.vnet.ibm.com \
    --cc=linux-mm@kvack.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mahesh@linux.vnet.ibm.com \
    --cc=mgorman@techsingularity.net \
    --cc=mhocko@kernel.org \
    --cc=mpe@ellerman.id.au \
    --cc=vbabka@suse.cz \
    /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).