linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Liam R. Howlett" <Liam.Howlett@Oracle.com>
To: Michal Hocko <mhocko@kernel.org>
Cc: "Kirill A. Shutemov" <kirill@shutemov.name>,
	linux-mm@kvack.org, akpm@linux-foundation.org,
	n-horiguchi@ah.jp.nec.com, mike.kravetz@Oracle.com,
	aneesh.kumar@linux.vnet.ibm.com, khandual@linux.vnet.ibm.com,
	punit.agrawal@arm.com, arnd@arndb.de, gerald.schaefer@de.ibm.com,
	aarcange@redhat.com, oleg@redhat.com,
	penguin-kernel@I-love.SAKURA.ne.jp, mingo@kernel.org,
	kirill.shutemov@linux.intel.com, vdavydov.dev@gmail.com,
	willy@infradead.org
Subject: Re: [RFC PATCH 1/1] mm/hugetlb mm/oom_kill:  Add support for reclaiming hugepages on OOM events.
Date: Mon, 31 Jul 2017 09:56:48 -0400	[thread overview]
Message-ID: <20170731135647.wpzk56m5qrmz3xht@oracle.com> (raw)
In-Reply-To: <20170731091025.GH15767@dhcp22.suse.cz>

* Michal Hocko <mhocko@kernel.org> [170731 05:10]:
> On Fri 28-07-17 21:56:38, Liam R. Howlett wrote:
> > * Michal Hocko <mhocko@kernel.org> [170728 08:44]:
> > > On Fri 28-07-17 14:23:50, Michal Hocko wrote:
> > > > > > Other than that hugetlb pages are not reclaimable by design and users
> > > > > > do rely on that. Otherwise they could consider using THP instead.
> > > > > > 
> > > > > > If somebody configures the initial pool too high it is a configuration
> > > > > > bug. Just think about it, we do not want to reset lowmem reserves
> > > > > > configured by admin just because we are hitting the oom killer and yes
> > > > > > insanely large lowmem reserves might lead to early OOM as well.
> > 
> > The case I raise is a correctly configured system which has a memory
> > module failure.
> 
> So you are concerned about MCEs due to failing memory modules? If yes
> why do you care about hugetlb in particular?

No,  I am concerned about a failed memory module.  The system will
detect certain failures, mark the memory as bad and automatically
reboot.  Up on rebooting, that module will not be used.

My focus on hugetlb is that it can stop the automatic recovery of the
system.  Are there other reservations that should also be considered?

> 
> > Modern systems will reboot and remove the memory from
> > the memory pool.  Linux will start to load and run out of memory.  I get
> > that this code has the side effect of doing what you're saying.  Do you
> > see this as a worth while feature and if so, do you know of a better way
> > for me to trigger the behaviour?
> 
> I do not understand your question. Could you elaborate more please? Are
> you talking about system going into OOM because of too many MCEs?

No,  I'm talking about failed memory for whatever reason.  The system
reboots by a hardware means (I believe the memory controller) and
removes the memory on that failed module from the pool.  Now you
effectively have a system with less memory than before which invalidates
your configuration.  Is it worth while to have Linux successfully boot
when the system attempts to recover from a failure?

> 
> > > > > > Nacked-by: Michal Hocko <mhocko@suse.com>
> > > > > 
> > > > > Hm. I'm not sure it's fully justified. To me, reclaiming hugetlb is
> > > > > something to be considered as last resort after all other measures have
> > > > > been tried.
> > > > 
> > > > System can recover from the OOM killer in most cases and there is no
> > > > real reason to break contracts which administrator established. On the
> > > > other hand you cannot assume correct operation of the SW which depends
> > > > on hugetlb pages in general. Such a SW might get unexpected crashes/data
> > > > corruptions and what not.
> > 
> > My question about allowing the reclaim to happen all the time was like
> > Kirill said, if there's memory that's not being used then why panic (or
> > kill a task)?  I see that Michal has thought this through though.  My
> > intent was to add this as a config option, but it sounds like that's
> > also a bad plan.
> 
> You cannot reclaim something that the administrator has asked for to be
> available. Sure we can reclaim the excess if there is any but that is
> not what your patch does

I'm looking at the free_huge_pages vs the resv_huge_pages.  I thought
the resv_huge_pages were the free pages that are already requested, so
if there were more free than reserved then they would be excess?

>  
> > > And to be clear. The memory hotpug currently does the similar thing via
> > > dissolve_free_huge_pages and I believe that is wrong as well although
> > > one could argue that the memory offline is an admin action as well so
> > > reducing hugetlb pages is a reasonable thing to do. This would be for a
> > > separate discussion though.
> > > 
> > > But OOM can happen for entirely different reasons and hugetlb might be
> > > configured properly while this change would simply break that setup.
> > > This is simply nogo.
> > > 
> > 
> > Yes, this patch is certainly not the final version for that specific
> > reason.  I didn't see a good way to plug in to the OOM and was looking
> > for suggestions.  Sorry if that was not clear.
> > 
> > The root problem I'm trying to solve isn't a misconfiguration but to
> > cover off the case of the system recovering from a failure while Linux
> > will not.
> 
> Please be more specific what you mean by the "failure". It is hard to
> comment on further things without a clear definition what is the problem
> you are trying to address.

The failure is when you have a memory module which is detected as bad
for any reason by the hardware which causes the memory as being marked
bad and removed from the memory pool on an automatic reboot.  Sorry for
not being clear here, I thought my comments would have been clear from
what I stated in RFC PATCH 0/1.

I hope this helps clarify things.

Thanks,
Liam

--
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:[~2017-07-31 13:57 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-27 18:02 [RFC PATCH 0/1] oom support for reclaiming of hugepages Liam R. Howlett
2017-07-27 18:02 ` [RFC PATCH 1/1] mm/hugetlb mm/oom_kill: Add support for reclaiming hugepages on OOM events Liam R. Howlett
2017-07-28  6:46   ` Michal Hocko
2017-07-28 11:33     ` Kirill A. Shutemov
2017-07-28 12:23       ` Michal Hocko
2017-07-28 12:44         ` Michal Hocko
2017-07-29  1:56           ` Liam R. Howlett
2017-07-31  9:10             ` Michal Hocko
2017-07-31 13:56               ` Liam R. Howlett [this message]
2017-07-31 14:08                 ` Michal Hocko
2017-07-31 14:37                   ` Matthew Wilcox
2017-07-31 14:49                     ` Michal Hocko
2017-08-01  1:25                       ` Liam R. Howlett
2017-08-01  8:28                         ` Michal Hocko
2017-08-01  1:11                   ` Liam R. Howlett
2017-08-01  8:29                     ` Michal Hocko
2017-08-01 14:41                       ` Liam R. Howlett

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=20170731135647.wpzk56m5qrmz3xht@oracle.com \
    --to=liam.howlett@oracle.com \
    --cc=aarcange@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=arnd@arndb.de \
    --cc=gerald.schaefer@de.ibm.com \
    --cc=khandual@linux.vnet.ibm.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=kirill@shutemov.name \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@kernel.org \
    --cc=mike.kravetz@Oracle.com \
    --cc=mingo@kernel.org \
    --cc=n-horiguchi@ah.jp.nec.com \
    --cc=oleg@redhat.com \
    --cc=penguin-kernel@I-love.SAKURA.ne.jp \
    --cc=punit.agrawal@arm.com \
    --cc=vdavydov.dev@gmail.com \
    --cc=willy@infradead.org \
    /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).