From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.128.51 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796205299; b=oItgInVt1nGV7B/NGe/+e+sTwSHQPEl8qeb+oF5NZAOHXVOm3ggH5dIS0iGNRBdeU0Yx SsX59x+7W0cAbyI9rNaS1CscWyhnmK5b4ln1GPd6NeJ8mg4le0151nwPrst52zEwBYBzE ccdHp1Ggu8xYSZ54IdA8d2zpFrp0cBGx2daRfXre8mI5mxIngqxMHw2ER0jZ9SMY3QhKi 1Nc4afctgam625dMjlf0j6pjqGtp/TuP62KcW/A5P6N3IqynUKpUY5nN58sJxKiudeWz0 CdkgNk5Nhoiy4StH7HlPSHIPBvks/weWHk+FeUmANxv4umoOQTVhbK1QYg3V+ZpmQ3Q== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796205299; h=DMARC-Filter:Received:X-Google-DKIM-Signature:X-Forwarded-Encrypted: X-Gm-Message-State:X-Gm-Gg:X-Received:Received:From:To:Cc:Subject: Date:Message-ID:X-Mailer:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding; bh=6puvtZX8jTnpSUbG++M0Kytlqm427MwA7jj/ybXx24A=; b=0A89TIFCoEdksHcEYnJ/2m9irJyIcQgp8wW3u75wOV7frSmq+xqT7b0KbMHwDd/DspRk qqcb+H8BkRbYB4Y+mtifPswHcwLPGy5OleTKeif8KzlU99aNGxhKotC8C1LiQkACzQVr5 hqJLaoEuHii1lwo1AJdkngGLlbawEABONhs/Uxws4x1/2ANU9gVMBWtBe1LyoxPMhEFeM GhSF5nWdm0Z+UWMnXQ7/6JwBVCzxI1MzRYJ2u72iXXdlGZLxSpR+pk4npr8yQ062FPKgA AHEIZDfYlfeSk2NFsGk+9IOGP9SV9twn0XzXo5vHXxqrKTkBmjX3SjYAzdjapOys/kQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=fail header.from=kernel.org; spf=pass smtp.mailfrom=gmail.com; arc=none smtp.remote-ip=209.85.128.51 Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 219F7606A681 for ; Wed, 2 Dec 2026 09:54:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 219F7606A681 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-4bb6057b333so65362225e9.3 for ; Wed, 02 Dec 2026 01:54:58 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796205297; x=1796810097; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=6puvtZX8jTnpSUbG++M0Kytlqm427MwA7jj/ybXx24A=; b=IczBuepoY4E8E3SgN9u6Cldrdb8IpaVfA1CYtCUgGDex7StVeUZX09XPEAZlSkF60l iwPL4Zmxxe0qd4OuXfZHqTrh+IeshCkawkFLCEnkuND/3kKqJjtNiKbGS/c7g3yDzMZP Q/wtTow36MGjOMNfR/i/1q/I2VdhRclKj6eq2F5+liO8VM20Yf0of+lxM3BS7fNGTVGT j8CcL//oGUXsv4DLSnEctkMpH2gDLRSvn2jOlr6+35P/kSaOUlan8HnGye9tpXg1zXXy WkzU5GtdijGsZeg85sI66E1ZWAQTDr2c4MzVRbx2p/dvo1rAaLgnkS6eqpGI40zCkacP +Feg== X-Forwarded-Encrypted: i=1; AL+hErHXCiFYpmfdDTw7PHyOIYe9NIQg/RF+x4J9gQR01o/KBVue5MSWIwLYk2vC3DPPadV11E9Q+DjOC3NzIg0=@vger.kernel.org X-Gm-Message-State: APuU4Z9HqoQcyJ6NNVd7IBof/ZeiCGLRPRYj7l5Q8khFurAclE75VjM3 RuYj2AVErASa4RQyVL2b4umVNJWlFHzLyrZgPpYGpuiz6RX6a+iUJbOB X-Gm-Gg: AZFdTZez3gtd0NwCBgYUuuXh0eU4rudm5gsY7IFpo6QR4a3rnuw8noljeQbGmLndejM aO36qt2nu/hrEgdjl0Q1ZL1mkgCXaxcoXN4si88g2eNzop2s2U76Z6gFjo/Rw3VUx1E58lOCBlS BImZj9FyXTlTNe05KNxQKixvRXmUppV2x4Z4FohxYdsUFg72xzfnJiEHb8DegRVN91hqVCSObOx l1b9I3Ov+A2EviRkV3wQydzv/CvXyapbvbS9BlPOnt2LnDSMMqnQVYyuOgeC94HX1mBEWLGBHbv eq1T/qJN8dZjo0DkjkhajPLPBTHS7Tn2rtVSRjq+K724JB4jMAAXd8hUfmWqBIt275BkmfhRaJB uKoGtYcdEpj8qqDSi2nyunk3RBae3MQ6PjiULe87Ij+rhKbm7yvdrDV/+8QI76k7F3MG3RrUkq+ KoVxFXX+Jx7WUzII61dDoeJ1VlSbLuRXTbteVAL+aqsNtbIR++OXynSQDhCraAQP2QeSXbXtkN/ vRfLv2sD4W4tQbGhVAcOVWRvzokSTuFT9AcvQiyMp7oIJQE82d6i/HD/KA3feZH4BiyOrimh9Y4 XM2/UBnMQ8pVKHRCSxdsMLPcy9/W+raRrKZwMjs= X-Received: by 2002:a05:600c:848d:b0:4bb:6b6b:fbaa with SMTP id 5b1f17b1804b1-4bb8880fd0amr783980395e9.16.1796205297505; Wed, 02 Dec 2026 01:54:57 -0800 (PST) Received: from tiehlicka (nat2.prg.suse.com. [195.250.132.146]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4bb853b216esm1148433885e9.12.2026.12.02.01.54.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Dec 2026 01:54:57 -0800 (PST) From: Michal Hocko To: David Hildenbrand Cc: David Rientjes , Ben Gardon , Johannes Weiner , mhocko@suse.com, Andrew Morton , , LKML , Chris Mason Subject: [PATCH 03/10] mm, oom: do not panic on constrained OOMs Date: Wed, 2 Dec 2026 10:53:56 +0100 Message-ID: <20261202095450.296675-4-mhocko@kernel.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261202095450.296675-1-mhocko@kernel.org> References: <20261202095450.296675-1-mhocko@kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Michal Hocko domain (cpuset, mempolicy or memcg) OOMs represent a partial shortage of memory. There might still be memory available outside of the domain and therefore panicing at this stage might disrupt otherwise operational workloads. We already avoid panicing for memcg ooms. Node bound (by mempolicy or cpusets) ooms shouldn't be any different from that. Do not panic on any fail to find an oom victim unless this is full system wide oom (CONSTRAINT_NONE) context. Fixes: 6f48d0ebd907 ("oom: select task from tasklist for mempolicy ooms") Reported-by: Chris Mason Signed-off-by: Michal Hocko --- mm/oom_kill.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mm/oom_kill.c b/mm/oom_kill.c index 30c314069d5b..660ab39e1df5 100644 --- a/mm/oom_kill.c +++ b/mm/oom_kill.c @@ -1168,10 +1168,11 @@ bool out_of_memory(struct oom_control *oc) pr_warn("Out of memory and no killable processes...\n"); /* * If we got here due to an actual allocation at the - * system level, we cannot survive this and will enter - * an endless loop in the allocator. Bail out now. + * system level without any constrains, we cannot survive this + * and will enter an endless loop in the allocator. + * Bail out now. */ - if (!is_sysrq_oom(oc) && !is_memcg_oom(oc)) + if (!is_sysrq_oom(oc) && oc->constraint == CONSTRAINT_NONE) panic("System is deadlocked on memory\n"); } if (oc->chosen && oc->chosen != (void *)-1UL) -- 2.56.1