Received: by 10.223.148.5 with SMTP id 5csp5977997wrq; Wed, 17 Jan 2018 08:01:20 -0800 (PST) X-Google-Smtp-Source: ACJfBov57U5iBKVtzDe8bDKd817louatE86qR4ND72yb/l4BluM2gJ0XujRDPNJN4Zbyr2BpnTgz X-Received: by 10.84.215.142 with SMTP id l14mr2447154pli.27.1516204880504; Wed, 17 Jan 2018 08:01:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516204880; cv=none; d=google.com; s=arc-20160816; b=qjPxO4HUVBRz1zcjrNUfFa9IA8ZLzCx2/BU1IsWEGn8mummOc+5NIDVtopsq2/GK7n bCNsO8pkcF3ZDZhamYo6/v8OHC/1EkTwOaTPupAYs7p30eMXRoDABMlgkbp8MaWowZNT GX+rlMGAPl9RmcsbrEYaI3MkqSsEpP7PunhhKEm1bLvvSvoTPkjYCXKgNO0vjmP+8p4b KI8S9ScKCL+dly/s/Kv4AxMt141nPbXmNIrUSJwkCGP0ofMFbfRel+sDXh1CcE9BCYCb lMYswYcseaRdaL22FmOXCPyszQjKLg6OUhhQnxW89bidWPDQ9io5LyKSvUoITcTEcz6Q RSuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=mhvWqJbce+CozCoEabLPF1eNr2gdWoClN7OfrVAp6wQ=; b=vruKnmS1HuWTouh3abLvw9JVJIIz0Rtwjz/licpVy2r2L4sVhd1NWgprSkBwLPPh8E GcXzvlneBIybCTFQPKZhoV1MnhDfQpSwRfQTxbc3n0jglgnGbyMz4naipo/AZlhUrn4A Q6p2ayB80iEVEvlF7O142KrRk91nJt0GoZi1PtUqO2ihztV9A/++SVQ0R7nyJiEUG5ES ygYvZVn47WLvnY9eLs2XeGt1fMo0aPhemKIt4Id81lnIjQtzbSItGUH5p6g2UDXqd/a2 ZiQ9wShV7/CfRqo9KWgtvw2oUIoqsDqbztS8B91LqfvMF+5SeHQWl7x42dMkDKR6CLPA dT/A== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k192si4124080pgc.299.2018.01.17.08.00.59; Wed, 17 Jan 2018 08:01:20 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753699AbeAQQAK (ORCPT + 99 others); Wed, 17 Jan 2018 11:00:10 -0500 Received: from mx2.suse.de ([195.135.220.15]:55008 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753397AbeAQQAI (ORCPT ); Wed, 17 Jan 2018 11:00:08 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 6C452ADF4; Wed, 17 Jan 2018 16:00:06 +0000 (UTC) Date: Wed, 17 Jan 2018 17:00:04 +0100 From: Michal Hocko To: David Rientjes , Tejun Heo Cc: Andrew Morton , Roman Gushchin , Vladimir Davydov , Johannes Weiner , Tetsuo Handa , kernel-team@fb.com, cgroups@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [patch -mm 3/4] mm, memcg: replace memory.oom_group with policy tunable Message-ID: <20180117160004.GH2900@dhcp22.suse.cz> References: <20180117154155.GU3460072@devbig577.frc2.facebook.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180117154155.GU3460072@devbig577.frc2.facebook.com> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 17-01-18 07:41:55, Tejun Heo wrote: > Hello, David. > > On Tue, Jan 16, 2018 at 06:15:08PM -0800, David Rientjes wrote: > > The behavior of killing an entire indivisible memory consumer, enabled > > by memory.oom_group, is an oom policy itself. It specifies that all > > I thought we discussed this before but maybe I'm misremembering. > There are two parts to the OOM policy. One is victim selection, the > other is the action to take thereafter. Yes we have. Multiple times! The last time I've said the very same thing was yesterday http://lkml.kernel.org/r/20180116220907.GD17351@dhcp22.suse.cz > The two are different and conflating the two don't work too well. For > example, please consider what should be given to the delegatee when > delegating a subtree, which often is a good excercise when designing > these APIs. Absolutely agreed! And moreover, there are not all that many ways what to do as an action. You just kill a logical entity - be it a process or a logical group of processes. But you have way too many policies how to select that entity. Do you want to chose the youngest process/group because all the older ones have been computing real stuff and you would lose days of your cpu time? Or should those who pay more should be protected (aka give them static priorities), or you name it... I am sorry, I still didn't grasp the full semantic of the proposed soluton but the mere fact it is starting by conflating selection and the action is a no go and a wrong API. This is why I've said that what you (David) outlined yesterday is probably going to suffer from a much longer discussion and most likely to be not acceptable. Your patchset proves me correct... -- Michal Hocko SUSE Labs