From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.221.43 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796322309; b=DidyExAWR2P5HWCzcy+6+PunrEsaQwAhAFG3Q4KaHtitAzwwNBYWQCKhx+pD69bBohlo +a30TJDvE0Vpe3bO/buEk02rD2IgtfxSEd4HfUp6uEbnOWP9/bmePFiPv/hm8OpPcnL+j R4/psGW+qdyxjOozefMglUTK2vKAlp8Ld31DP7YPVyCHFcWg97yDUzxyIiqC9ieY6dGzC BI9lhvuRxe5gL8JpORrcw8GQnIfoDBVUo0KC1yQeYSsdjMEaj5uBoNFSlRMP94wHH50Y4 XDLfp7GEAwPJDPmrMwUdPYPZ7gZLNv1KtlmpI81Z3HnP1qUNcFOkDaat8GXj1IpKokQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796322309; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; bh=xZw1QtZhj1pQrc9rNYsSo/3WGyXd3RkiHw8x4sq3TKc=; b=Qo4DELOjfmuPH/WO8nNayVTnqp8aCAG4tnziG3IeSDD/5zqQvCV15fExSsybMbyuuu2P B7IwD/jLPptPpHJuLzd0Z5rUfPMO1oY941M7mDDTCccsPeoUAB/Q22InRPSLaUGHliVkW TruzF/KrzDw7YGqcgVbEZLwj86cr/xYv3u6XJJ9kUrO2EdwwjPkutB7nssdtJJzh3Ittn /UJ987z/xrDb9qwPEk1ykrmilswZJTCI5U4svgDZjgFeSGAkSnKm4AoYYrDrCY6hhhMvp zOcWuctGBREoUl2/+mV/dZEIncJJnOelvvaArxzI3GWZpYF8xMOL0BmVjcpgifSOm0w== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass header.d=suse.com header.i=@suse.com header.a=rsa-sha256 header.s=google header.b=gPo78tOb; arc=none smtp.remote-ip=209.85.221.43 Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) (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 61C13606A32F for ; Thu, 3 Dec 2026 18:25:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 61C13606A32F Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.a=rsa-sha256 header.s=google header.b=gPo78tOb Received: by mail-wr1-f43.google.com with SMTP id ffacd0b85a97d-498f5fa5103so100068f8f.2 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=vger.kernel.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=gPo78tObhjLsvn74obqkkSs1x8NwRuozBixC+XNP9Fm0JyVcGQfwZLXXWOsTA91zSV IaFZDBd0fv3WO4dUNNhW+uXRx2diRi01Sf6a0F2jd6XbvST5Jw9mIgoTkwcyzlIsZEyx pn9c6xHPDU0fIL7Bk+hmioZwCtnctr79zEv7xqlolBMuocXDtO8o7H0gec/lZT4vlG12 NVPnQN2dKKixg/ZWiAVUBWxaLlsZ8VOPgysZA1gwrh6ZY65XJaR7xJrYecnaMSrXCtTq pqIZ+ftHHmI4NX1FFqEoAlC6zyY+pqpptX8x+uYDKt+DSXRdErZlQTqzoWAD99/8xG6g sJag== 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/3WGyXd3RkiHw8x4sq3TKc=; b=uRQtQzt+jy9NO/oy4lnfG4U8b2Kozj22iuiU9E8w6jAV5ICCVmB1Okbg99WvorWiWo Kr8nqVv7eLNrAODsOO7h8BGQyt0pO15P55S9cgOmfBQZo2NZbJqYMEAYRxkX1Nq8DFHp DV9kddFWpSPb85dBEjVfdp/1LwPO6r47z+sEIFFnyoScM5LpltBq8Eh7GV/GmGWY/owN lfBgp1xToobl9YGKxE29O3PlZ2jGzXJVYJnPCjiSdbll/K2Tto3p6BspSEY7dO34m8jV /FGySbZi4JMvbsdpREPbWGWBeEPn22IcTKdlofdcl5JJ0FDFX8fMs9Ws3/OZ0sLT+GwP VnSw== X-Forwarded-Encrypted: i=1; AL+hErFWYLy9WRTfyJ07/6E2FP7qrecGGnZ9PaOCBvFgAv/QvC1X5gfOYnE+NT3z6VlRkgHfnpnx+6HZAEbzciE=@vger.kernel.org X-Gm-Message-State: APuU4Z8L27wH6zT75GoQ0y8+vur/uFSP/g8BINuVePdpYsxcLNCSgWP5 CFc3eHOO/Z0Whmcy1FmA5WI3Jp3opsoIHgbYy5h4rfjFDdrFhgzFt9N1tviLJqEVtEo= X-Gm-Gg: AZFdTZfr1hAnJL0pPUL2YNlrgsfegQEmXG4ePKo60wrlj7MUGzO3F4HQ9wQnJCGFLrz 5WhyvBiaBuepWPmuX0qVJFyD7/kcqWp2WRsgOk5/v2knqSh3sEFTUbKvmfdg4RLVMwLP268Ra3+ hIvQxijlCQmFXcjpTPXZXMK7tDBfP3WkxgIp+krEWsgn0PeK/GM2/geqQe4DoEbg4eNrVqSgUXR l4kbypQF5txvwnWv5eWL54y4I/LWJd+kncWGyYMqseO3jQ2zVETfFG6Tzjj4JZz1ScBnvnIfcm4 Id56WGtPgkmHLe+N0ogQYPTq4Un7wvNxnKtsHhmUrOCquARX3RrZLIOBbR8ck7TwoBw7EvnSGOo 3CgHUtS6bQj65CdkalmLyY6CTg0fWMSZIHdUzjIDOJQpr5ySypI8p24Z4dmigd34WPtCOT+5l/b pvMvJrnBfhemkQ8xu3i6NPVZ286er6SKAexUyLHhPgfqEji7q10ppSo7CqluNSGeacKvkeTrJ1t ywTALwUQvi30GCLOznRiRDSLNkDFnG3piWIbkHQ3BfijLWHvYlKYbV7n5LpwYAsC4orQrEsttSd GF4XkFYw8geuuAZPIw1BVNWthdXr5Q38tuCxo9rrEw== 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-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-Type: text/plain; charset=us-ascii Content-Disposition: inline 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