Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp4245553imm; Mon, 30 Jul 2018 11:03:02 -0700 (PDT) X-Google-Smtp-Source: AAOMgpe0nbp+T76m9qG7BHEbYvzmsVZqoIjTkZzcqfxg24ugXn/T84oPNLEZIIMNKKfo3zBXqZjH X-Received: by 2002:a63:1126:: with SMTP id g38-v6mr17118728pgl.122.1532973782190; Mon, 30 Jul 2018 11:03:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532973782; cv=none; d=google.com; s=arc-20160816; b=vWnc4VPBa28PTiwUPP6dhwVFfdKFcUFJdmr8Ct9UBQ8Hq2pxIteGV5zy5fvmegtryx IxCUeYJJ+4LmNvbQv5AA3llpvEitx6V+X5RAfF7xA7cm6zGT5oCclyL4wFAKcXvblpwr 4LfwylQRmaEPE3H3+of+O3xEa/qRQ5o4fjLC+AiBdVwP+7+QLUfzHtISgn/vX9dWupNz ek6tQSjUKWdntic51m7ftGnu7oBPXT+YqnRUdMsr6HbZFBXVQlWW0tZioicOcfe/ERjT zUJbIBXV5o6q2OdhBub0FpfHVMvE4eoYB6VmJLNAzpwKSF5hYubfjIv/UOWPL0T7ZUMH /hjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:message-id:date:subject:cc:to :from:dkim-signature:dkim-signature:arc-authentication-results; bh=i/YBD9nfD/U1z2eE1+nNM+iv0evZ0/9HS1+xSWnCDxE=; b=gI2X9qugH2Z+EpQVmg66FXNawzJtzxAEKyLMaVzMAP4ZSkjLqKIzmpZwCtTGiSIO+w OA94HvwjgRMZPzz0dV+1/6wGDJWYMyyt8PaAPgcEEB79YnFzrtKjNAelJpECEGG87f/3 RuEeBQBxaq/jtejMh3dUx9v7AD5Ri8PkYgLEsDR0ktYwQTNvYFMe4PCykno+bgxUHxCa uOQirbSiyge99pI7NVN1pGlfPSwJxh3yMRIfN7+hdacBLs30sx7yqNbh93K2cBEo9dM8 +2hQYkJNqGlpSFJFGTkYztCe5joibiJjHfoIrWRP2pCOVBGInxLzYCn6jYGmwrbWVcSy 3Hew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fb.com header.s=facebook header.b=jFmAvGrj; dkim=pass header.i=@fb.onmicrosoft.com header.s=selector1-fb-com header.b="X2Pg7/yW"; 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 l18-v6si11110781pgi.249.2018.07.30.11.02.47; Mon, 30 Jul 2018 11:03:02 -0700 (PDT) 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=jFmAvGrj; dkim=pass header.i=@fb.onmicrosoft.com header.s=selector1-fb-com header.b="X2Pg7/yW"; 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 S1731914AbeG3Thw (ORCPT + 99 others); Mon, 30 Jul 2018 15:37:52 -0400 Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:33520 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730671AbeG3Thv (ORCPT ); Mon, 30 Jul 2018 15:37:51 -0400 Received: from pps.filterd (m0044008.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w6UHoagT020874; Mon, 30 Jul 2018 11:01:31 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=facebook; bh=i/YBD9nfD/U1z2eE1+nNM+iv0evZ0/9HS1+xSWnCDxE=; b=jFmAvGrjiHFKEP5KNBE9SoDL1KPNkNz+5AdvYsh8K2Mf6JjSI1uuxr/NMrzNEpEj6jIF sfcJZ4rg6vQ2Emg0myr8KsLk5ADpfYYtwv8csvKwqC2tcfXzAPJ6e9sipdjzhevIfHDt wR45zk+lZkQi1ATk47IcN/HWij0WGPY4Ses= Received: from mail.thefacebook.com ([199.201.64.23]) by mx0a-00082601.pphosted.com with ESMTP id 2kj4sgrhwm-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 30 Jul 2018 11:01:30 -0700 Received: from NAM01-BN3-obe.outbound.protection.outlook.com (192.168.54.28) by o365-in.thefacebook.com (192.168.16.14) with Microsoft SMTP Server (TLS) id 14.3.361.1; Mon, 30 Jul 2018 11:01:27 -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=i/YBD9nfD/U1z2eE1+nNM+iv0evZ0/9HS1+xSWnCDxE=; b=X2Pg7/yWxGXmttMHNj9/C8BZfgXRRQIRLBQdIReXriKVMeodKR60oQDhgl1z3gZwmW+oBWwSpWPkClkAMrfL3fLfVeLYXs6weKWRFFEkk7BL4s7Lg1AdNxQGgvk3erxQK6kWaHwVPdnzBKldHIApWcPb4Y3U7yhfQK9jCqjuhds= Received: from castle.thefacebook.com (2620:10d:c090:200::6:484b) by SN1PR15MB0175.namprd15.prod.outlook.com (2a01:111:e400:58cf::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.995.21; Mon, 30 Jul 2018 18:01:22 +0000 From: Roman Gushchin To: CC: Michal Hocko , Johannes Weiner , David Rientjes , Tetsuo Handa , Tejun Heo , , , Roman Gushchin Subject: [PATCH 0/3] introduce memory.oom.group Date: Mon, 30 Jul 2018 11:00:57 -0700 Message-ID: <20180730180100.25079-1-guro@fb.com> X-Mailer: git-send-email 2.14.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [2620:10d:c090:200::6:484b] X-ClientProxiedBy: MWHPR15CA0060.namprd15.prod.outlook.com (2603:10b6:301:4c::22) To SN1PR15MB0175.namprd15.prod.outlook.com (2a01:111:e400:58cf::14) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ea4e6ebd-abd8-45b2-09e5-08d5f64676ae X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989117)(5600074)(711020)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(2017052603328)(7153060)(7193020);SRVR:SN1PR15MB0175; X-Microsoft-Exchange-Diagnostics: 1;SN1PR15MB0175;3:6YEC7Dy6e1I9M46dYXB9JnNLx0vg3dGBf+F6byQCP+qRpGto0cskkxTY81lrpOHSPrJU/H90M4rypQVhflc2gFGx9nabLt882FC10zGVqf0SfJOMURJ4RkL18jWA1TtCKJl/HB/KDq0iGnTXFthPJsHDbLNF3anUULarKkq1jlbMsp5s4+YxJB7axouqGcrlpkGiqZE8R26bsT64DYnze0t3tNChMBC8GXOTgytFm1S0UxcBb3RircqnN11SyPiY;25:ch0ZypEX0NQR25VhJiME8mNElz6ah1wmrNOBmgT5yNAak8gboRPlNPdg9qyYlAq4NQvdGlvdiV/mPtD4GT6rPuhof9t8nwoHX3+5/bzWXfjmchCA04pzZboY/Fa+G5RsLhIQLxP7SdvRSzAnT4mYAI8X65kdl8cVNw5hlH/EC0n1LnJm2zrzKjDpP7u9WfrvRPzTWLECAGcUpkZ6y2w+WV2YPPX2HU5ib+4bnci5DbT/2Wu1wDUOg8zPWuem31Qo+8L081FG6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fRuGoeWF5ZbHnPU6MEaBDm2hKzimtLrZTpWfgF2uUCnVTqW0kJEhil7U1lF1U8kS9C2H2Zy9efQKUV4mLiF1w83YUXRe6z8Alm79+MAHcHidUg== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231311)(11241501184)(944501410)(52105095)(93006095)(93001095)(10201501046)(3002001)(149027)(150027)(6041310)(20161123558120)(20161123562045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(6072148)(201708071742011)(7699016);SRVR:SN1PR15MB0175;BCL:0;PCL:0;RULEID:;SRVR:SN1PR15MB0175; X-Forefront-PRVS: 0749DC2CE6 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(346002)(396003)(39860400002)(376002)(366004)(136003)(189003)(199004)(36756003)(6116002)(8676002)(6486002)(16526019)(6506007)(386003)(186003)(1076002)(86362001)(69596002)(52116002)(51416003)(52396003)(81156014)(106356001)(2351001)(105586002)(97736004)(8936002)(81166006)(305945005)(7736002)(53936002)(6666003)(50226002)(25786009)(53416004)(478600001)(6512007)(5660300001)(2906002)(6916009)(54906003)(2361001)(16586007)(316002)(48376002)(50466002)(47776003)(476003)(4326008)(46003)(68736007)(2616005)(486006)(42262002);DIR:OUT;SFP:1102;SCL:1;SRVR:SN1PR15MB0175;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;SN1PR15MB0175;23:LYZA9cUN4nEmdSSKnfPhwsywtUT98xIWnwRpBqIWl?= =?us-ascii?Q?5HQ8sItubP0gTwpRiq5QcG1z89ju/+UhXjoPsMt7kxTWZmEOlwpN69GWqnCd?= =?us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W634yjpjFbdjyz3kjAk3+SWABuTCYkJQnL8?= =?us-ascii?Q?MfXA5S/hhYnAiNeYDhY0V6Z9ZEyhNcy+sB0iVjredt2FwyrwoBGGyDEF0mbt?= =?us-ascii?Q?2Tc2KHCix0TgYwmtzw+uED198qQuC67ng4NGKHpivGhzr55C5FA1L2dx8tDR?= =?us-ascii?Q?lce9N4urojkTOhsFBGCBosjVUKreY/13vKAqD0jj1e8V9oTN63CcfnwoqmHn?= =?us-ascii?Q?Zoqbt4mHBqawGocgw/90xd2YmRe5mqz5ZRvrhZjIx+hjUvOniUnCgJtig=3D?= =?us-ascii?Q?=3D?= X-Microsoft-Antispam-Message-Info: 3YN2FwBT9MxcmCtDltIRySMvJfDpxMfvTp++023aVmAusBZDrZujZaRb/Md83pmVm4o1/oCmDkmLusJHX62T36LdLPEYcWjhRGuwyI7kin7gusacC9k/4glibF81/x9lPsYZudtod4zbeeHeBN4jzRZLjCkBzScgteCz4lto2m/xnvwy8vSubw5u6xH/IHsHv+BFQ7Nouslu1UIJQNlEIj1e7aoIPF1+GjfPHVb6DIqUt5z+W8iPkHw0+c1IJaO6nPDqx0lzAbrz+gYSw2sYsPGd2alQrYtDyig2aLtZpvjPjT2BZzJiEQVV40kOLN54bRxeWv+9CVxaKmFBHHsfTpg+qSUvmLoZ2UlI4pFuORU= X-Microsoft-Exchange-Diagnostics: 1;SN1PR15MB0175;6:azZaDc2EHoxEgPIftw7OVQsPaw7QU2J2kwFUtQgehXLqCdd1Nkj4iC8et+RecLVCGPrPJIyPxjFuVrfGFqQKxjUue7J3NdqCEMIYK4REeUYOPtrvUfqNxWQHD8IKS6EyD7s8YtQtO2fpIFeirVrSP1FmnK6GdwLMbShE5ZV8WsUvG3O41qYq/xzVKEXTY4bX6jMqQtkfaIS+bbco2VYGqRdBuvi4Mp1SEVZhn0ydyZBt1DrrL9rVJgwYPNKersX85YuLoQQ8IAYXTSVRWO3o24Ypnl5lrSEY+C+5UQiffwqNcGzdmN0vicq1qs3EYLGFlMpHhwbuvMP8AeJOJF0IvxSKQEixu8g9LlD5AI9ulkX0Gq0uW2Iov1V2Xlsypfgsrnppae7SuDZxQu4yr5PPthfjrDSfvEPRPWHvV/PhH0Inh6McgU49UMt4PikU2wEPPsTp1EeIqS550t5GudYQlQ==;5:BO9Hn1/Jd/52iQ8Z5v6jLLJN+TSQlKG0OJOHe3lQjV4LRSsJhwz26Qktq4WLYCUGiJ7xDPdg6nD6b5O5RG/cKhuC7vsQ40AJdMHcWqyNd+8AOmaorgV9qfIv4+DwAB7JbhhlN4f6aTh8K9noE6OGozBc/+xzn7pqNhxFZ3clLhw=;7:5yrL3RsRB1eOvfFH+JHGfrBg7lqFcydZOlSerlnPgAoZzmXmDUSj77FaersNz0UO64tcUMYp38glUjI3cBdA6APOa9WSQeFbx9rXRfx7VvKN1vCQHVdYztbz4tPY8rP9/jHpDaJsYsZwjOu8jhDUAMwtuAYuDPgFniFZy9i04DN3/vYtpglr+QPjdoTKj9lD6B9yS+y3Ws16hQujQBuwSxderEjNRuuEeyPu6gBpRqQifAP7dRQdR3UOyJMrUXxx SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;SN1PR15MB0175;20:xtQ4wRnG2TDkb6QsI6UK5Qv867e2ozJPJJAURFQHAFpR4KRp0HBKqILC2+nBGyjXA+qC3LiK7eo5x+gKy23qePWHAZv2TUHC78BBVkWZql2mCxm9XdemvhVBODaaIAl26QogGFNXmCnfZ9Grt6Xy8jJLDndwNoh+UODxnQ7eMoc= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jul 2018 18:01:22.3068 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ea4e6ebd-abd8-45b2-09e5-08d5f64676ae X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8ae927fe-1255-47a7-a2af-5f3a069daaa2 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR15MB0175 X-OriginatorOrg: fb.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-07-30_08:,, 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 This is a tiny implementation of cgroup-aware OOM killer, which adds an ability to kill a cgroup as a single unit and so guarantee the integrity of the workload. Although it has only a limited functionality in comparison to what now resides in the mm tree (it doesn't change the victim task selection algorithm, doesn't look at memory stas on cgroup level, etc), it's also much simpler and more straightforward. So, hopefully, we can avoid having long debates here, as we had with the full implementation. As it doesn't prevent any futher development, and implements an useful and complete feature, it looks as a sane way forward. This patchset is against Linus's tree to avoid conflicts with the cgroup-aware OOM killer patchset in the mm tree. Two first patches are already in the mm tree. The first one ("mm: introduce mem_cgroup_put() helper") is totally fine, and the second's commit message has to be changed to reflect that it's not a part of old patchset anymore. Roman Gushchin (3): mm: introduce mem_cgroup_put() helper mm, oom: refactor oom_kill_process() mm, oom: introduce memory.oom.group Documentation/admin-guide/cgroup-v2.rst | 16 ++++ include/linux/memcontrol.h | 22 +++++ mm/memcontrol.c | 84 ++++++++++++++++++ mm/oom_kill.c | 152 ++++++++++++++++++++------------ 4 files changed, 216 insertions(+), 58 deletions(-) -- 2.14.4