From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751549AbeCPVIu (ORCPT ); Fri, 16 Mar 2018 17:08:50 -0400 Received: from mail-pl0-f67.google.com ([209.85.160.67]:33492 "EHLO mail-pl0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751454AbeCPVIs (ORCPT ); Fri, 16 Mar 2018 17:08:48 -0400 X-Google-Smtp-Source: AG47ELuSbLtPkGOYFZvBl4RuuZ0Mv6MxEWlFr0lfsclKQwEVI0G2UaCzMGKWVq/liImmsjPwGnKbRw== Date: Fri, 16 Mar 2018 14:08:45 -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 0/6] rewrite cgroup aware oom killer for general use In-Reply-To: Message-ID: References: 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 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 fixes (1) and (2) completely and, by doing so, introduces a completely extensible user interface that can be expanded in the future. Concern (3) could subsequently be addressed either before or after the cgroup-aware oom killer feature is merged. 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. --- - Rebased to next-20180305 - Fixed issue where total_sock_pages was not being modified - Changed output of memory.oom_policy to show all available policies Documentation/cgroup-v2.txt | 100 ++++++++-------- include/linux/cgroup-defs.h | 5 - include/linux/memcontrol.h | 21 ++++ kernel/cgroup/cgroup.c | 13 +-- mm/memcontrol.c | 221 +++++++++++++++++++++--------------- 5 files changed, 204 insertions(+), 156 deletions(-)