From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752127AbdIFImu (ORCPT ); Wed, 6 Sep 2017 04:42:50 -0400 Received: from mx2.suse.de ([195.135.220.15]:52612 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750832AbdIFImq (ORCPT ); Wed, 6 Sep 2017 04:42:46 -0400 Date: Wed, 6 Sep 2017 10:42:42 +0200 From: Michal Hocko To: Roman Gushchin Cc: linux-mm@kvack.org, Vladimir Davydov , Johannes Weiner , Tetsuo Handa , David Rientjes , Andrew Morton , Tejun Heo , kernel-team@fb.com, cgroups@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [v7 5/5] mm, oom: cgroup v2 mount option to disable cgroup-aware OOM killer Message-ID: <20170906084242.l4rcx6n3hdzxvil6@dhcp22.suse.cz> References: <20170904142108.7165-1-guro@fb.com> <20170904142108.7165-6-guro@fb.com> <20170905134412.qdvqcfhvbdzmarna@dhcp22.suse.cz> <20170905143021.GA28599@castle.dhcp.TheFacebook.com> <20170905151251.luh4wogjd3msfqgf@dhcp22.suse.cz> <20170905191609.GA19687@castle.dhcp.TheFacebook.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170905191609.GA19687@castle.dhcp.TheFacebook.com> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 05-09-17 20:16:09, Roman Gushchin wrote: > On Tue, Sep 05, 2017 at 05:12:51PM +0200, Michal Hocko wrote: [...] > > > Then we should probably hide corresponding > > > cgroup interface (oom_group and oom_priority knobs) by default, > > > and it feels as unnecessary complication and is overall against > > > cgroup v2 interface design. > > > > Why. If we care enough, we could simply return EINVAL when those knobs > > are written while the corresponding strategy is not used. > > It doesn't look as a nice default interface. I do not have a strong opinion on this. A printk_once could explain why the knob is ignored and instruct the admin how to enable the feature completely. > > > > I think we should instead go with > > > > oom_strategy=[alloc_task,biggest_task,cgroup] > > > > > > It would be a really nice interface; although I've no idea how to implement it: > > > "alloc_task" is an existing sysctl, which we have to preserve; > > > > I would argue that we should simply deprecate and later drop the sysctl. > > I _strongly_ suspect anybody is using this. If yes it is not that hard > > to change the kernel command like rather than select the sysctl. > > I agree. And if so, why do we need a new interface for an useless feature? Well, I won't be opposed just deprecating the sysfs and only add a "real" kill-allocate strategy if somebody explicitly asks for it. -- Michal Hocko SUSE Labs