From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0A380606A338 for ; Thu, 3 Dec 2026 18:25:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=rLD2LtWB; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.a=rsa-sha256 header.s=google header.b=Ad5RS6gw DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Unsubscribe-Post:List-Owner; bh=xZw1QtZhj1pQrc9rNYsSo/3WGyXd3RkiHw8x4sq3TKc=; b=rLD2LtWBSUfV7Nc34AhyPdGGls l8j/w6dcs7700lbnCLxNCR2GBz7uECKksW0gdyCNtyPS1r3u7KBrkSWSxHsS1jdW0NyxdyMmzOaCl UW4qAY/dDoHKEz9leyURsrEBt7cz+VaTNWMkPv5ysi8tRdsI6aP6OKqbq4HMg7VfKxkGflsa5PTZ2 4ks1xpko5mYbI17b2Q/8IJiLBpDJ5B5CKs/Y9nMJ7yju/fFFQIw1HQbkUq+htGJP8c/zp8dlzdWK+ mPS2HHDoLc/a/rtZIoYukEfbzaGJ6pDr4tVq+w3fNh6p29k2Quw5mPb8kTrYLVULrTCE+pZVqTq6H 3wVl/qfg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZBUX-0000000FZLN-2Vax; Thu, 03 Dec 2026 18:25:13 +0000 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZBUU-0000000FZKa-222d for kexec@lists.infradead.org; Thu, 03 Dec 2026 18:25:11 +0000 Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-48e47347279so110261f8f.1 for ; Thu, 03 Dec 2026 10:25:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1796322308; x=1796927108; darn=lists.infradead.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=xZw1QtZhj1pQrc9rNYsSo/3WGyXd3RkiHw8x4sq3TKc=; b=Ad5RS6gwPexebAm8DLvll1CoCKc/SuxBUZnbLOPB4ZRAgbM3Vyh14aMgg24gZU0/Xw mAOyrRsaO9i+ENLnTa+yZt7+KxZy5twq95MAYp0G+cHYcmwBchz4F2ydV+6DA0GWV8Cw Wrm9w8yPZeF8cGt24LhrTD0T122UPDA0xrI2VtkPlrHY+Tt9XoiPtxqSeeFeOrIcxYYU +D0xLxgeiAXMtcN4ReT/vFhB2WWzosmlGLtu6iKxd+98iWH8i9Ii/gtAesgoF8lqqiy8 louTvl6jPKmTzE27g48lhLGwrgW4T8AxxH1FZC0FqMP26aWlgZEKARpae1NvMw3Wl+cu UBhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796322308; x=1796927108; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=xZw1QtZhj1pQrc9rNYsSo/3WGyXd3RkiHw8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28z Y0o4/B+8fkgTVEhThe6iRJcJnbxYwbDjuo11U4EW39B3r07KmPFtbX8z3XH4SuCicYGqBCGRrp4 4iwkiS60ClxUkVtcKC8EGiZLAcWawEtl3d66vUbQU0DUC9RYqel3JZ1pxmojMrpmh6KdRIp0dc8 /tteyBWfcyRHT8gs8u4HdOnFMHSgomlEMx4R9VnQmA== X-Received: by 2002:a05:6000:29c6:b0:4a9:b2f1:aac4 with SMTP id ffacd0b85a97d-4abb42ea141mr58252583f8f.22.1796322307782; Thu, 03 Dec 2026 10:25:07 -0800 (PST) Received: from localhost (109-81-27-207.rct.o2.cz. [109.81.27.207]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4d16e0b05a7sm730488f8f.1.2026.12.03.10.25.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Dec 2026 10:25:07 -0800 (PST) Date: Thu, 3 Dec 2026 19:25:06 +0100 From: Michal Hocko To: tarunsahu@google.com Cc: linux-mm@kvack.org, Andrew Morton , David Hildenbrand , Johannes Weiner , Vlastimil Babka , Pasha Tatashin , Mike Rapoport , Pratyush Yadav , dmatlack@google.com, Chris Down , linux-kernel@vger.kernel.org, Zi Yan , "Liam R. Howlett" , Suren Baghdasaryan , Brendan Jackman , Shakeel Butt , David Rientjes , Barry Song , Qi Zheng , Kairui Song , Baolin Wang , Wei Xu , Axel Rasmussen , Yuanchu Xie , Baoquan He , kexec@lists.infradead.org Subject: Re: [RFC] OOM on unmovable kernel allocations with large free CMA (no non-CMA -> CMA migration) Message-ID: References: <9huzfqwent4i.fsf@tarunix.c.googlers.com> X-Archived-By: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9huzfqwent4i.fsf@tarunix.c.googlers.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261203_102510_543543_BA292814 X-CRM114-Status: GOOD ( 11.74 ) X-Spam-Score: -2.1 (--) X-BeenThere: kexec@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "kexec" X-Spam-Status: No, score=-5.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 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