Kexec Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@suse.com>
To: tarunsahu@google.com
Cc: linux-mm@kvack.org, Andrew Morton <akpm@linux-foundation.org>,
	David Hildenbrand <david@kernel.org>,
	Johannes Weiner <hannes@cmpxchg.org>,
	Vlastimil Babka <vbabka@kernel.org>,
	Pasha Tatashin <pasha.tatashin@soleen.com>,
	Mike Rapoport <rppt@kernel.org>,
	Pratyush Yadav <pratyush@kernel.org>,
	dmatlack@google.com, Chris Down <chris@chrisdown.name>,
	linux-kernel@vger.kernel.org, Zi Yan <ziy@nvidia.com>,
	"Liam R. Howlett" <liam@infradead.org>,
	Suren Baghdasaryan <surenb@google.com>,
	Brendan Jackman <brendan.jackman@linux.dev>,
	Shakeel Butt <shakeel.butt@linux.dev>,
	David Rientjes <rientjes@google.com>,
	Barry Song <baohua@kernel.org>, Qi Zheng <qi.zheng@linux.dev>,
	Kairui Song <kasong@tencent.com>,
	Baolin Wang <baolin.wang@linux.alibaba.com>,
	Wei Xu <weixugc@google.com>,
	Axel Rasmussen <axelrasmussen@google.com>,
	Yuanchu Xie <yuanchu@google.com>,
	Baoquan He <baoquan.he@linux.dev>,
	kexec@lists.infradead.org
Subject: Re: [RFC] OOM on unmovable kernel allocations with large free CMA (no non-CMA -> CMA migration)
Date: Thu, 3 Dec 2026 19:25:06 +0100	[thread overview]
Message-ID: <axG0Aq0mUmK82OuC@tiehlicka> (raw)
In-Reply-To: <9huzfqwent4i.fsf@tarunix.c.googlers.com>

Sorry for cutting your message somehow aggressively but I suspect that
with the current CMA semantics there is not really much you can do about
your problem. You have reservations and expect you size them to your
known users. From that POV you are effectively creating a restricted
resource (similar to 32b low/high mem situation). You can (ab)use CMA
ranges for movable allocations as an optimization but at the end of the
day those need to be migrateable away to preserve the original intention
for the CMA.

On Thu 03-12-26 17:58:37, tarunsahu@google.com wrote:
> 3. Reclaim (shrink_folio_list() / kswapd / direct reclaim) has no path
>    to migrate ordinary movable pages from non-CMA ZONE_NORMAL into free
>    CMA pageblocks when non-CMA is exhausted. Without swap (or before
>    swap-out makes progress), the zone is declared all_unreclaimable and
>    the OOM killer fires despite large free_cma.

So what happens when you have your real CMA user to request the reserved
CMA and it is occupied by movable allocation that simply cannot be moved
because there is no target to move it.

In other words isn't this just moving the problem around?
-- 
Michal Hocko
SUSE Labs


      parent reply	other threads:[~2026-12-03 18:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-03 17:58 [RFC] OOM on unmovable kernel allocations with large free CMA (no non-CMA -> CMA migration) tarunsahu
2026-12-03 18:19 ` Frank van der Linden
2026-12-03 18:25 ` Michal Hocko [this message]

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=axG0Aq0mUmK82OuC@tiehlicka \
    --to=mhocko@suse.com \
    --cc=akpm@linux-foundation.org \
    --cc=axelrasmussen@google.com \
    --cc=baohua@kernel.org \
    --cc=baolin.wang@linux.alibaba.com \
    --cc=baoquan.he@linux.dev \
    --cc=brendan.jackman@linux.dev \
    --cc=chris@chrisdown.name \
    --cc=david@kernel.org \
    --cc=dmatlack@google.com \
    --cc=hannes@cmpxchg.org \
    --cc=kasong@tencent.com \
    --cc=kexec@lists.infradead.org \
    --cc=liam@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=pasha.tatashin@soleen.com \
    --cc=pratyush@kernel.org \
    --cc=qi.zheng@linux.dev \
    --cc=rientjes@google.com \
    --cc=rppt@kernel.org \
    --cc=shakeel.butt@linux.dev \
    --cc=surenb@google.com \
    --cc=tarunsahu@google.com \
    --cc=vbabka@kernel.org \
    --cc=weixugc@google.com \
    --cc=yuanchu@google.com \
    --cc=ziy@nvidia.com \
    /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