From patchwork Mon Jun 11 17:54:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roman Gushchin X-Patchwork-Id: 10458615 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id EEE4A6020F for ; Mon, 11 Jun 2018 17:55:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DA62D2858E for ; Mon, 11 Jun 2018 17:55:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CF07B28590; Mon, 11 Jun 2018 17:55:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3E5962858E for ; Mon, 11 Jun 2018 17:55:17 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id F038C6B000D; Mon, 11 Jun 2018 13:55:15 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id EB2436B000E; Mon, 11 Jun 2018 13:55:15 -0400 (EDT) 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 D2E5A6B0010; Mon, 11 Jun 2018 13:55:15 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pl0-f69.google.com (mail-pl0-f69.google.com [209.85.160.69]) by kanga.kvack.org (Postfix) with ESMTP id 8EC306B000D for ; Mon, 11 Jun 2018 13:55:15 -0400 (EDT) Received: by mail-pl0-f69.google.com with SMTP id 39-v6so1054879ple.6 for ; Mon, 11 Jun 2018 10:55:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:dkim-signature:dkim-signature:from:to:cc:subject :date:message-id:in-reply-to:references:mime-version :spamdiagnosticoutput:spamdiagnosticmetadata; bh=0F0hmiikZCZEpzpQjv6NKpEt9e00TVa3fL6JUAehAfI=; b=qOw+EVF8lHRTbKF1lmci5lgKsFbSpJozar2szCFpnnG+ZRlbj6YntPx2NRaLx7Plw3 6y8lh0Ve4+g565aN/cA850IxHq7kr6nppEA5gZAmm2MT5i7DRkQ2qC8tkdTbjgymupqm 1jxvfyMhASMIMmsa4vUZcJKNblRmXn3psc8uiVkEhc8kyuoCfFJU+nTboBIkQavQ5Yjm vzRoYIciUMe6rF0HBIpL9tZZfqmLOObPQJAcCVumlg1T2E71B4PAlRSf0PA4RwsP/W3Y wkter5OxPLHevwEchpBdstftIR3tUWymQ7Keg/5mm6iO5LE9JUIG22EFsHE1NjwjgRYA KDcA== X-Gm-Message-State: APt69E2D3slssoUH9zpnNWxk5+CN/2HElNbbF4U18+wHJAMI8M++kK0U hpZjpvYqnfIxEF/Ij5BorMS06iQQemRgJj95Fp0WfDcjaCiMiBhvzdsZFUMi2oVolpqyJfwoodp oJBDLFnvZGVbCCtlM4z9rEPcaMRbI/ufKQR27LfztpeFTeugwFG0DcDIWk0ai1pohwg== X-Received: by 2002:a17:902:700a:: with SMTP id y10-v6mr161703plk.249.1528739715261; Mon, 11 Jun 2018 10:55:15 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJMfbsTkuBOB6eBfMSqu99JIB646XH2j8xuiSaIBm/x7xvayYrxXuZzTG62DSrLHzAdk9aP X-Received: by 2002:a17:902:700a:: with SMTP id y10-v6mr161656plk.249.1528739714565; Mon, 11 Jun 2018 10:55:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528739714; cv=none; d=google.com; s=arc-20160816; b=YfkrsJmLgZwq09PB9X+QKu2ohot4yxfLqdoRt0lkfB9YibZls7hTaYwOx1bKeAFaEr ld14RP50Fa7cagPk1ZrSZz/ctjWwB6aSp2zM9KOdxFOYpMblVlbATdaSq/5+hv7yrTbB bgO6+BxBf1tb0IXBtMdt9J65OyDshxRn3natkP2+WZprd470hLiyoefTd0o7BR3sFD57 pDdOif00pG/1Vux5eJ1ypzAhGYH5eqONZNrHd9I4vhttnMdOspEfNMmbJZw+5FOSl9dL tPMzW3pdfr6/U+1emY0KL9iAYTHnGCcIbx3+hUoPTOqg94UJArnd4jRzpq65MkggfmRw VSgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=spamdiagnosticmetadata:spamdiagnosticoutput:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :dkim-signature:arc-authentication-results; bh=0F0hmiikZCZEpzpQjv6NKpEt9e00TVa3fL6JUAehAfI=; b=np8ZyxUdUr7VbLXVBfo2xBfZIWTWWybZGVdnzKHr2Pewpvb0nQ5kNalqUhLqCJfF/N 9OT50S9uoif0TR1s96EXlPGnNIv10NesM8d85qpWKdJmcF4zJnY7AXHxF0TGnjPy/5zE Cd+eQydTzAheyBCiG3cyg79OJKJtitnCPnwQ64nina19kluqqKD9H2s5IYZZCXwL1Rp+ 6lrDMC12RREWtoORfK4FCQH15BaIq9FFyZv45PF4acBoTpJKkDfiSUvFbs2Ibdqr21lO DWr43VElnn1F3xjDUDE1qnkkCUWHValZbzXeXqjY+j5exVdYznDFRXemXXKAqhDmuT6u YFTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fb.com header.s=facebook header.b=npJ1fTEL; dkim=pass header.i=@fb.onmicrosoft.com header.s=selector1-fb-com header.b=bYEvQ/Ds; spf=pass (google.com: domain of prvs=9700a3645f=guro@fb.com designates 67.231.153.30 as permitted sender) smtp.mailfrom=prvs=9700a3645f=guro@fb.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=fb.com Received: from mx0b-00082601.pphosted.com (mx0b-00082601.pphosted.com. [67.231.153.30]) by mx.google.com with ESMTPS id q15-v6si38652432pls.358.2018.06.11.10.55.13 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Jun 2018 10:55:14 -0700 (PDT) Received-SPF: pass (google.com: domain of prvs=9700a3645f=guro@fb.com designates 67.231.153.30 as permitted sender) client-ip=67.231.153.30; Authentication-Results: mx.google.com; dkim=pass header.i=@fb.com header.s=facebook header.b=npJ1fTEL; dkim=pass header.i=@fb.onmicrosoft.com header.s=selector1-fb-com header.b=bYEvQ/Ds; spf=pass (google.com: domain of prvs=9700a3645f=guro@fb.com designates 67.231.153.30 as permitted sender) smtp.mailfrom=prvs=9700a3645f=guro@fb.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=fb.com Received: from pps.filterd (m0109332.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w5BHnOsE008293; Mon, 11 Jun 2018 10:55:03 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=facebook; bh=0F0hmiikZCZEpzpQjv6NKpEt9e00TVa3fL6JUAehAfI=; b=npJ1fTELEC0W2uIg1mNGliiWvRDC6b/tiS7+piSO/FCTJxxYBtXaJm07T8+OpUiPsx69 cxPGXdldav9GZHtzF93MgZId6Y5mP4ugiZYctFyQhSX2tWXB2NLbeGXkvmF9x64cSkNi RvcTy1gGMVODlVXhamBIcbVLr1RagWRYko4= Received: from mail.thefacebook.com ([199.201.64.23]) by mx0a-00082601.pphosted.com with ESMTP id 2jhw72g4mg-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 11 Jun 2018 10:55:01 -0700 Received: from NAM04-SN1-obe.outbound.protection.outlook.com (192.168.54.28) by o365-in.thefacebook.com (192.168.16.24) with Microsoft SMTP Server (TLS) id 14.3.361.1; Mon, 11 Jun 2018 10:54:46 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.onmicrosoft.com; s=selector1-fb-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0F0hmiikZCZEpzpQjv6NKpEt9e00TVa3fL6JUAehAfI=; b=bYEvQ/Dszq4Hl3MbKBwchPFtbm+ngQervFMqShMM5ePgtMQvIwlcll/eURc1EH8UQI9tAOguQQlglVRveCeSOtlUKEiF8CVvindRhyIIKbwQZtvno1CRKEtbS/yW/CGbZG6zkciZ9Q5k+1eccF6ILNxsFEZnfS5PJdjNwbTW75Q= Received: from castle.thefacebook.com (2620:10d:c090:200::4:49ec) by DM3PR15MB1083.namprd15.prod.outlook.com (2603:10b6:0:12::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.841.17; Mon, 11 Jun 2018 17:54:42 +0000 From: Roman Gushchin To: Andrew Morton CC: Johannes Weiner , Michal Hocko , Tejun Heo , , , , Roman Gushchin , Vladimir Davydov , Greg Thelen , Shuah Khan , Andrew Morton Subject: [PATCH v2 2/3] mm, memcg: propagate memory effective protection on setting memory.min/low Date: Mon, 11 Jun 2018 10:54:17 -0700 Message-ID: <20180611175418.7007-3-guro@fb.com> X-Mailer: git-send-email 2.14.4 In-Reply-To: <20180611175418.7007-1-guro@fb.com> References: <20180611175418.7007-1-guro@fb.com> MIME-Version: 1.0 X-Originating-IP: [2620:10d:c090:200::4:49ec] X-ClientProxiedBy: MWHPR0201CA0080.namprd02.prod.outlook.com (2603:10b6:301:75::21) To DM3PR15MB1083.namprd15.prod.outlook.com (2603:10b6:0:12::9) X-MS-PublicTrafficType: Email X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:DM3PR15MB1083; X-Microsoft-Exchange-Diagnostics: 1; DM3PR15MB1083; 3:MpvrDcd1WFDQQeB6KxJp1zBCzuPMwa7lxXp8MwVRpHKJa2vddtRBAMezvWLqFuj+JET4TQX2+MMlTSlYlajoZ79zFsBG1eD/IvI7iMxxDzeQVvJCZ4md53B4TGrGqhr3pnwYW8SdCQXbTs9hh45zUohKWmZ8zNCAcgP/+oAWv/+bUEYMmYqTIJxo+IQMF4wPkQj4xFkogo4KlQWD58yg4RZyT7bM9Xpaz0nxHi41gWKFuoOIEeQlRx9XMbeLkOfq; 25:ZbWDDpUJQ5tUF2ZjJ3jINo3JvTuFmuHXF91jkw6rP3+oinTuMKYqpIR0VzXCia60UJ0Cz8rFVKWa4ustJ3G/AFQ7Tjd/g/fVYscteh8BmRqdh+AVJzLDixF4Tqh6UWXhbo/oTeTCuR6Pdw+b4iTuQTCGShHpxypNbalwGK3gw0Qwqk1pqgjibVX1Y74kqXEG/faoxVk+Oh4RqjgJ6RcqebR3xewYpbyCr2YUKbzLWygF3V2fFXojIZWVfK3q+VWnNudHWE2Ca5Gg1ZpgDWwZwPwFokHTZVFrrGmzAgS1LXnyymUA0C9cBQTIEr9vB5XVSu09Wk0UpakTey6guDXQoQ==; 31:H/84QsUAVoEJyAWnInTXHERq6RK7b67csvyE4r/XG6xayOx3dG2a2MqQqc25Vm+o0nV82Bykss7IX40mDKM5BudDn5apFazhdy1szkf4u63Qoml0CPIQTXSYYFk4qUiHyoDfWrhx9zd33uTpm6BUEl76+kCCZR97/2TVr5/jXbDZ27NV8GOadq8AQDwByqHkjvwrr6DlCS10JMJtqi/3SCogms9INVlILcInga/eOaQ= X-MS-TrafficTypeDiagnostic: DM3PR15MB1083: X-Microsoft-Exchange-Diagnostics: 1; DM3PR15MB1083; 20:cz1ShvnvfxU+bedpnvVA2KomTveBKOzXMxNtap0QBw2E9g8Bdye7UQ/1ITuTV8xDtq5fSh9U8XRvwm1fcuvnjRBcWAIvgzoVMopkHBTCQ49X1F9jeRx7dIkR0iZdl1opNPY7p1i2BCK+zmWFV4U7iCNJ/m7LV+bVIXCXNnUng6qfmC3ptufY2g36q14yNSufMf7aTQm4+d/g3IbIWbVR/cccbA+GULcdyUFDSGxtVtXbI0I6+OFVIc1H1mLXGs96D/6UK/PGybXt6YIBY8BP20xdutndHQEoP3C2PdXnXcoIW5VEKKWEHwhcKXIFuuStbSWIay6oo7eebi5y0yUSKKoHBQF2c/4ubBwapnkKvLmDa+aqRrI6IivntjmvDNeQfUOdI80z7PIc8V8+fUoRHMsD9sa4ccIRGjPm8syzDW4VZpnra/NeZVfrCvWbCI4Bv+YqsQUrWysMBaVl5StZiw6P0DjXoADP+v7itZq6xWk4vVxvI4PM16MWj6wqbRqm X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(85827821059158)(67672495146484)(211936372134217)(42068640409301)(153496737603132); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(10201501046)(93006095)(93001095)(3002001)(3231254)(11241501184)(944501410)(52105095)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123558120)(20161123564045)(6072148)(201708071742011)(7699016); SRVR:DM3PR15MB1083; BCL:0; PCL:0; RULEID:; SRVR:DM3PR15MB1083; X-Microsoft-Exchange-Diagnostics: 1; DM3PR15MB1083; 4:oskz9UyXQ9USROWo4OQBfrvP/M4p0MwUlO9d/1l/Of1FN27r+0+97Lo2PjvswxQ+sSL//FkxzgN1tXKDgKHMygyHILYNpswffGRx1vA2pdXCCammH1vKsWSEzDFs6Jb5qRLuvL/BuY7ygQFtTLpIF6FymsIaPOrrAGOLpjKu9FRX3YE8QoOcQ5a0H1vbL8aFFReUKU6aHl0z5OikuqjQvRovoVm5xFnb46DlfbCTrmlbi1JfOZ4am7owpDq6p/Lr7rauob55VH13CVlsQM+lIVrEBvGUL2G9I7as/9YR0ZFDPHqWdvl+4K9EkwfAzlNvC8QYKtTqb8yyFg5brJ4bBHSzuH3VFFxZtQCn2l1mN7e5fthsg1uwB+YXex3MKV43eXARtk3WlkX3LcaRjSdtqhHU0Es5jdxSK92bcyGSetueW/ZbchC+xUnRUwOOx1Xnr6Xxb04/RRGP2CANVSG2JQ== X-Forefront-PRVS: 070092A9D3 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(366004)(39860400002)(376002)(346002)(39380400002)(396003)(189003)(199004)(7416002)(316002)(53416004)(25786009)(50466002)(39060400002)(68736007)(2906002)(6116002)(48376002)(6916009)(6666003)(1076002)(6306002)(86362001)(50226002)(6512007)(53936002)(7736002)(305945005)(8936002)(81166006)(81156014)(4326008)(47776003)(97736004)(6506007)(46003)(11346002)(105586002)(486006)(446003)(2616005)(476003)(106356001)(52396003)(52116002)(59450400001)(69596002)(5660300001)(8676002)(16526019)(186003)(386003)(54906003)(76176011)(966005)(16586007)(478600001)(36756003)(6486002)(51416003)(42262002); DIR:OUT; SFP:1102; SCL:1; SRVR:DM3PR15MB1083; H:castle.thefacebook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: fb.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM3PR15MB1083; 23:kZUdm6N2fL8NnHM/VTJK0sC4o3UipF6KFa2RvjZht?= =?us-ascii?Q?lcXMIFzZCxPEaPnK0I9mYKtCFF2dOVOg1iy62hWRn34zGWxbQ0knPDBFbRGj?= =?us-ascii?Q?SlnK9mSgVLJPE8chW2q5HHq/St3GdvcS7j42QViJfBXG6BZAOtCBV/+aI+dN?= =?us-ascii?Q?0NNK/33eyJiSg1vKmA/lc22W37VI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3g/r3pgLnK1OpD2DpXsQSfKLDBkrSoHg==; 5:K/d9natiCyfP2JvUXSc8Ez50PXvcugSAdslGFtTJZGTg5/jIoJ0W2AOtektqAj1Pymc3xTqjTOaTl9nLBZNKF6rN6r7HVf+cIUkR5aCACTyn0szku0d+f214HZiWksXvQuMwbq6ZKJonBv9++2+oHslzJf/SHs6uXE2zQJt0L0A=; 24:E5rkwzHQnp86lu094Fd9JTwH9+oTjONBcuWtKZ9Z/CFzn0xYdm6x5bZFX5RILQfwIZP7JY3P2W8v1OnV92O5cvTvgztWzOSAu8T87iBAhzI= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM3PR15MB1083; 7:w50HUMVe9R48wTbFGadcUlxppH55yNtwgsmn3abJthIXZL+rup8MCXU9Cvjk4/Ugcn0sDHMtArs7jsiYshpyHQ5v6LAs1ugkmEwh9AhagauNPD/M7ZA49QnJGl0GT0pCKM4cxMiepBVDcRnHZcNATJB0X522bsnf2dQ8ngAwFb7Gxg1Nz9uQQv+6Sic8SPGXKYi9oUhs8RQmEQzqv7scxQiXJWbwEVmuQMZF6wbvjIyyZY+ver8Vv0fIp12aTQzF; 20:SD1vjvYolG/SKT7EjPga/nrf51IOjN2FAMHAtmsuAHz8CR0xUbeGQMpBuesMN49kueHicHc1IBfKflZft/uxGXQ02Sq4XxrlzvOss0dc20qE1N9esOrKKzwQmu4ulwbyHuU1juKkDYkyc6/pqv1hsMZwJesT6mrSny0Av/dxGs8= X-MS-Office365-Filtering-Correlation-Id: c18f0541-5a32-4b19-fd1e-08d5cfc469ce X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jun 2018 17:54:42.7266 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c18f0541-5a32-4b19-fd1e-08d5cfc469ce X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8ae927fe-1255-47a7-a2af-5f3a069daaa2 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM3PR15MB1083 X-OriginatorOrg: fb.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-06-11_08:, , signatures=0 X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe 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: X-Virus-Scanned: ClamAV using ClamSMTP Explicitly propagate effective memory min/low values down by the tree. If there is the global memory pressure, it's not really necessary. Effective memory guarantees will be propagated automatically as we traverse memory cgroup tree in the reclaim path. But if there is no global memory pressure, effective memory protection still matters for local (memcg-scoped) memory pressure. So, we have to update effective limits in the subtree, if a user changes memory.min and memory.low values. Link: http://lkml.kernel.org/r/20180522132528.23769-1-guro@fb.com Signed-off-by: Roman Gushchin Cc: Johannes Weiner Cc: Michal Hocko Cc: Vladimir Davydov Cc: Greg Thelen Cc: Tejun Heo Cc: Shuah Khan Signed-off-by: Andrew Morton --- mm/memcontrol.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 5a3873e9d657..485df6f63d26 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -5084,7 +5084,7 @@ static int memory_min_show(struct seq_file *m, void *v) static ssize_t memory_min_write(struct kernfs_open_file *of, char *buf, size_t nbytes, loff_t off) { - struct mem_cgroup *memcg = mem_cgroup_from_css(of_css(of)); + struct mem_cgroup *iter, *memcg = mem_cgroup_from_css(of_css(of)); unsigned long min; int err; @@ -5095,6 +5095,11 @@ static ssize_t memory_min_write(struct kernfs_open_file *of, page_counter_set_min(&memcg->memory, min); + rcu_read_lock(); + for_each_mem_cgroup_tree(iter, memcg) + mem_cgroup_protected(NULL, iter); + rcu_read_unlock(); + return nbytes; } @@ -5114,7 +5119,7 @@ static int memory_low_show(struct seq_file *m, void *v) static ssize_t memory_low_write(struct kernfs_open_file *of, char *buf, size_t nbytes, loff_t off) { - struct mem_cgroup *memcg = mem_cgroup_from_css(of_css(of)); + struct mem_cgroup *iter, *memcg = mem_cgroup_from_css(of_css(of)); unsigned long low; int err; @@ -5125,6 +5130,11 @@ static ssize_t memory_low_write(struct kernfs_open_file *of, page_counter_set_low(&memcg->memory, low); + rcu_read_lock(); + for_each_mem_cgroup_tree(iter, memcg) + mem_cgroup_protected(NULL, iter); + rcu_read_unlock(); + return nbytes; }