From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BD359C43381 for ; Thu, 28 Feb 2019 20:31:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 77776218AE for ; Thu, 28 Feb 2019 20:31:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=fb.com header.i=@fb.com header.b="Dl8FZ8UT"; dkim=pass (1024-bit key) header.d=fb.onmicrosoft.com header.i=@fb.onmicrosoft.com header.b="hWyJ4igb" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731624AbfB1Ub1 (ORCPT ); Thu, 28 Feb 2019 15:31:27 -0500 Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:53150 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726926AbfB1Ub0 (ORCPT ); Thu, 28 Feb 2019 15:31:26 -0500 Received: from pps.filterd (m0001303.ppops.net [127.0.0.1]) by m0001303.ppops.net (8.16.0.27/8.16.0.27) with SMTP id x1SKTKNm018800; Thu, 28 Feb 2019 12:31:14 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-id : content-transfer-encoding : mime-version; s=facebook; bh=EyXom8gMdU4oy7ZJtQmqMzPuRAamqePvWnizr2DZQG0=; b=Dl8FZ8UTgEREHBSFoaj3UdVOdKYUOO1yRIqEDmY11Mnris+dingEXpjW8FfahZqQaIGb b/kppO0ifj0nTB0xB3G14dCTcJXriMtAuopb4c+ynr0KJDV1ZSxjYcCJKWtKuIqN4VJe JQfZa0uuCSrMITnXBQYmKCxt5xQzMPLhMCk= Received: from mail.thefacebook.com ([199.201.64.23]) by m0001303.ppops.net with ESMTP id 2qxkjb0qh7-4 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 28 Feb 2019 12:31:13 -0800 Received: from prn-mbx07.TheFacebook.com (2620:10d:c081:6::21) by prn-hub04.TheFacebook.com (2620:10d:c081:35::128) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.1.1531.3; Thu, 28 Feb 2019 12:30:51 -0800 Received: from prn-hub05.TheFacebook.com (2620:10d:c081:35::129) by prn-mbx07.TheFacebook.com (2620:10d:c081:6::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.1.1531.3; Thu, 28 Feb 2019 12:30:51 -0800 Received: from NAM05-CO1-obe.outbound.protection.outlook.com (192.168.54.28) by o365-in.thefacebook.com (192.168.16.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.1.1531.3 via Frontend Transport; Thu, 28 Feb 2019 12:30:51 -0800 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=EyXom8gMdU4oy7ZJtQmqMzPuRAamqePvWnizr2DZQG0=; b=hWyJ4igbUVoFN/wKbJaxmTdXXTPoPebRlUxw6vM2drDtgQpZjZVVU8jMIsmH0WjhcmThdg556oO92pUOWUCfdx5g/7S5AfMNhXYalONLIrdjJq5IUd/xoV4YX4NlwZf3KRm7FhhrH6be0/uYOysNkeX6n70OI4BSuJJv8qRvGz8= Received: from BYAPR15MB2631.namprd15.prod.outlook.com (20.179.156.24) by BYAPR15MB3463.namprd15.prod.outlook.com (20.179.60.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1665.15; Thu, 28 Feb 2019 20:30:49 +0000 Received: from BYAPR15MB2631.namprd15.prod.outlook.com ([fe80::ecc7:1a8c:289f:df92]) by BYAPR15MB2631.namprd15.prod.outlook.com ([fe80::ecc7:1a8c:289f:df92%3]) with mapi id 15.20.1665.015; Thu, 28 Feb 2019 20:30:49 +0000 From: Roman Gushchin To: Dave Chinner CC: "lsf-pc@lists.linux-foundation.org" , "linux-fsdevel@vger.kernel.org" , "linux-mm@kvack.org" , "riel@surriel.com" , "dchinner@redhat.com" , "guroan@gmail.com" , Kernel Team , "hannes@cmpxchg.org" Subject: Re: [LSF/MM TOPIC] dying memory cgroups and slab reclaim issues Thread-Topic: [LSF/MM TOPIC] dying memory cgroups and slab reclaim issues Thread-Index: AQHUyCKda3Qt+ClMVUers5iRNki+jqXn/PCAgAAzK4CAABr9gIACDQgAgAtgkAA= Date: Thu, 28 Feb 2019 20:30:49 +0000 Message-ID: <20190228203044.GA7160@tower.DHCP.thefacebook.com> References: <20190219071329.GA7827@castle.DHCP.thefacebook.com> <20190220024723.GA20682@dastard> <20190220055031.GA23020@dastard> <20190220072707.GB23020@dastard> <20190221224616.GB24252@tower.DHCP.thefacebook.com> In-Reply-To: <20190221224616.GB24252@tower.DHCP.thefacebook.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: BYAPR05CA0064.namprd05.prod.outlook.com (2603:10b6:a03:74::41) To BYAPR15MB2631.namprd15.prod.outlook.com (2603:10b6:a03:152::24) x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [2620:10d:c090:200::3:b9ba] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 87da58cb-28d8-41f0-4a22-08d69dbba031 x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(2017052603328)(7153060)(7193020);SRVR:BYAPR15MB3463; x-ms-traffictypediagnostic: BYAPR15MB3463: x-microsoft-exchange-diagnostics: 1;BYAPR15MB3463;20:VPhIV/PHpwpZkFj6aN3gjvtGOprrl4tft+KxQJLBJ6+Oue5u4uskVTXFCUQQx4/86m7oDOlIL9vnzbaaOG5nTdXg9tTjhl80zaF6WEqaf4GrXvQF90sfYnSBX5iyAqbok82hba6+ELlJOj48D6UCd7txmcKJJUKd08bwjcxY9ks= x-microsoft-antispam-prvs: x-forefront-prvs: 0962D394D2 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(39860400002)(376002)(346002)(136003)(396003)(366004)(199004)(189003)(478600001)(25786009)(6506007)(33656002)(386003)(6486002)(93886005)(81166006)(4326008)(229853002)(6246003)(9686003)(6512007)(106356001)(7736002)(305945005)(97736004)(71200400001)(81156014)(71190400001)(6116002)(256004)(6436002)(14454004)(102836004)(5660300002)(105586002)(316002)(486006)(52116002)(54906003)(8936002)(46003)(86362001)(11346002)(186003)(2906002)(446003)(76176011)(53936002)(8676002)(476003)(1076003)(99286004)(68736007)(6916009);DIR:OUT;SFP:1102;SCL:1;SRVR:BYAPR15MB3463;H:BYAPR15MB2631.namprd15.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: fb.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: cR1D0RsFnBKz0NE+/qe3aq/w8R9shMnYLQUuZQjUaiRjgqCKKL+QpuD35wKwt5wlFRQW5YKebBsWl8K00+IA0OesvIwzSwkP9HARn4Ea6oWgSgayZZ8DeXeWjaEUPovneb984mHlKwgx1sS2fEFZwNK0O+9w5+wplaPZn8zkOvgDHMfeCyPX9HZiLRuAht0BlR4LvO57YXY5bLlC2F5zpxjNaa7C//jGmr+dyGh1pWgYRZdUDpxjBVIqjkSC5amo5V4jC5kkcEb7/xDWEJ6h1HYlFIG+RfO/IVGIHqmrkAJOKY//kpZ8qp7W6RiuRPqYeJDaf95cfmagHH+pBf/N7cBRri/OCVJq4V3tUXK4yg0sr2iEj8TKp1JlqJcFJVv/RvRytdfutX1Ocwzmiask8B2F8MQW1XpJ18psAmK3L5I= Content-Type: text/plain; charset="us-ascii" Content-ID: <470E287E03DD5B48AD8ED302A0C59417@namprd15.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 87da58cb-28d8-41f0-4a22-08d69dbba031 X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Feb 2019 20:30:49.4946 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 8ae927fe-1255-47a7-a2af-5f3a069daaa2 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR15MB3463 X-OriginatorOrg: fb.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-02-28_12:,, signatures=0 X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Thu, Feb 21, 2019 at 02:46:17PM -0800, Roman Gushchin wrote: > On Wed, Feb 20, 2019 at 06:27:07PM +1100, Dave Chinner wrote: > > On Wed, Feb 20, 2019 at 04:50:31PM +1100, Dave Chinner wrote: > > > I'm just going to fix the original regression in the shrinker > > > algorithm by restoring the gradual accumulation behaviour, and this > > > whole series of problems can be put to bed. > >=20 > > Something like this lightly smoke tested patch below. It may be > > slightly more agressive than the original code for really small > > freeable values (i.e. < 100) but otherwise should be roughly > > equivalent to historic accumulation behaviour. > >=20 > > Cheers, > >=20 > > Dave. > > --=20 > > Dave Chinner > > david@fromorbit.com > >=20 > > mm: fix shrinker scan accumulation regression > >=20 > > From: Dave Chinner >=20 > JFYI: I'm testing this patch in our environment for fixing > the memcg memory leak. >=20 > It will take a couple of days to get reliable results. >=20 So unfortunately the proposed patch is not solving the dying memcg reclaim issue. I've tested it as is, with s/ilog2()/fls(), suggested by Johannes, and also with more a aggressive zero-seek slabs reclaim (always scanning at least SHRINK_BATCH for zero-seeks shrinkers). In all cases the number of outstanding memory cgroups grew almost linearly with time and didn't sho= w any signs of plateauing. Thanks!