From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751290AbdH1UyZ (ORCPT ); Mon, 28 Aug 2017 16:54:25 -0400 Received: from mail-pg0-f47.google.com ([74.125.83.47]:33451 "EHLO mail-pg0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751221AbdH1UyW (ORCPT ); Mon, 28 Aug 2017 16:54:22 -0400 X-Google-Smtp-Source: ADKCNb7sSH3yoeBHYh8tewxc52bB50vrl9/DRcEUVolPxXN0LwGhs+L0GoflnWQEQwg64Yd4KF7qXA== Date: Mon, 28 Aug 2017 13:54:20 -0700 (PDT) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Roman Gushchin cc: Michal Hocko , linux-mm@kvack.org, Vladimir Davydov , Johannes Weiner , Tetsuo Handa , Tejun Heo , kernel-team@fb.com, cgroups@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [v6 3/4] mm, oom: introduce oom_priority for memory cgroups In-Reply-To: <20170824141108.GB21167@castle.DHCP.thefacebook.com> Message-ID: References: <20170823165201.24086-1-guro@fb.com> <20170823165201.24086-4-guro@fb.com> <20170824121054.GI5943@dhcp22.suse.cz> <20170824125113.GB15916@castle.DHCP.thefacebook.com> <20170824134859.GO5943@dhcp22.suse.cz> <20170824141108.GB21167@castle.DHCP.thefacebook.com> User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) 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 On Thu, 24 Aug 2017, Roman Gushchin wrote: > > > Do you have an example, which can't be effectively handled by an approach > > > I'm suggesting? > > > > No, I do not have any which would be _explicitly_ requested but I do > > envision new requirements will emerge. The most probable one would be > > kill the youngest container because that would imply the least amount of > > work wasted. > > I agree, this a nice feature. It can be implemented in userspace > by setting oom_priority. > Yes, the "kill the newest memory cgroup as a tiebreak" is not strictly required in the kernel and no cgroup should depend on this implementation detail to avoid being killed if it shares the same memory.oom_priority as another cgroup. As you mention, it can be effectively implemented by userspace itself.