Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751790AbdGYMbm (ORCPT ); Tue, 25 Jul 2017 08:31:42 -0400 Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:39064 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750861AbdGYMbj (ORCPT ); Tue, 25 Jul 2017 08:31:39 -0400 Date: Tue, 25 Jul 2017 13:31:13 +0100 From: Roman Gushchin To: Vladimir Davydov CC: , Tejun Heo , Johannes Weiner , Michal Hocko , , , Subject: Re: [PATCH] mm, memcg: reset low limit during memcg offlining Message-ID: <20170725123113.GB12635@castle.DHCP.thefacebook.com> References: <20170725114047.4073-1-guro@fb.com> <20170725120537.o4kgzjhcjcjmopzc@esperanza> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20170725120537.o4kgzjhcjcjmopzc@esperanza> User-Agent: Mutt/1.8.3 (2017-05-23) X-Originating-IP: [2620:10d:c092:200::1:d1cc] X-ClientProxiedBy: VI1PR0801CA0086.eurprd08.prod.outlook.com (2603:10a6:800:7d::30) To CO1PR15MB1080.namprd15.prod.outlook.com (2a01:111:e400:7b66::10) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 763afefd-df4a-45fe-4cdc-08d4d35911fb X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(300000503095)(300135400095)(201703131423075)(201703031133081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:CO1PR15MB1080; X-Microsoft-Exchange-Diagnostics: 1;CO1PR15MB1080;3:ft6kqKLHMi1MbH75LZ+K+doPeHciS6ld3Nu3FLAC+RsYzNC6yvN3WyQM+CpKSJj9WOchkg91+CbU8aMnBkhu++FCCUTfoeESEnIWSwEbmGGSvcc7esG82Hqro2WZs9NHjV59FGxAPkp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QrOK8IS3qc3rX1MAvmSw9qQEX5EE+r9oWRYCGjB060j4LxTGtEwBjxwdIj6D5Q12i6lW1KtRSewoYEm8JzJitt8vRSgoeHnyrVjEwMx2sI5YulNrhRrcyuisLyeGa1TRfvm0EQaWJJ8rvDY00G31hcK1BL2F12uatVJTQGPiTP6qa9SkIcaFZeqmoo= X-Microsoft-Exchange-Diagnostics: 1;CO1PR15MB1080;20:k5z8oqO0LZwIFntQjK/A/mmcc3ISufeKwO2oLaDBF1CVPEx9oCRHF5arHU31RNa/5/4Idww0KloPEomkyH3EbpdjMXF13rUEgDAjnSM1iDkvkf7+9VG/GG1E+czdlg3PDV5PttUapy9dQ51qa4DPf997QOE5DaIJSlxiiyd4O9syafB1MnBUZbxLeMSqIgezPfZnbs3hgKdcJh/o7Qq7VkDgHSg3QXFIOme1mgulyVR1DioiIzA+G7wFA+XyzMG2pgGrc4ztB/N/V67T7FP9xWd56eKLOfD8lS2NaLnTR1h67mIIjcoSSFcEPC1aguE5ZZduneJUwqga2XL2W9POXrJq61owEPkaeohgJDCOdW3hz5NlOsJoNZ0UXlyvQOGp4g1Rd02iUiZUJefmXgTsw4mMkCt/G3+xUXjx2LAXnfvjCVmywyD2Ca3cfaV5kI55c9lC7cd16tL3Y/DhTfjX6bwoI3Xi6aYIjrtcCdwK2RbA5ZR26o8vsiXtw6pJkBPq X-Exchange-Antispam-Report-Test: UriScan:(9452136761055)(67672495146484)(17755550239193); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(3002001)(100000703101)(100105400095)(10201501046)(93006095)(93001095)(6041248)(20161123562025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123564025)(20161123555025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:CO1PR15MB1080;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:CO1PR15MB1080; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;CO1PR15MB1080;4:/hPqz5UNiLtsKNNUEhtm4C6utp6s/pE6y8yDFpSrw1?= =?us-ascii?Q?FVXEacXOm6W7ohHzvUSyWVBhzhdKYkEYaH58O3O39B2MkZwIBOOzyDhr4woT?= =?us-ascii?Q?tmavTRtcEg4QgH6QZKLgOozQ2XP/ourrxVFXROpGU0GxluI12JPeKVzAWd9D?= =?us-ascii?Q?yDi5SqWWxhJxGg37j+IYFurlVJzotLRew/gE3aNtEv+kdM2Sb6PcKkbr6LKi?= =?us-ascii?Q?M06xxVqcoDHrs9x6ZzlV/kpJtrXJFbO/wqEblM1G56hR/EgVfXIiTvkO0SA0?= =?us-ascii?Q?a9zzSxLbweH+N5+LQkR4la/GIct7qNDJPt8U6/kmL5xV6Ovmq2gwcXnNYoNn?= =?us-ascii?Q?BaYNeDtKCV1i9kYDk+a4+JMNwUFwIvPuQMOb5DC0+s7S2RpDChWOrNXcUlxN?= =?us-ascii?Q?wB+7Iy5HYRSXgX4eVOKukIsdIW6aEVUf03C4Hs1dGrVAtReRZGSIMZoh3foL?= =?us-ascii?Q?KW1l0EG7/CTsv820fBxDuY+m9+yVNWDXVrwgIwn5edKrZNfBzOCvJXDHjWVK?= =?us-ascii?Q?EBw/mmtfIscuTKirBT4Uxuy2gA8YhAQ6h21bgZTQ55l6bpckBxgkwFBBa+Qp?= =?us-ascii?Q?c8HVZn33TkZT+KTMu224c0UJ2zAaZqwGnNOgNzzr4s+oeN/7mpJFJGPyKKwe?= =?us-ascii?Q?cm7lMCAd9GSa1j/u6B1Nc+9DWyhGWHijvmFrJFvvf9mO2tfKKcALyNT4XgLk?= =?us-ascii?Q?sN5bi9fWaxOLfdjgfBxtKeXrwE8MDf6gowuCwZtG7yk0Mgijt+txbLrPkjq/?= =?us-ascii?Q?M2gfkw7wNleLcTQOBrJ1oozw7ccjJTXm0DYh7LIil7OkmB9WO1MeFtTKsbWZ?= =?us-ascii?Q?+P3RwJyWLQjWbTvHz5Pvj2CO0JNP6urmnKpsuuxvZepV7ktKQBlot6xDAciW?= =?us-ascii?Q?jvd01BrFpEYrOZpbR/LWcVOPG4w+HyS7QSEmu5Na88mokfWL6n5J/0/T08dO?= =?us-ascii?Q?MRjSrw58VomjpDfW/qQ2ta0v7g2mE8XMlDHC5NPPpPz5t8ulH1izKdZbtn76?= =?us-ascii?Q?79QUc+9ybyipY7D1F2PmeCRo5MJxXx/Z08GiG4XOxdCkzeoD1jelAUYyVtCU?= =?us-ascii?Q?UNRo7dGKyuL5z2J8sv/nQs1j/HG7Q4fFQM1iBk7Xb4lETqGjGsKQsCbGET27?= =?us-ascii?Q?ofl1BmRTel6JoD98Ha9GKAblH3Og7VqAV99R5hO20kxlNBieJq/eY8ZmjPnw?= =?us-ascii?Q?ByfYTGZ13Z6xHGmyWRm6C/Gz52Q3DllX8a5D3oc2bJQ3t6RMjg9U8/3Dcs55?= =?us-ascii?Q?gbuc69Ta1OYgXtgG0=3D?= X-Forefront-PRVS: 03793408BA X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(4630300001)(7370300001)(6009001)(39840400002)(39400400002)(39410400002)(39450400003)(39850400002)(199003)(24454002)(189002)(52314003)(53936002)(33656002)(7350300001)(47776003)(6116002)(23726003)(305945005)(9686003)(229853002)(68736007)(54906002)(55016002)(478600001)(83506001)(76176999)(54356999)(50986999)(86362001)(25786009)(106356001)(4326008)(2906002)(42186005)(50466002)(6506006)(101416001)(6246003)(110136004)(105586002)(38730400002)(4001350100001)(6666003)(6916009)(2950100002)(81156014)(81166006)(8676002)(189998001)(7736002)(1076002)(5660300001)(97736004)(18370500001)(42262002);DIR:OUT;SFP:1102;SCL:1;SRVR:CO1PR15MB1080;H:castle.DHCP.thefacebook.com;FPR:;SPF:None;PTR:InfoNoRecords;A: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kprNQiuO/ZFv5XmLptfMAUfTqn?= =?us-ascii?Q?oSiGsAVL8k0iq+ALOYobLG0sO7qu6p2i1uKVwTJO2Ktr5u29a/YBan60ZD8l?= =?us-ascii?Q?TjXE62pQIygUzfxsAEP+oYsttNUDEJtDt2V1aMunigmVzSUQYl5aeyRJ4X5J?= =?us-ascii?Q?l2D7HX3tCYJjev+csQD1z+ai3R+cNqhTg1QUE9xeMbQf4vz1/aKwWapV5uTR?= =?us-ascii?Q?ixT1TCOszpmw/V/oDS7HIPWp2nsIi604sskKbKrxJYxOXcuAU0Zh+HGujtIB?= =?us-ascii?Q?Jpquo9LO6O73J0NPILIyz6rrWiFzOA6buXD3GpnvJhoEJ68VmY8bUqrotRUU?= =?us-ascii?Q?MI9diXSZjFl1fmAruC0uWpzFqvphQe6QWxwyja5oBGdfVX3Boy4lD8ySldQ0?= =?us-ascii?Q?+pFp0a2a9FtpmG6Iuya8xdfFftVA2q+eTm/H0x97xkg8MW6rYj7xtRGHTTQA?= =?us-ascii?Q?HcX2li25iPbLQEq9iNtQAVxo+prWo5bR94b/yt/FruV7mgWP7cZxKScw739H?= =?us-ascii?Q?8yLiHDF9Gn6Q5n4XXIHw7IBOJ5Fk0qbu/eehZu8jeVuUreCLGd3V3pNuu2iv?= =?us-ascii?Q?3Xn+BLKmjgEEhezjW7biWDGekK7t9Y9Hyi6IFySyxISU4IUi+OjtAlBkd7aC?= =?us-ascii?Q?FPKYgBsYQZqid/9mzrbEY+KcjNZRawKrosrZydXJyBF/SMbvynN4GJayfvXn?= =?us-ascii?Q?FFDe9vhluk02fkgD8W7ldpHMK8JtcEGXmkUyck7rTTsDGQpO68iOCRZpQQ2y?= =?us-ascii?Q?8=3D?= X-Microsoft-Exchange-Diagnostics: 1;CO1PR15MB1080;5:/Rt1ij6Cf82fCiHk2ydtpkdiPekfkxl941TOXJspS9P3Jpah5frzU1n2x47P+vxOU4WoJNs4L2Zj8TA/c2yXSiQclsejGBj8PhuJK9zXNiFLeItFMnoG/wNRUv7hGEqURLgIsX3jU9UI5j9CWsZ31NFwDEdw89/c4q1IDpFt0uRqHfy4QMP7wTT2NP+qC7yGbLMnJPznWtUavfYnjQShcVsztUudzzdzVpa8RN6h0+UW7ulQ4BFkIE43iqtMO/T2RkMb81xqFC6vfdtDRakXpcBcknwQB2p3dPstHZmTaxSomkbzlaX8TAY26U5XHw15n32ypf3S3szwrNdF3407mIqjw84C57rY5N34g1Z8+8vRku3c/XS8K2iLlCBDFV+ar5fNEnbH1KF6/46+nIWHqKfeD/9pMOpKjJ+PNDdd7Szn+L7Gr8vaitc1B0jbX+HebbgCZGCzgbIKceJqOzD2hTaGoX1WmNuHdPvLKI7s+x6L+hT7y5gArGNe3by/osl7;24:XG3rm8upyIIXhrCpTaTbzSFfoUgHS1zLT5IozYBtk0LQ3XzLQYRJWPKbiCNeAF9O1KfHq0AmbkW28+nW1ahBOlIzQT2qblw0S9OZylpkEpU= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;CO1PR15MB1080;7:W/PkuWDQG++JzO7ETC++espTixgW8yrVRNAAH7ZgrsFxBgQ8M9JiMLXu0kpWjEDTzPmUq4o78l/9TYwHXWMPpqomlvpI641iginXRG5cBZ9AlvIvoTqHrs2C2Nl2EjCC8RPZYDRGY3JoGzkBOLL8UbRSVOVET/PPzX+INImUk+ixzu49GLiWKhgzyPf20iJdd70AM4jqpkWRfxQEOvwMcN6WHmFXtby5GoJhNx1PGU62I0g79G89SP+FeGnwECVgytGXf/Boah7bflkX1K6Zn+16RDTrLf8qSJucC6XJHW3BfEDsu913JZekP9f+4cpvH1TuMBPalI97knORqH42D7NX8bOWGTPK6jcnVbmscJkHCvgekOAdiL2WaXY8P0pXvnkY5xLcR3KLuVtaYPSpie633jOZ1/cJnCFwesjI+jc26/DAtx3QNL1eVCvtoYIq0C/xy+jukAfwQ/H8BE2wBZkLoeBMnZnV76a9HUZ5dzjgWsRuMvAgQI2It5TNiVMehZJ/p5hI6bYTdSl3HLUSLQXBmE5vAlizYPowaNjQMbxDaAt2XXh9pVF9ItFGA0MsV2rsrybpsavvvxEEasbbufS95Kavl+3trOetbhQSRSbfQ4aZlR9XJD1F1sBOHMk533NNeGYJtEqldk0PrvJdaLiBqkWSbCtuPv0jIbWxjm5MWw54ntLULLSaoi8MUu1gMZeE1hVkDgRwSzT+8FXjFKiUDMvryztYrVy3Lx9pTuUu0kyDDiQWNkLfz+vbSPRr1AlMLWtYtFpZT3ZlPPbWeRxFqwGBUekuGYkv2Uc0AmI= X-Microsoft-Exchange-Diagnostics: 1;CO1PR15MB1080;20:YRqWoMFCfR2JN9sbBXv9KC2ZtA6Q6yh5hRiavt0CJ1pOIJhLpa2OZAnjtFOwCj1Xod6DMxIN0GyyoDgMI/twrYHaxS60NLO9jw5gNHujcFksj+m8G1AEmp626drA7sC9U2rV+NFTsx0CZdEABCHBcoauRZVOTn5069D7I8UJfAA= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jul 2017 12:31:25.3467 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR15MB1080 X-OriginatorOrg: fb.com X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-07-25_06:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2394 Lines: 64 On Tue, Jul 25, 2017 at 03:05:37PM +0300, Vladimir Davydov wrote: > On Tue, Jul 25, 2017 at 12:40:47PM +0100, Roman Gushchin wrote: > > A removed memory cgroup with a defined low limit and some belonging > > pagecache has very low chances to be freed. > > > > If a cgroup has been removed, there is likely no memory pressure inside > > the cgroup, and the pagecache is protected from the external pressure > > by the defined low limit. The cgroup will be freed only after > > the reclaim of all belonging pages. And it will not happen until > > there are any reclaimable memory in the system. That means, > > there is a good chance, that a cold pagecache will reside > > in the memory for an undefined amount of time, wasting > > system resources. > > > > Fix this issue by zeroing memcg->low during memcg offlining. > > > > Signed-off-by: Roman Gushchin > > Cc: Tejun Heo > > Cc: Johannes Weiner > > Cc: Michal Hocko > > Cc: Vladimir Davydov > > Cc: kernel-team@fb.com > > Cc: cgroups@vger.kernel.org > > Cc: linux-mm@kvack.org > > Cc: linux-kernel@vger.kernel.org > > --- > > mm/memcontrol.c | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/mm/memcontrol.c b/mm/memcontrol.c > > index aed11b2d0251..2aa204b8f9fd 100644 > > --- a/mm/memcontrol.c > > +++ b/mm/memcontrol.c > > @@ -4300,6 +4300,8 @@ static void mem_cgroup_css_offline(struct cgroup_subsys_state *css) > > } > > spin_unlock(&memcg->event_list_lock); > > > > + memcg->low = 0; > > + > > memcg_offline_kmem(memcg); > > wb_memcg_offline(memcg); > > > > We already have that - see mem_cgroup_css_reset(). Hm, I see... But are you sure, that calling mem_cgroup_css_reset() from offlining path is always a good idea? As I understand, css_reset() callback is intended to _completely_ disable all limits, as if there were no cgroup at all. And it's main purpose to be called when controllers are detached from the hierarhy. Offlining is different: some limits make perfect sence after offlining (e.g. we want to limit the writeback speed), and other might be tweaked (e.g. we can set soft limit to prioritize reclaiming of abandoned cgroups). So, I'd prefer to move this code to the offlining callback, and not to call css_reset. But, anyway, thanks for pointing at the mem_cgroup_css_reset(). Roman