From nobody Fri Oct 2 14:03:26 2026 Received: from mail-pj1-f71.google.com (mail-pj1-f71.google.com [209.85.216.71]) (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 6FA76377ECA for ; Thu, 30 Jul 2026 23:48:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.71 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785455306; cv=none; b=ctK15TmD8iSH/I6PsWOX2qb9n9vYNa0vqwBWP70llk9HYaJvRodmjXP1EqneNWEtARid05qdxSm7ZagLQIDwB+db7V6x5js76X3nw8J37oO587g333JPS0UH+iBy/ae4n78kxHXSEI4nJI061HaYQiSVSpJyjuk7ca9Xc56Kw+U= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785455306; c=relaxed/simple; bh=sGORwxJpYa42AmS7R53jblGRlde/SJpRR9nXvsHNePA=; h=Date:Mime-Version:Message-ID:Subject:From:To:Cc:Content-Type; b=akV9GjpokS/MZjMRuz41qSjRcClVonrTOf+DfLA9znIgAcJm8MgRsfhlfTzUZUKhEIbGIvZtsj68Ch4VPeFkJDHtCi3arLuz6NzlHlewhJgfdxUaaJ58FatNGRpBcQ1SyAxHm9BgXlOnZG2oa2sWz1hkIWzQ86BAvAeIQyQXMAk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--abhishekbapat.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=L3d1D8cb; arc=none smtp.client-ip=209.85.216.71 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--abhishekbapat.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="L3d1D8cb" Received: by mail-pj1-f71.google.com with SMTP id 98e67ed59e1d1-38ea32e57e2so707069a91.1 for ; Thu, 30 Jul 2026 16:48:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1785455305; x=1786060105; darn=vger.kernel.org; h=content-type:cc:to:from:subject:message-id:mime-version:date:from :to:cc:subject:date:message-id:reply-to:content-type; bh=cnzxumlUaeANW0Mk9pTdxHWPrbLzE7Ij4fMLsWP6Nzo=; b=L3d1D8cbsZLGpuyZE/Yeb1sIQVp7mq/gS+NFkHrCo74h5kDnqKDzdWdPC1VB4qJbsr y6mi3fkL85gG+CW8NFKlHCWN4MUJ0KTsbNUkyuqZzSxWR6DlP+hrjuA28ZyOGTYAdLrU 0vBd65mHXfV4R2inK3/eRWQLr2uz10ktME9h/mHXxgkgMe/FbubRvXIIBnLhuuWz8S6D 3zXPJItVuUYVHPGXhOjTrGCMRcSogMfMZodY3CmEAYTn0FqUy/xOiDbp129JqKq2j3+a ftv7A52mOfVVHdl60l4wOg5rhz5Qg3Fzntx8Sm5PRNjyZxr35SGQKpY+aqfxyD8uEMPd G40g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785455305; x=1786060105; h=content-type:cc:to:from:subject:message-id:mime-version:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=cnzxumlUaeANW0Mk9pTdxHWPrbLzE7Ij4fMLsWP6Nzo=; b=Vjoc9BewuBcZfWuUxluhn/yrQFxwQsJcpC6loug3urLsq0+l548MnMm3YsXvSfX6EV WHAr20MZLXkWlKu8mi7raZ7EmtiL0iupapkFk2X4O3fx/Lt+ZPFer4+W2wZz7vGyvhKX sczGBg6aAAxGUOBZS2DjYbhM2HV1bb6fi+GDS6zT/Qs8pnukcfjabWAspwv5zFUa3PXY D18G2aFJ+Goz8ImWP4OFhWBHuORKCeuIwJhZij08ay7Gcx+JkDxn0OkzBGxrNNPI1QSc jKbAeoOzNUKjYfyj/ELv424kZuKVxt3nwbE6BCfSaOcYtAkWXXBhywBaM2XBGfRFubmS gkJQ== X-Gm-Message-State: AOJu0YyxJ+tw/Ivb7kIGDv32Gh4WML2NJpArGRO29dku8mfVvgQ5zuly rBGG8L0QjwOHK1k5gQBeM2OT9vzsofP5ziU/m/Ip5xQmRcDnMhRIJ51zhvMDTuhmqBpDv8H+cSu 7fBP9X4kRJc+J4qWw6Nb7b5zXsh0qa9JFbA== X-Received: from dlbbo24.prod.google.com ([2002:a05:7022:4398:b0:13c:fa4d:cc16]) (user=abhishekbapat job=prod-delivery.src-stubby-dispatcher) by 2002:a17:90b:4c52:b0:381:a766:efc9 with SMTP id 98e67ed59e1d1-38f9bd51d11mr3681083a91.7.1785455304317; Thu, 30 Jul 2026 16:48:24 -0700 (PDT) Date: Thu, 30 Jul 2026 23:48:22 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 X-Mailer: git-send-email 2.55.0.508.g3f0d502094-goog Message-ID: <0d84763f140ea735d790e0b30a8e954536beb875.1785455267.git.abhishekbapat@google.com> Subject: [PATCH v2] alloc_tag: expose profiling and compression states in /proc/allocinfo From: Abhishek Bapat To: Suren Baghdasaryan , Andrew Morton , Hao Ge Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Abhishek Bapat Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Currently, userspace has limited visibility into the exact active runtime state of memory allocation profiling and its page extension compression ('sysctl.vm.mem_profiling=3D{0|1|never}[,compressed]'). While reading the sysctl provides basic on/off status, it is currently impossible for userspace to natively determine whether page-tag compression was successfully enabled without scraping dmesg boot logs. Resolve this ambiguity by exposing the active compression state by adding a new read-only sysctl `vm.memprofiling_compressed` to output the state. Signed-off-by: Abhishek Bapat --- mm/alloc_tag.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mm/alloc_tag.c b/mm/alloc_tag.c index 52aece27b00e..877068241f06 100644 --- a/mm/alloc_tag.c +++ b/mm/alloc_tag.c @@ -1303,6 +1303,12 @@ static const struct ctl_table memory_allocation_prof= iling_sysctls[] =3D { .mode =3D 0644, .proc_handler =3D proc_mem_profiling_handler, }, + { + .procname =3D "mem_profiling_compressed", + .data =3D &mem_profiling_compressed, + .mode =3D 0444, + .proc_handler =3D proc_do_static_key, + }, }; =20 static void __init sysctl_init(void) base-commit: 2ed26e8a624f41887d64e2e37a2f6ab36a118d1f --=20 2.55.0.508.g3f0d502094-goog