From patchwork Tue Nov 10 22:07:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roman Gushchin X-Patchwork-Id: 11895497 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id ECE5D697 for ; Tue, 10 Nov 2020 22:08:10 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 8C20D207D3 for ; Tue, 10 Nov 2020 22:08:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=fb.com header.i=@fb.com header.b="gcqk0kv9" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8C20D207D3 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=fb.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 2248A6B005D; Tue, 10 Nov 2020 17:08:08 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 1AF1C6B0068; Tue, 10 Nov 2020 17:08:08 -0500 (EST) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0756E6B006C; Tue, 10 Nov 2020 17:08:07 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0026.hostedemail.com [216.40.44.26]) by kanga.kvack.org (Postfix) with ESMTP id C39366B0068 for ; Tue, 10 Nov 2020 17:08:07 -0500 (EST) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 6539C180AD807 for ; Tue, 10 Nov 2020 22:08:07 +0000 (UTC) X-FDA: 77469897414.19.rat62_33018a4272f8 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin19.hostedemail.com (Postfix) with ESMTP id 2CEDF1AD1B5 for ; Tue, 10 Nov 2020 22:08:07 +0000 (UTC) X-Spam-Summary: 1,0,0,,d41d8cd98f00b204,prvs=8583d35c3c=guro@fb.com,,RULES_HIT:30012:30051:30054:30064:30091,0,RBL:67.231.153.30:@fb.com:.lbl8.mailshell.net-64.10.201.10 62.18.0.100;04yrjcqjutu9d5zq13dxe47q6ty5hyp64qi8396che7h1epsz9qac5nkty19ya3.rmz9hgrcumocghmcdmh1f4xjbdpbap4b8fkwonax76gmh1tuwtdmjybnf5war31.w-lbl8.mailshell.net-223.238.255.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:71,LUA_SUMMARY:none X-HE-Tag: rat62_33018a4272f8 X-Filterd-Recvd-Size: 4521 Received: from mx0b-00082601.pphosted.com (mx0b-00082601.pphosted.com [67.231.153.30]) by imf46.hostedemail.com (Postfix) with ESMTP for ; Tue, 10 Nov 2020 22:08:06 +0000 (UTC) Received: from pps.filterd (m0109332.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0AAM4krf009091 for ; Tue, 10 Nov 2020 14:08:05 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.com; h=from : to : cc : subject : date : message-id : content-type : content-transfer-encoding : mime-version; s=facebook; bh=Bh/X4g7eg1CB8q7LMWLH94dNX8ID4OwoQyO4pPareSM=; b=gcqk0kv9Wccw67j7LH/XGsspTzQNFIxUBpeXpkBYEp8xpF4cTttc70uNy2Vx1P1LoebP 2umyQU2chGmBhsI/BhvvjJffbAtJXrQXFyvpAJY5fYdmu9zYQo+JGFksBg4J3O2JqliC 7zL0DvIcEl2zaXoYUQI7imAwZ7aW5pyFeTw= Received: from maileast.thefacebook.com ([163.114.130.16]) by mx0a-00082601.pphosted.com with ESMTP id 34pcmjdajw-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Tue, 10 Nov 2020 14:08:05 -0800 Received: from intmgw001.41.prn1.facebook.com (2620:10d:c0a8:1b::d) by mail.thefacebook.com (2620:10d:c0a8:83::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1979.3; Tue, 10 Nov 2020 14:08:04 -0800 Received: by devvm1755.vll0.facebook.com (Postfix, from userid 111017) id 2DA9C239AED2; Tue, 10 Nov 2020 14:08:01 -0800 (PST) From: Roman Gushchin To: Andrew Morton , CC: Shakeel Butt , Johannes Weiner , Michal Hocko , , David Rientjes , , Roman Gushchin Subject: [PATCH v1 0/3] mm: memcg: deprecate cgroup v1 non-hierarchical mode Date: Tue, 10 Nov 2020 14:07:57 -0800 Message-ID: <20201110220800.929549-1-guro@fb.com> X-Mailer: git-send-email 2.24.1 X-FB-Internal: Safe X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.312,18.0.737 definitions=2020-11-10_08:2020-11-10,2020-11-10 signatures=0 X-Proofpoint-Spam-Details: rule=fb_default_notspam policy=fb_default score=0 bulkscore=0 lowpriorityscore=0 adultscore=0 impostorscore=0 spamscore=0 priorityscore=1501 mlxscore=0 suspectscore=0 clxscore=1015 phishscore=0 mlxlogscore=691 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2011100150 X-FB-Internal: deliver X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: The non-hierarchical cgroup v1 mode is a legacy of early days of the memory controller and doesn't bring any value today. However, it complicates the code and creates many edge cases all over the memory controller code. It's a good time to deprecate it completely. This patchset removes the internal logic, adjusts the user interface and updates the documentation. The alt patch removes some bits of the cgroup core code, which become obsolete. From Michal Hocko: All that we know today is that we have a warning in place to complain loudly when somebody relies on use_hierarchy=0 with a deeper hierarchy. For all those years we have seen _zero_ reports that would describe a sensible usecase. Moreover we (SUSE) have backported this warning into old distribution kernels (since 3.0 based kernels) to extend the coverage and didn't hear even for users who adopt new kernels only very slowly. The only report we have seen so far was a LTP test suite which doesn't really reflect any real life usecase. v1: - added a note from Michal - added acks and reviews rfc: - https://lwn.net/Articles/835983/ Roman Gushchin (3): mm: memcg: deprecate the non-hierarchical mode docs: cgroup-v1: reflect the deprecation of the non-hierarchical mode cgroup: remove obsoleted broken_hierarchy and warned_broken_hierarchy .../admin-guide/cgroup-v1/memcg_test.rst | 8 +- .../admin-guide/cgroup-v1/memory.rst | 40 +++------ include/linux/cgroup-defs.h | 15 ---- include/linux/memcontrol.h | 7 -- kernel/cgroup/cgroup.c | 12 --- mm/memcontrol.c | 90 +++---------------- 6 files changed, 29 insertions(+), 143 deletions(-)