From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-185.mta0.migadu.com (out-185.mta0.migadu.com [91.218.175.185]) (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 34B6E289E17 for ; Fri, 13 Feb 2026 07:18:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.185 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770967138; cv=none; b=DjA9wVJPAq/VK6q9hiWsVeg6Axbn8Cj70gRzCOwSuSuelqHFCmg2Alq+e8yTaVsVJ7IaY6ZiTU0/dUhm033C1bAfs2KSirJSl7cbimLy6uFqo5wM9FLrmGB3QuPLRqdbxAoyloFtG+ArE3+4LEo2IO/c+aWkXj37qn21KEtQcD8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770967138; c=relaxed/simple; bh=nrZ+DfNphSQEEqYBHdHC1V4TEyPSwExeOiovDkxhc9A=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=dfnBNWTdA8mktZ/8e6izCIfKiNo7NwikDx8TS50qYJ5MFdmjJNsHeJ0kNHWMd91Cz8dMAfry8qcMHslwzTfLj7OZFIQitAZqIGdbgtyqlOL6JSu0Th03R2KQYhH1BNz9eaSLWGYqfIaxsKL0SO/JQtn8QNEkVgzR1mFG8fsWbpM= 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=ofPx+WCp; arc=none smtp.client-ip=91.218.175.185 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="ofPx+WCp" 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=1770967125; 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=wrYq2pAJJuqrmBI86q10Z6dZRJSTibQvGpw+Z8u3inA=; b=ofPx+WCpUD8w8iUlCR3WoE5H+/NFqYmwHjeEhP/opwMxn+UHtNg5RK8MyxzEojkK5uUO+E aPX71PF+yk9CRysc4uGf+RVU3yUiOuMpzYiv90NB9CJ8dpbr6dV/HhnDmvfxGtYEOAD6v8 Msq0w6OwAqDpSg2Yb3psPeErNC4hGcc= From: Jiayuan Chen To: linux-mm@kvack.org Cc: jiayuan.chen@linux.dev, 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 mm-new v3 0/2] mm: zswap: add per-memcg stat for incompressible pages Date: Fri, 13 Feb 2026 15:18:21 +0800 Message-ID: <20260213071827.5688-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 v2 -> v3: https://lore.kernel.org/linux-mm/20260206072220.144008-1-jiayuan.chen@linux.dev/ - Remove inline comments for incompressibility check (Yosry Ahmed) - Use PAGE_SIZE instead of hardcoded 4096 in selftest (SeongJae Park) - Use pipe for parent-child synchronization instead of usleep (JP Kobryn, SeongJae Park) - Use MADV_PAGEOUT instead of memory.reclaim to push pages into zswap, and use mmap instead of malloc accordingly (Nhat Pham) - Collect Reviewed-by and Acked-by tags 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 | 6 + tools/testing/selftests/cgroup/test_zswap.c | 136 ++++++++++++++++++++ 4 files changed, 148 insertions(+) -- 2.43.0