From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qv1-f46.google.com (mail-qv1-f46.google.com [209.85.219.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C96A72798F3 for ; Mon, 2 Mar 2026 15:11:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772464292; cv=none; b=uZTfHAkZRdDGZxlbfwJFuO59Pq09w+On3nthwjPfrd5PXCzKCDbfx7Xs4weDnVvG82xf6B7Qwm5oytuSkhqBiVb7SAQIwbGNNhtakrQ1HLoR2+y6T1CO5rw9w831ALNy5WUaxevJN8NMVjou3k6X0S3xy8EKmITYvaD1YonjKMI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772464292; c=relaxed/simple; bh=4hs5Cq4XX8VTuRDeJwyB/kAHYeKtChbZhOqVcXJD2s0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Jrv1SWa4oh2bSdmxreweWiHqg1ecnMmRi7adxAaJxGDGBsT94Fk6cM8vV3h3x+9T+iA3V3odp6Cu8YGmoVt8rzEVVIuXE0j24lKYjXplFraaR1NT0/VQtMg1mZXuceu4VGosZihUOxMdFjrpIhETcwV2tZGCeplqQuwFt/xQeAg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=cmpxchg.org; spf=pass smtp.mailfrom=cmpxchg.org; dkim=pass (2048-bit key) header.d=cmpxchg.org header.i=@cmpxchg.org header.b=JTQy3lS/; arc=none smtp.client-ip=209.85.219.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=cmpxchg.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=cmpxchg.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=cmpxchg.org header.i=@cmpxchg.org header.b="JTQy3lS/" Received: by mail-qv1-f46.google.com with SMTP id 6a1803df08f44-896fb37d1f0so75186546d6.2 for ; Mon, 02 Mar 2026 07:11:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg.org; s=google; t=1772464289; x=1773069089; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=e3BqwdRnHxc2GRaZzZyZvv1rY2lAxZpGHqgSHrtLwQ0=; b=JTQy3lS/tyumEDiAeJk3KNW4EspLWYd5t/glEsJvak5/kIkE10VgoVhJlw1tejMGev XOM0CQ0izCqoFTok+WA0ZP/kYTNLHkdiMCPdJhnQGaOd2vnSmPZt7uqTTwGaJQhNSI7l W0+h6VUw5sYt2yy7KV2034bdoNNP5wSWn0vEI2AKaJs599BxH0JkFpliU4rWso4nPLwx /GfK9+UI4iJE3gEe9FyzlW7LtkVAkfFm0laQ9KtXv6Q4aajmFjf4KOAN7+5Kk5O21/EE V7NUKPgEgzrlyUi7C0fbxwDjTQ0InZPwkzcPpWnjW03Ep356UNvGPaVD6zMITzJTrQSC pldA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772464289; x=1773069089; h=in-reply-to:content-disposition: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; bh=e3BqwdRnHxc2GRaZzZyZvv1rY2lAxZpGHqgSHrtLwQ0=; b=olxbAV7wsi60CJrPgMVyrV9O1ZYi0y48OCs7xn2w5WSOBz/O1GXmQXyrJSoQ8d1OBn R8Q5bbh4QfmUwPWtDs/LQdkHVkW4+/jMvOaunsbGkDx7iqQBoe9p5KDgE7RA2loHlWpB meKQZg462ORujWZL/KCMpliGbmgrhBo0Paki2BDR3roQayjjTuGY6R4sea5XJg1wOFsF Ubbi7qqoD39yFTfq1ETiaiIcNqF6IM2ZfVJWfohQIf6/ecBeI7intb7/+S6cxMfQuTr3 ad5Qx8QpKyileuu9LlpZj/pLfKicnJjeGeWeHGX6ZfbYt6sKaZ2q08JgzMrKb3jhPgXg COaQ== X-Forwarded-Encrypted: i=1; AJvYcCVt5SRkzSkPeY/VO9akx7qyCvB6rPL0A1Gvcqy2VVCqRksrdTH+wdLZCEcpe94YQCD826JqnDUT3Jcxki8=@vger.kernel.org X-Gm-Message-State: AOJu0Yyvu17be5UDbIM2Z+kScCngekay1d11ijkyaxKuCV3XS7HnVe3P hQx4Jlf/kVuaK36psaJ8k/MyE5gW4NsdZICy1yD+nvpW2Wj50Ng2tjO1A0uzJfMveD4= X-Gm-Gg: ATEYQzxhZIxsuq7HA6nK6S7Q6TzCos7mGhq9JfgiS8sxA9RizTd/8HhO0OTlmU8O2Yz rcfwCA3oZK8k4oi2rcguCdWO+bQF3tR3gCR/KvwYV1O/DD5Y29ds9t+iOPff7REA/86I/nV0RTr yuvPkc/NP/n6YWWD78V0cTjiDyCYiozDCALy1dLd6ifKRHyljyJYE6LGkEW729VdYo1x0YKH20b k0JqV3r1a3+vSwwRw07GyHPT0NxvChl5haToccIwGK8TicG1moUC/hT63vkDy+aDz6/m91VFrEQ bzxaZImtnb3GoOoTI4JztLJkfrC01TUEnqlVKhEjCrw71tXdsnSuyUPSDv+er20+BKpyFCtMD5O 4527q+hSCB2xfJDzJQ6BVhjtQSPYuFg6r4H/OstgH4a6zC3VBkHECw8tXnmTLHMq1yJ2hT+OKHk d16biRFR1Lv3jU3/97OK3N4asmPcxaq/Vt X-Received: by 2002:ac8:58d6:0:b0:4ee:1b0e:861a with SMTP id d75a77b69052e-5075273917fmr173965691cf.13.1772464289546; Mon, 02 Mar 2026 07:11:29 -0800 (PST) Received: from localhost ([2603:7000:c00:3a00:365a:60ff:fe62:ff29]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-507449add38sm109824871cf.13.2026.03.02.07.11.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Mar 2026 07:11:28 -0800 (PST) Date: Mon, 2 Mar 2026 10:11:24 -0500 From: Johannes Weiner To: Andre Ramos Cc: akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, david@kernel.org, rostedt@goodmis.org Subject: Re: [PATCH] mm: add Adaptive Memory Pressure Signaling (AMPRESS) Message-ID: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Mon, Mar 02, 2026 at 12:45:33AM -0300, Andre Ramos wrote: > Introduce /dev/ampress, a bidirectional fd-based interface for > cooperative memory reclaim between the kernel and userspace. > > Userspace processes open /dev/ampress and block on read() to receive > struct ampress_event notifications carrying a graduated urgency level > (LOW/MEDIUM/HIGH/FATAL), the NUMA node of the pressure source, and a > suggested reclaim target in KiB. After freeing memory the process > issues AMPRESS_IOC_ACK to close the feedback loop. > > The feature hooks into balance_pgdat() in mm/vmscan.c, mapping the > kswapd scan priority to urgency bands: > priority 10-12 -> LOW > priority 7-9 -> MEDIUM > priority 4-6 -> HIGH > priority 1-3 -> FATAL The scan priority is not a good proxy for pressure. We actually export reclaim efficiency-based pressure levels like this in memory cgroups v1, but they're being deprecated[1] in favor of PSI [2]. What are you trying to accomplish? [1] 340afb8027fa ("memcg: initiate deprecation of pressure_level") [2] Documentation/accounting/psi.rst