From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-170.mta1.migadu.com (out-170.mta1.migadu.com [95.215.58.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C701B2EC0B0 for ; Fri, 6 Feb 2026 07:22:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.170 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770362556; cv=none; b=r0sRj6DlIIuxYCyHJYC1/lLp1kJiUWwjmp3e0Xwn3+k+vULRFS0pFpINJDHL4s0QeqJRcHCQvizyu7asB/ZQXkdqPKw3Lz2A3d5qsuMkfHEcIfbwjEO1P4AtclpofCRBKODWFcnVqdzrEv0RxLxZnd3N9Qq+HlXFHAq0d/iqtUc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770362556; c=relaxed/simple; bh=Onzvce5Nzkj3pJmnRVm5lfenrB7dgKRCKFm1hNfC8eQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=qL2lyNtvjyWTaGdwSPkXGK+ys0zjcR8/iXwR5pkyVnutoUn7oQOiXsDq4ZTJYdBfFXe2kK2sUCmxQYtNnIOZqB8Z0jDeoR5/V/epNCLkkMG+LG0YMJYE4ceVkTohHPJYJ/VW+g4UGTV2E9qTX9zrj1iuDKZWVNGbxkiBF9jVN8g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=ZthEn73D; arc=none smtp.client-ip=95.215.58.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="ZthEn73D" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1770362552; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=XrFsXOEXMwmpE+X7noVwyIey4LQ89wmI4Q6a+MI4j84=; b=ZthEn73DhQMpdw0mejJoSncG/7xCwqooUAFD5+w2kfvO+ILzsyQhn4EWIpHRg550dU2drV HMdw15SxF0yj/wsHKFu+8sovUsh3uMIk3MVfJeydVqkX5C+ibmTZlN/mCxD9U8BmDw9Dmu c5ReqVc4wiHyTXNbPw8eQoNDoezjqXo= From: Jiayuan Chen To: linux-mm@kvack.org Cc: Jiayuan Chen , Tejun Heo , Johannes Weiner , =?UTF-8?q?Michal=20Koutn=C3=BD?= , Jonathan Corbet , Michal Hocko , Roman Gushchin , Shakeel Butt , Muchun Song , Andrew Morton , Yosry Ahmed , Nhat Pham , Chengming Zhou , Shuah Khan , cgroups@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [PATCH v2 0/2] mm: zswap: add per-memcg stat for incompressible pages Date: Fri, 6 Feb 2026 15:22:14 +0800 Message-ID: <20260206072220.144008-1-jiayuan.chen@linux.dev> Precedence: bulk X-Mailing-List: linux-doc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT In containerized environments, knowing which cgroup is contributing incompressible pages to zswap is essential for effective resource management. This series adds a new per-memcg stat 'zswap_incomp' to track incompressible pages, along with a selftest. Patch 1: Add the per-memcg zswap_incomp stat and documentation Patch 2: Add selftest for the new stat Changes v1 -> v2: https://lore.kernel.org/linux-mm/20260205053013.25134-1-jiayuan.chen@linux.dev/ - Rename zswpraw/MEMCG_ZSWAP_RAW to zswap_incomp/MEMCG_ZSWAP_INCOMP (Shakeel Butt, Yosry Ahmed) - Drop zswap_is_incomp() helper, keep opencode (size == PAGE_SIZE) with comments explaining the incompressibility check (Yosry Ahmed) - Add documentation in cgroup-v2.rst (Nhat Pham, SeongJae Park) - Add selftest as a separate patch (Nhat Pham) - Add reference link to Chris Li's discussion on the need for per-memcg incompressible page tracking (Nhat Pham) Jiayuan Chen (2): mm: zswap: add per-memcg stat for incompressible pages selftests/cgroup: add test for zswap incompressible pages Documentation/admin-guide/cgroup-v2.rst | 5 ++ include/linux/memcontrol.h | 1 + mm/memcontrol.c | 8 ++ tools/testing/selftests/cgroup/test_zswap.c | 96 +++++++++++++++++++++ 4 files changed, 110 insertions(+) -- 2.43.0