Received: by 10.213.65.68 with SMTP id h4csp65309imn; Mon, 12 Mar 2018 17:59:44 -0700 (PDT) X-Google-Smtp-Source: AG47ELtNNPIp0jmqumqPnHR3L+37QfBWpmzzjTVObP1kBdxhF4+CA+MuoENti4DDCd/cppcpD2fJ X-Received: by 10.99.173.71 with SMTP id y7mr8089107pgo.432.1520902784572; Mon, 12 Mar 2018 17:59:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520902784; cv=none; d=google.com; s=arc-20160816; b=PiqX3cC7HcVCUjK4+JMO5GY/f++Kml18Y8VpLmRMAsiuxLEkqBi7pHlZ8vznSNb3De /sZ1E9RQmRnBn7OdnX43fV5+dYrO44z0WOm0c0KwUgXS/rd2EjnmZk4QQVxYgQfDIYkl eWLbsM41FXG0Rf30imuJL40hEs720XcV9NOzdETnTsuLtsWkOr8Qn+8NcWwLiFPezF2P l+JD21SZidKz8BxzFOAXBeaQuNBPmaEAtSJ2pNTmAmY/bOCTSjVh7ypLkhzipbab6n9J K0NjXnOPue8JsSg6bqmBA4GSQPC2tx20AqEzXT6pBY79Iq0di0VAXkchfYifZfVRl1bx BQbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :subject:cc:to:from:date:dkim-signature:arc-authentication-results; bh=xw8WJdddWeO8YbPgxrQM4cYlVvL2X56t9I7GdnKa0BA=; b=aFVTmrEGqXwHftU8Xj0pZH26PUEXJXopowQtz4gT4AM1bfrFOpvEW5THLGOerkGoaF XVWVTG19vJk/V7Hbf5St21WZV2w5+zccs0ElIoj+hmi+hpgny6+XrKkofo6YXIZPCFg2 qX0d/4GPwY8ReOjy+xWoZ6F/0zuYOU8VGI63wzo/afZEwZVZRrUUhiKq5ajYpjQEfGzY 6bUZj+HcBERYA4i5W5INz5xDUT5C4QSyT8YzmhkJQ2AzqLj4g3UW0POF+E320qYQwT+2 YPR4wIS7juWJd9LOYJzu+LsQ4yA4cOjob5x+ivF3HfXiWCGhvkJqbU37olCLYr+3nzaG HzFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=b5kZVtpj; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m17si6501599pfh.319.2018.03.12.17.59.30; Mon, 12 Mar 2018 17:59:44 -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=@google.com header.s=20161025 header.b=b5kZVtpj; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932282AbeCMA5z (ORCPT + 99 others); Mon, 12 Mar 2018 20:57:55 -0400 Received: from mail-pl0-f67.google.com ([209.85.160.67]:41978 "EHLO mail-pl0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751390AbeCMA5y (ORCPT ); Mon, 12 Mar 2018 20:57:54 -0400 Received: by mail-pl0-f67.google.com with SMTP id d9-v6so10362834plo.8 for ; Mon, 12 Mar 2018 17:57:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:user-agent:mime-version; bh=xw8WJdddWeO8YbPgxrQM4cYlVvL2X56t9I7GdnKa0BA=; b=b5kZVtpjnxIWYMk46akW6T2YbSXIiF8wyHULgKZS0ZqLfCv+vV9HGO5mElWzEptFL4 dUiNF0JcpNMBnHVf5I3ewnhZB+IO4llWY6RxpMaY4VWUjkbgUjeEveu+NdeR10UESkKE N9f7gt3X6ad5gQuB/MkroZfkxxDc4zX8shb/Obwrto9MTXrviLNiflwB0FGcDEwfcT6e n4G86UA9TMOrblxXugsLSNyjAAO9TqgIY/33A33UC/DFNDElmUZWty2cfqMZuvfHrnde OSXCHaW9tYZ4XgXbC9LdvSpX9pijbpU6qIUrwrqe4YqNX//3MRNFiTNdLX4g4bC4LaWF wesA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:user-agent :mime-version; bh=xw8WJdddWeO8YbPgxrQM4cYlVvL2X56t9I7GdnKa0BA=; b=N4D7/otKWCQ+n1OT6YuyV2NGrhMnJbDGGnaR82AJlis+u9RYGRngiuV+PPUBPDFRbZ md+n9gk8X1SQV3RT119wYz7m7zi7lZU2mSerh50HcpWPGkB1AdRb1+7UAGfvDNZpCPs2 8y0UnxgdCqAvb4GD1cJ6qHQoH/zX57TcfOaE7GPWl/YAG1NoxODeBaqMk2AaGtt2RVwF ItmmuPiYSAF0dRzES9YzNOKfK4RkUGz6Bp5VNh9gpIXHS4z6pQ2nOg01R1ve6pJlqxAX hNlecFHIJigTSkE+JN2CJplvxDhC0wKFTVcAgPGfIieXFZ9uXtfQLvQzGM74ufcp2BEt fZcQ== X-Gm-Message-State: AElRT7Gjj+Phka7QJOQZe/BGwjDmluK1dwPGLBmNrdh4kvkk6Q6fBMQr mRZQRarCvygQRzwdAOUk+yoHww== X-Received: by 2002:a17:902:5609:: with SMTP id h9-v6mr9944537pli.302.1520902673168; Mon, 12 Mar 2018 17:57:53 -0700 (PDT) Received: from [2620:15c:17:3:3a5:23a7:5e32:4598] ([2620:15c:17:3:3a5:23a7:5e32:4598]) by smtp.gmail.com with ESMTPSA id b9sm20159323pff.13.2018.03.12.17.57.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Mar 2018 17:57:52 -0700 (PDT) Date: Mon, 12 Mar 2018 17:57:51 -0700 (PDT) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Andrew Morton , Roman Gushchin cc: Michal Hocko , Vladimir Davydov , Johannes Weiner , Tejun Heo , cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: [patch -mm v3 0/3] mm, memcg: introduce oom policies Message-ID: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There are three significant concerns about the cgroup aware oom killer as it is implemented in -mm: (1) allows users to evade the oom killer by creating subcontainers or using other controllers since scoring is done per cgroup and not hierarchically, (2) unfairly compares the root mem cgroup using completely different criteria than leaf mem cgroups and allows wildly inaccurate results if oom_score_adj is used, and (3) does not allow the user to influence the decisionmaking, such that important subtrees cannot be preferred or biased. This patchset aims to fix (1) completely and, by doing so, introduces a completely extensible user interface that can be expanded in the future. It preserves all functionality that currently exists in -mm and extends it to be generally useful outside of very specialized usecases. It eliminates the mount option for the cgroup aware oom killer entirely since it is now enabled through the root mem cgroup's oom policy. --- v3: - updated documentation - rebased to next-20180309 Documentation/cgroup-v2.txt | 90 ++++++++++++++++++++++++------------- include/linux/cgroup-defs.h | 5 --- include/linux/memcontrol.h | 21 +++++++++ kernel/cgroup/cgroup.c | 13 +----- mm/memcontrol.c | 64 +++++++++++++++++++++----- 5 files changed, 132 insertions(+), 61 deletions(-)