Received: by 10.223.176.5 with SMTP id f5csp4212728wra; Tue, 30 Jan 2018 04:00:30 -0800 (PST) X-Google-Smtp-Source: AH8x226O84CT4QYCYpoZED8vGpgUyDWToCox+gBHYbTk/Oo29D2ukRbtF4I2F6JVxjNInON1n5SH X-Received: by 10.98.58.194 with SMTP id v63mr30224458pfj.36.1517313630782; Tue, 30 Jan 2018 04:00:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517313630; cv=none; d=google.com; s=arc-20160816; b=Q46BiCNgW9EGK9gpPhVgvC8XICIZHCpU6VP8ru4QHvF0sQFaU+WFRoGFehKxhkSl5o zcmRsVuWa2HrbTe+sGyywrDhTx0bPl4YA6ZOqPgPySl7P+ldqa8X5ASvIyqxyGPcfvWW YSfkqmkPHIUiEAk1WQnA3LMyHdSiNBS7wCGR2hugGbJnd6znrOlVcd365EBTEBWcFLLy bBYagy3XusAiPZmhSKGJmawNkiBcH5phdcVIz3D0xROY1M5ZZeSrSQ4xCMz8SLtffKxP FGgv3GvaRuG3TqIuCfV4qVAtOiQNdaoS01Wh0yo1j2mT/TiiTxD5/v2CLEd1Q8V16MLb fm1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature:dkim-signature:arc-authentication-results; bh=0Q8DLGS+pKJ/3kfXirSwx3xwx9KqJZKGUn2CpBOX1aE=; b=pUaj38c8Q44b4Sh2dPfoSRKX49KXg0pkx6f40+IdnYz7TeJ1w+Jrmu3sL743z3/cxN /L2w2jA6HeGJb/NiS/c0S51Btra3C7EM/U4zRacfA4bmXu4fJ9MQzqP7O9GG8ClCeDhr ZznP8ug1ZfcGEvtAxB/Mugn6x+aWtma0+OmBngZRiFzfdYlrLOkhNmLvTiBEL/klJ5Ip 2gnZTz84MFDe0civi2YqjPNl7DN3FQ+RFVjfu0ZmKEoizRYTlYb9ti54C9GUQNPsvxGI 1KWPGJOn6yrXooG00cD1BccKImeYRydPrLea3yJVvQQ3BKyiqHL8lVIfyVOzDHqEvJnW d9GQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fb.com header.s=facebook header.b=B1PFHcMJ; dkim=fail header.i=@fb.onmicrosoft.com header.s=selector1-fb-com header.b=DVD2vvpT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=fb.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bi8-v6si3875071plb.188.2018.01.30.04.00.15; Tue, 30 Jan 2018 04:00:30 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@fb.com header.s=facebook header.b=B1PFHcMJ; dkim=fail header.i=@fb.onmicrosoft.com header.s=selector1-fb-com header.b=DVD2vvpT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=fb.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751519AbeA3L7w (ORCPT + 99 others); Tue, 30 Jan 2018 06:59:52 -0500 Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:58216 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751219AbeA3L7t (ORCPT ); Tue, 30 Jan 2018 06:59:49 -0500 Received: from pps.filterd (m0089730.ppops.net [127.0.0.1]) by m0089730.ppops.net (8.16.0.22/8.16.0.22) with SMTP id w0UBwY6b028752; Tue, 30 Jan 2018 03:59:30 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=facebook; bh=0Q8DLGS+pKJ/3kfXirSwx3xwx9KqJZKGUn2CpBOX1aE=; b=B1PFHcMJY4XUr8O6qdfYQYQwHtWKIwhmhOKgNSvhMV2Sr/iTSjwObFB5vLdiridfE07m Vvg1/wBVBaKC9wQhR1HhFaS7sGYVPAvsSEBREEALacNxCXk1Dnk8otJiGkL8ixcRdvG/ fwbZEUOfHVWe1syPpOZZ6lugXHnu9lelvpw= Received: from maileast.thefacebook.com ([199.201.65.23]) by m0089730.ppops.net with ESMTP id 2ftph9rn60-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 30 Jan 2018 03:59:30 -0800 Received: from NAM01-SN1-obe.outbound.protection.outlook.com (192.168.183.28) by o365-in.thefacebook.com (192.168.177.24) with Microsoft SMTP Server (TLS) id 14.3.361.1; Tue, 30 Jan 2018 06:59:28 -0500 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; bh=0Q8DLGS+pKJ/3kfXirSwx3xwx9KqJZKGUn2CpBOX1aE=; b=DVD2vvpTg6/PPDcSQnDfMoNFhqMT+8MNppu/Kp+EanFJ7tFMXrhyNoxsA5zCN0ZL3o/h8iskRZ9DmP4IOs3lpkaM5zXp9PxkSOR+p2zhFJY59JYTHHLDCj8uaKcKyebA8mOncJcHuEHZrVybt2YtebqqYinMtOmQk1c0Fg8KwlU= Received: from castle.DHCP.thefacebook.com (2620:10d:c092:200::1:fdf1) by SN2PR15MB1085.namprd15.prod.outlook.com (2603:10b6:804:22::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.444.14; Tue, 30 Jan 2018 11:59:06 +0000 Date: Tue, 30 Jan 2018 11:58:51 +0000 From: Roman Gushchin To: Michal Hocko CC: Tejun Heo , Andrew Morton , David Rientjes , Vladimir Davydov , Johannes Weiner , Tetsuo Handa , , , , , Subject: Re: [patch -mm v2 2/3] mm, memcg: replace cgroup aware oom killer mount option with tunable Message-ID: <20180130115846.GA4720@castle.DHCP.thefacebook.com> References: <20180125160016.30e019e546125bb13b5b6b4f@linux-foundation.org> <20180126143950.719912507bd993d92188877f@linux-foundation.org> <20180126161735.b999356fbe96c0acd33aaa66@linux-foundation.org> <20180129104657.GC21609@dhcp22.suse.cz> <20180129191139.GA1121507@devbig577.frc2.facebook.com> <20180130085445.GQ21609@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20180130085445.GQ21609@dhcp22.suse.cz> User-Agent: Mutt/1.9.1 (2017-09-22) X-Originating-IP: [2620:10d:c092:200::1:fdf1] X-ClientProxiedBy: DB6PR0501CA0002.eurprd05.prod.outlook.com (2603:10a6:4:8f::12) To SN2PR15MB1085.namprd15.prod.outlook.com (2603:10b6:804:22::7) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d4881f69-43d0-4d80-eeac-08d567d8de9b X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060)(7193020);SRVR:SN2PR15MB1085; X-Microsoft-Exchange-Diagnostics: 1;SN2PR15MB1085;3:E7Bzv+iEHcrZqkGs6m8WhMFKHxYNJR7PqxeL/vbERyUymDHuOVrsnaPSU72aGKyxNoqAbGdZrXLMY3R+uY18axN5qRckkg5+HOREmdGFZLBpJyZFXYSG87mpuTu0R8plPdNlrZqcO8xBWnpHm15yXggiUtNzF9nI9WoDY89iGkvw2XIMbgfc7VGV+8W3YORkvuWNIQU/TS8WTYJdCZ9YE4MwUs8po41jH/POOPAW7mMd0gAVf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goP6fvahrl508WuluagLUL5zrTUmhQ1Ig8KWyBW0CeobO0pdVR+plwJKAesAImZllnabWIgvS09UYWvxeKyLYH1OkEMZCQ0UJDPLKURoy8ToGMfC;4:kQyPt8oiPIpk/DSsJWVZgQlx1K+DOjDcrckEvhtq6uFx7cx4G7y/w4mI4dSRCK+TfIp5JphABw8No50Kw7DxN1VjIHYatXG0I/l5ZQucO+1ZPHKdsYin0FTrGZfJMLD/DMcVvFk7p13rgQdSnN2pK54tUVOcyKgw/JL6UBxLAQKprnZnP33EFKNCbCD8VG6JFEAeTo4ohdk88UDEoJ2V0XkG4ix3t3CE7kbmVEdRyGOV5x10MuX3QrWRqti5UxNZiB1uSwrfaUY5IqY/NRFNnNpHID3DDNTc8SW6l31B6W5wGhBOj2ZMHjFKySFV1g+M X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(788757137089); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040501)(2401047)(8121501046)(5005006)(93006095)(93001095)(3231101)(11241501184)(944501161)(10201501046)(3002001)(6041288)(20161123564045)(20161123558120)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(6072148)(201708071742011);SRVR:SN2PR15MB1085;BCL:0;PCL:0;RULEID:;SRVR:SN2PR15MB1085; X-Forefront-PRVS: 0568F32D91 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(366004)(39380400002)(346002)(376002)(39860400002)(396003)(377424004)(189003)(199004)(33656002)(52396003)(47776003)(6246003)(7696005)(76176011)(52116002)(4326008)(93886005)(106356001)(386003)(59450400001)(478600001)(50466002)(6506007)(54906003)(58126008)(16586007)(83506002)(316002)(39060400002)(2950100002)(6916009)(81166006)(8676002)(81156014)(105586002)(25786009)(68736007)(8936002)(97736004)(6666003)(5660300001)(2906002)(6116002)(23726003)(1076002)(53936002)(9686003)(229853002)(7736002)(7416002)(186003)(86362001)(16526019)(305945005)(55016002)(18370500001)(42262002);DIR:OUT;SFP:1102;SCL:1;SRVR:SN2PR15MB1085;H:castle.DHCP.thefacebook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; Received-SPF: None (protection.outlook.com: fb.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;SN2PR15MB1085;23:UaJNssMerxNWao2Pwe1dTH973K1sN5oL3nl9XMr1h?= =?us-ascii?Q?rfDxI5QMwbz5Scl412gyGCB5OtDTjqZYrduX+YA+srRr74GUdTLiJ7YXPsOG?= =?us-ascii?Q?QWxcwhXUQaUNghx1t5wLtW8pXZuu3Eq/f72Qk7mevt7YjEvNhFqIX37WhXU5?= =?us-ascii?Q?Hjn+OYHLnHCT27DKdPPiXQvh9bQMevmaINv5FUZLGhQVnei4f95b+3kFnvi3?= =?us-ascii?Q?EbBSXv3AoK8hnqSQqfa8wZJ3+O6yhNpIN5Z4z2/ua1d1ILlS5Vz8118VMND1?= =?us-ascii?Q?ar4oi9oJ+4eoAgytPB+vMYQEity5cEACuZiqEl/kkgmSJDLXR3JG9yxp5VWg?= =?us-ascii?Q?FJ5nVNTqd8k8bKz3Jw81/Jc/62rP3aKhOiL8plReLzVYeD4kN/qS/xqpl6zA?= =?us-ascii?Q?2DdBVxoqAWUBxogUBA8+HEdlMUXDHBRfxnVaHqxwxaf80vLMxUALvKQtXdRU?= =?us-ascii?Q?ye+MqVS+hRoyfr7GWc5F4gb1kARxintFtg93HTGXAYrWOVIg4wR0qko6ko1m?= =?us-ascii?Q?2AXbq5FTno9OFuvNIGDKsBSl4+Cz6WgTLdiJwlyGq4bZEkbVwQJiwy8bjQbs?= =?us-ascii?Q?jwUjDGQBW0ejB9tt6V+kiHv7aw6Vc5rYcsWHPOgmneV3wmvzJYRhflClVcNJ?= =?us-ascii?Q?v6E0OwLNSkJhRbOs0c31fqh/6OM6f/n+f41vOnxEyKx8vywghahCZGnY/xGr?= =?us-ascii?Q?Y5TfaH+S3fV3kzdTy48Tr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fKrEUWZPmvOwb9i3e6SXQXEhpwY+eXUnJVazi0qdxpeTYm6ReLA5BcXAvNl5cLyEzluumqZlFvKGzOHVrr2gCLCY2/Q=;5:owNRLEnX+Bnd4aBRgRx1dFPZj7qlLqy/znz3A0TDqRVk1tunLB/Oas2nF3mgE7SuU0dOzIyS7Eh5f+adm3iQCD3e12u4nHqkl12Y/Gkb/73nklJEs+DpZx0dBFG4VD6IvhVidRL5wkOL4CSyqqJj2zRM3gLxyaEcm6+cKb2fF6s=;24:M6W8rZoYsQVcxf08dwDSoTdSKQs6zmZH0nJrIxEAcLAHQ9nkURt9n0yjU1lrKEJ1Y2lH3sJEZ9GytN1MER+p6LnK2kYpAHSWeRJl88bz2Cg=;7:Fx0CLKGz79gqnNJ6j0NpAeiIQzU1KwOvS939rR1TTKcGDxHLiV9l/ExNeqg8aZ0ibTAtGrY4wLBgMdO3fD4yCtQr4nMVnlvNuNUdbE+qja85K+d3XiFID+P4ZtOhJLlnBMwyXf3D6wTqw0kXa0OKHB562AgftbkWruU8dW8YvjEONGK6BPth5qPPLsquXKn/7uOPbImd+VITgCQji6PkyR0IvHunyozAJWlLmBXLtUVKdppESamCBgO7l9o3ZzIr SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;SN2PR15MB1085;20:8NNmpBFjs79oiF2DtOGbJdG4Ldlp1SC1H2xFHalpFizc1dEby//cAJosHRxQYJtbNyoaZq5SAGimAsZIebfBudCmey5tXGBAfcmW5r34PIGMk6wt2FS3IijzrX0AbtToCUOOOU430P/dWGkmTBSzBJg08YgyQM14erU4Rq46QQs= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jan 2018 11:59:06.9239 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d4881f69-43d0-4d80-eeac-08d567d8de9b X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8ae927fe-1255-47a7-a2af-5f3a069daaa2 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN2PR15MB1085 X-OriginatorOrg: fb.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-01-30_06:,, signatures=0 X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 30, 2018 at 09:54:45AM +0100, Michal Hocko wrote: > On Mon 29-01-18 11:11:39, Tejun Heo wrote: Hello, Michal! > diff --git a/Documentation/cgroup-v2.txt b/Documentation/cgroup-v2.txt > index 2eaed1e2243d..67bdf19f8e5b 100644 > --- a/Documentation/cgroup-v2.txt > +++ b/Documentation/cgroup-v2.txt > @@ -1291,8 +1291,14 @@ This affects both system- and cgroup-wide OOMs. For a cgroup-wide OOM > the memory controller considers only cgroups belonging to the sub-tree > of the OOM'ing cgroup. > > -The root cgroup is treated as a leaf memory cgroup, so it's compared > -with other leaf memory cgroups and cgroups with oom_group option set. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ IMO, this statement is important. Isn't it? > +Leaf cgroups are compared based on their cumulative memory usage. The > +root cgroup is treated as a leaf memory cgroup as well, so it's > +compared with other leaf memory cgroups. Due to internal implementation > +restrictions the size of the root cgroup is a cumulative sum of > +oom_badness of all its tasks (in other words oom_score_adj of each task > +is obeyed). Relying on oom_score_adj (appart from OOM_SCORE_ADJ_MIN) > +can lead to overestimating of the root cgroup consumption and it is Hm, and underestimating too. Also OOM_SCORE_ADJ_MIN isn't any different in this case. Say, all tasks except a small one have OOM_SCORE_ADJ set to -999, this means the root croup has extremely low chances to be elected. > +therefore discouraged. This might change in the future, though. Other than that looks very good to me. Thank you!