Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp6343090imm; Mon, 23 Jul 2018 16:24:02 -0700 (PDT) X-Google-Smtp-Source: AAOMgpepCqf1a+RbFuRS31WhZo5BVY4F+f+L9ENSIzqOW5skEaIwAYX/iE7HCDseYoyYZw5DIli3 X-Received: by 2002:a65:4d05:: with SMTP id i5-v6mr13789993pgt.58.1532388242823; Mon, 23 Jul 2018 16:24:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532388242; cv=none; d=google.com; s=arc-20160816; b=ubQD8BofDoBUkcQclJUhYdjQV2IquywRS2sFmoPVfKb8RXgM6Ytei/uUINh1Vn/G5Z VZNEEt3rZ8a8Rfs93vfoZ47ofQYz+uzm2w4VH916IKqQge0imdL3XYobgcYz/OcqgzyX zDY3UZ5SO5FwzALJi08LUVeGIjx6lLfDeRPPxSi2oTN9rR9mkHQZoFjHOaiQ5GYUUmNc ZWZE04iVMZaMlPvfQVpssqiHDab0/0RqGuhY6Nrar38vlWegWOR4lL1ntspvFG9VmRLc KMHe8tiMiM0ayqAe31hOTUkda3OvsidjuJVQyfn0kbUMNCb731iRpKub+SEX72IxyXxX jh+Q== 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:references :message-id:in-reply-to:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=54Ue/XfEnu8lGpzmGDRsShB9nSz4Ha2CkuH2Vg11PhA=; b=TbVNkrq75ZnKonrYaMIFu01Oy20766+3aPai0C4Q6FCscjb7AAAVK0UIfUBgRFRnNE lWKsfkr7cuG7v1zKI/7Vknt2D/tzue6UrjElynmXZeNbMAmZRbu84gnHkST0u6i9Rtxv X164DPj8cseotZeWgdK3i8s/pR7V1U21fi5ERMk4+J6XZob3DmHZi4eUcDQVbkjM/juc 2A5g/Lny/B8YVc9h9SKbbqXKc3tF5q3DCzA7LLaNTZmur9YkkZyjs9pE21IAOj2tUjGu mXS6WXh38+L+8Zygc0tzehqCRc+YWE9xkJ8zi1g/h8xI980zKGvoHvztD3122Kr4zxd6 mZBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="UF9Og/j9"; 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 o20-v6si9722789pgh.319.2018.07.23.16.23.48; Mon, 23 Jul 2018 16:24:02 -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="UF9Og/j9"; 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 S2388175AbeGXAZk (ORCPT + 99 others); Mon, 23 Jul 2018 20:25:40 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:33037 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388085AbeGXAZk (ORCPT ); Mon, 23 Jul 2018 20:25:40 -0400 Received: by mail-pg1-f195.google.com with SMTP id r5-v6so1449924pgv.0 for ; Mon, 23 Jul 2018 16:22:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=54Ue/XfEnu8lGpzmGDRsShB9nSz4Ha2CkuH2Vg11PhA=; b=UF9Og/j9Y+tPmUMSIE2n6jH/9doiUNHZmaNsK5YTf5EujLtH5DWOygQsEVhXTaP3NG 2wwuHOpfeDXgBKAqzxScYiZNVX9C+olwmI+UDjC4S9Q9dc5l3IiZOBIxGpH0zIsbO6Ze b3YTfwu6sdc6QEfe8EQqHVyWBoXzgTAM2BP5O9EXHpRHC+lsF7d865mR+i0p7rIjePQw pO+kb+efp7R/b3jjMJ+AY9+QS8bDl7qlpSrllaeyKttkrgW/ZklJubs/EVKuHGAXlRse 6wVHeATh3q6+8J+8ZgK8c9A0Ldbmgyv5fM184yz7WPtlxofJVX+iHPia0SbHmn8FS8pH 9Xsg== 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:in-reply-to:message-id :references:user-agent:mime-version; bh=54Ue/XfEnu8lGpzmGDRsShB9nSz4Ha2CkuH2Vg11PhA=; b=fW+vXBox5butAOygc6SjCc7R1sqje/oZKtPKqgbjob6f7t4jmaUm4sxdSvQ3r/7nku AFT0+0P4AT/fhQStopaIsRz950i43x9ehy+CQK00CNXvOugOwOBIQVurBPQoq8WlB+07 BNaXo3TAA+X+1y4WMJ7Hgl+LGL5oa2df2JGhpbH5VD4jW1mu6pjw7xS7lnoZmCyaiNZi k32ADv2BM7fAZW24e8cpiVIfK9cmx2/vlBwrWSzDX0YjPDy6ReluKMyx2XAhqLdAO6Ar rR/sPO6We3CFkTylz+Q+0siNd9v+0TSwlSsr3EuNfadfUllgpNBUSbWfGIL+6v7yPvBN c4JA== X-Gm-Message-State: AOUpUlHz8N2yRmMCU05160QUSmRp9CAMe4o6GF6Ej3c8wUNUNz2ot0vX bAmo2VYFaGnfVrDw5/K+ecJrbA== X-Received: by 2002:a63:943:: with SMTP id 64-v6mr13762858pgj.368.1532388127409; Mon, 23 Jul 2018 16:22:07 -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 e8-v6sm13870011pgi.24.2018.07.23.16.22.06 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 23 Jul 2018 16:22:06 -0700 (PDT) Date: Mon, 23 Jul 2018 16:22:06 -0700 (PDT) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Roman Gushchin cc: Andrew Morton , Michal Hocko , Vladimir Davydov , Johannes Weiner , Tejun Heo , cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [patch v3 -mm 3/6] mm, memcg: add hierarchical usage oom policy In-Reply-To: <20180723212855.GA25062@castle> Message-ID: References: <20180716181613.GA28327@castle> <20180723212855.GA25062@castle> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) 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 On Mon, 23 Jul 2018, Roman Gushchin wrote: > > Roman, I'm trying to make progress so that the cgroup aware oom killer is > > in a state that it can be merged. Would you prefer a second tunable here > > to specify a cgroup's points includes memory from its subtree? > > Hi, David! > > It's hard to tell, because I don't have a clear picture of what you're > suggesting now. Each patch specifies what it does rather elaborately. If there's confusion on what this patch, or any of the patches in this patchset, is motivated by or addresses, please call it out specifically. > My biggest concern about your last version was that it's hard > to tell what oom_policy really defines. Each value has it's own application > rules, which is a bit messy (some values are meaningful for OOMing cgroup only, > other are reading on hierarchy traversal). > If you know how to make it clear and non-contradictory, > please, describe the proposed interface. > As my initial response stated, "tree" has cgroup aware properties but it considers the subtree usage as its own. I do not know of any usecase, today or in the future, that would want subtree usage accounted to its own when being considered as a single indivisible memory consumer yet still want per-process oom kill selection. If you do not prefer that overloading, I can break the two out from one another such that one tunable defines cgroup vs process, and another defines subtree usage being considered or not. That's a perfectly fine suggestion and I have no problem implementing it. The only reason I did not was because I do not know of any user that would want process && subtree and that would reduce the number of files for mem cgroup by one. If you'd like me to separate these out by adding another tunable, please let me know. We will already have another tunable later, but is not required for this to be merged as the cover letter states, to allow the user to adjust the calculation for a subtree such that it may protect important cgroups that are allowed to use more memory than others. > > It would be helpful if you would also review the rest of the patchset. > > I think, that we should focus on interface semantics right now. > If we can't agree on how the things should work, it makes no sense > to discuss the implementation. > Yes, I have urged that we consider the interface in both the memory.oom_group discussion as well as the discussion here, which is why this patchset removes the mount option, does not lock down the entire hierarchy into a single policy, and is extensible to be generally useful outside of very special usecases.