[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <dc18e98e-2467-bb36-7f78-d7003d9aa5f9@redhat.com>
Date: Wed, 17 Feb 2021 10:09:58 +0100
From: David Hildenbrand <david@...hat.com>
To: Eiichi Tsukata <eiichi.tsukata@...anix.com>, corbet@....net,
mike.kravetz@...cle.com, mcgrof@...nel.org, keescook@...omium.org,
yzaikin@...gle.com, akpm@...ux-foundation.org,
linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-mm@...ck.org, linux-fsdevel@...r.kernel.org
Cc: felipe.franciosi@...anix.com
Subject: Re: [RFC PATCH] mm, oom: introduce vm.sacrifice_hugepage_on_oom
On 16.02.21 04:07, Eiichi Tsukata wrote:
> Hugepages can be preallocated to avoid unpredictable allocation latency.
> If we run into 4k page shortage, the kernel can trigger OOM even though
> there were free hugepages. When OOM is triggered by user address page
> fault handler, we can use oom notifier to free hugepages in user space
> but if it's triggered by memory allocation for kernel, there is no way
> to synchronously handle it in user space.
>
> This patch introduces a new sysctl vm.sacrifice_hugepage_on_oom. If
> enabled, it first tries to free a hugepage if available before invoking
> the oom-killer. The default value is disabled not to change the current
> behavior.
In addition to the other comments, some more thoughts:
What if you're low on kernel memory but you end up freeing huge pages
residing in ZONE_MOVABLE? IOW, this is not zone aware.
--
Thanks,
David / dhildenb
Powered by blists - more mailing lists