From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f177.google.com (mail-pf0-f177.google.com [209.85.192.177]) by kanga.kvack.org (Postfix) with ESMTP id D58756B0038 for ; Thu, 10 Dec 2015 06:39:29 -0500 (EST) Received: by pfbu66 with SMTP id u66so3178323pfb.3 for ; Thu, 10 Dec 2015 03:39:29 -0800 (PST) Received: from mx2.parallels.com (mx2.parallels.com. [199.115.105.18]) by mx.google.com with ESMTPS id u63si19854094pfa.181.2015.12.10.03.39.29 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 10 Dec 2015 03:39:29 -0800 (PST) From: Vladimir Davydov Subject: [PATCH 0/7] Add swap accounting to cgroup2 Date: Thu, 10 Dec 2015 14:39:13 +0300 Message-ID: MIME-Version: 1.0 Content-Type: text/plain Sender: owner-linux-mm@kvack.org List-ID: To: Andrew Morton Cc: Johannes Weiner , Michal Hocko , linux-mm@kvack.org, linux-kernel@vger.kernel.org Hi, This patch set adds swap accounting to cgroup2. In contrast to the legacy hierarchy, actual swap usage is accounted. It can be controlled and monitored using new files, memory.swap.current and memory.swap.max. For more details, please see patch 1 of the series, which introduces the new counter. Patches 2-6 make memcg reclaim follow the heuristics used on global reclaim for handling anon/swap. Patch 7 updates documentation. Thanks, Vladimir Davydov (7): mm: memcontrol: charge swap to cgroup2 mm: vmscan: pass memcg to get_scan_count() mm: memcontrol: replace mem_cgroup_lruvec_online with mem_cgroup_online swap.h: move memcg related stuff to the end of the file mm: vmscan: do not scan anon pages if memcg swap limit is hit mm: free swap cache aggressively if memcg swap is full Documentation: cgroup: add memory.swap.{current,max} description Documentation/cgroup.txt | 16 +++++ include/linux/memcontrol.h | 28 ++++---- include/linux/swap.h | 75 +++++++++++++-------- mm/memcontrol.c | 159 ++++++++++++++++++++++++++++++++++++++++++--- mm/memory.c | 3 +- mm/shmem.c | 4 ++ mm/swap_state.c | 5 ++ mm/swapfile.c | 2 +- mm/vmscan.c | 26 ++++---- 9 files changed, 249 insertions(+), 69 deletions(-) -- 2.1.4 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752911AbbLJLjb (ORCPT ); Thu, 10 Dec 2015 06:39:31 -0500 Received: from mx2.parallels.com ([199.115.105.18]:53278 "EHLO mx2.parallels.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751989AbbLJLj3 (ORCPT ); Thu, 10 Dec 2015 06:39:29 -0500 From: Vladimir Davydov To: Andrew Morton CC: Johannes Weiner , Michal Hocko , , Subject: [PATCH 0/7] Add swap accounting to cgroup2 Date: Thu, 10 Dec 2015 14:39:13 +0300 Message-ID: X-Mailer: git-send-email 2.1.4 MIME-Version: 1.0 Content-Type: text/plain X-ClientProxiedBy: US-EXCH2.sw.swsoft.com (10.255.249.46) To US-EXCH.sw.swsoft.com (10.255.249.47) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, This patch set adds swap accounting to cgroup2. In contrast to the legacy hierarchy, actual swap usage is accounted. It can be controlled and monitored using new files, memory.swap.current and memory.swap.max. For more details, please see patch 1 of the series, which introduces the new counter. Patches 2-6 make memcg reclaim follow the heuristics used on global reclaim for handling anon/swap. Patch 7 updates documentation. Thanks, Vladimir Davydov (7): mm: memcontrol: charge swap to cgroup2 mm: vmscan: pass memcg to get_scan_count() mm: memcontrol: replace mem_cgroup_lruvec_online with mem_cgroup_online swap.h: move memcg related stuff to the end of the file mm: vmscan: do not scan anon pages if memcg swap limit is hit mm: free swap cache aggressively if memcg swap is full Documentation: cgroup: add memory.swap.{current,max} description Documentation/cgroup.txt | 16 +++++ include/linux/memcontrol.h | 28 ++++---- include/linux/swap.h | 75 +++++++++++++-------- mm/memcontrol.c | 159 ++++++++++++++++++++++++++++++++++++++++++--- mm/memory.c | 3 +- mm/shmem.c | 4 ++ mm/swap_state.c | 5 ++ mm/swapfile.c | 2 +- mm/vmscan.c | 26 ++++---- 9 files changed, 249 insertions(+), 69 deletions(-) -- 2.1.4