Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3713735imu; Mon, 28 Jan 2019 09:29:32 -0800 (PST) X-Google-Smtp-Source: ALg8bN4mJFd4LZ+2eVY1AwConBtD5y8DAifLiQe15AqHSeIEdrqReTjXdiyjzqCiB3OFhRB24vi7 X-Received: by 2002:a63:7c6:: with SMTP id 189mr20932329pgh.129.1548696572371; Mon, 28 Jan 2019 09:29:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548696572; cv=none; d=google.com; s=arc-20160816; b=V9DPWDcpFG+wB8qhY4ShizfgTyOwb8Of/dilaPgmqKx8q57d+aWjg7Ghk1Pn1vTzXc 7mpNVvDkrvjZ2695j7l0xDMelZGqV4zahv1ld6l4yTvup4Bx+XPL1ZcmtDuduVV3Tyf8 nAbvnGEGW54f4xOoL7tHn3tWVxvaVkaEGBSlvc5kra9ic4K+TKQFB2ySOA1LscursE9U GlPn/DwMFoSMPuMXPPTLnhhLBvxcIMf3lFleff8zXmHiy6bEbs4ovvn/EzaFaH17jszK 3SV/3cykT2McAgGsWfqSqlwaesPGSxFTLZnCeQk2x4A42M9qJg1O5KrSk7HmwPTAdx/D R5sw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=yG+IPoHDMDTax/O7ZuXb5W3f6MupuLya0ZnIkWYX/6w=; b=bEq3ovPZ+hjJVHlKb76W6SyciLlUZifXmFyuLR87LkWWpYGsEAPYjPwjFrABe7XSYB uRxM9NNg+vyGNnhWaziHSCTUZuPpIe+e2Es2ZKaZrKQlxe2GO6avOS1hSZ8cST97o0eh 6ytIG16VOTT0SHPXIVNJQx9ISFjtY5EL46PheJ5qxj4dqxPKZ/THz+Ugsl/ATT8Pa16C usNR312ZajGW1fTEb88ZgNqjJ97gF25vmuS/Z4mLg4poQcpeUKffnCUtadYGEScZ6yCj I/cB6x9CtK8EQ72igWMimUj7bmZygM/73p0wlPkn8EAcAhDFP7AicaKIQEbhcSWKl7Ao xMgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Y2Nu9OJQ; 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 e15si32784870pgm.25.2019.01.28.09.29.17; Mon, 28 Jan 2019 09:29:32 -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; dkim=pass header.i=@google.com header.s=20161025 header.b=Y2Nu9OJQ; 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 S1730635AbfA1P7t (ORCPT + 99 others); Mon, 28 Jan 2019 10:59:49 -0500 Received: from mail-yw1-f65.google.com ([209.85.161.65]:46988 "EHLO mail-yw1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730609AbfA1P7q (ORCPT ); Mon, 28 Jan 2019 10:59:46 -0500 Received: by mail-yw1-f65.google.com with SMTP id t13so6885875ywe.13 for ; Mon, 28 Jan 2019 07:59:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=yG+IPoHDMDTax/O7ZuXb5W3f6MupuLya0ZnIkWYX/6w=; b=Y2Nu9OJQzhF0nbbJyWful5kNWyBwddZ1f1VkAn29tp8WPoA3LQEpNLrXI0kn9uVKgy OlGZ5zSDZ626uxv8mP78Rj7AY2v4WkaCfuHsdJlBn+xXi/4FgKXoDRlJQ+mYBvaUcEBs /SM7LUD6MvsgbB1WryhJ8dhabqGvs4Z7Y6u8y+ALxnGe8PYsUrAJJ5Y/szN5wT1FRpNF mB6Q3M2uWHzBMJQYukDpHZlc+LY9Usy04PZ+TuJ6YRjmujaKDcTm2vvts6QrF8UMvKSD nwJH1risZ+AEEBgV+6YVoz9pRI6Oquh247133FVA/eaZMzmKJy+IaVYXqtOvdwRjrchm ysOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=yG+IPoHDMDTax/O7ZuXb5W3f6MupuLya0ZnIkWYX/6w=; b=Ig7Rxo0x7XCO7P6JhVqoquyn4zRx/7TYqf3KYE296Jd1UVIFu/fbKCep7u/glvBAw9 mDM6jP9PZLpVgBslqOWAo4eud6p2jGUjsrGjY8DfjJL/vjLzVCFY3iLGl5TiGbfNPtxN FZpwU9aay+OVRAPYqPsKwDiBhiW7dftG4XBeAvLF1QX4RYnCk5MDY210t7rEA12vGk0e LKHQnah2yxQjdfAfB7OvowrMG4e6sX9ocQcRpt/FgEKmZW3eruyclmWJIK9C1nds4SaT cbuAu/S398G5YEYaFg9I8jXumd4hCdqJuOeDO+nLM52UmrgpcCqnzM9ZzM2n//AO38uc folw== X-Gm-Message-State: AJcUukfRJmuxuS2y3W21YYjLuh+4MkVQuPETu68hBDDa1BXbI/eC0Kpv JOKYl0KeowyHpKNS/7mgeuPXwzN6Km8p8ToUu9D65A== X-Received: by 2002:a81:ee07:: with SMTP id l7mr21402528ywm.489.1548691184840; Mon, 28 Jan 2019 07:59:44 -0800 (PST) MIME-Version: 1.0 References: <20190123223144.GA10798@chrisdown.name> <20190124082252.GD4087@dhcp22.suse.cz> <20190124160009.GA12436@cmpxchg.org> <20190124170117.GS4087@dhcp22.suse.cz> <20190124182328.GA10820@cmpxchg.org> <20190125074824.GD3560@dhcp22.suse.cz> <20190125165152.GK50184@devbig004.ftw2.facebook.com> <20190125173713.GD20411@dhcp22.suse.cz> <20190125182808.GL50184@devbig004.ftw2.facebook.com> In-Reply-To: <20190125182808.GL50184@devbig004.ftw2.facebook.com> From: Shakeel Butt Date: Mon, 28 Jan 2019 07:59:33 -0800 Message-ID: Subject: Re: [PATCH 2/2] mm: Consider subtrees in memory.events To: Tejun Heo Cc: Michal Hocko , Johannes Weiner , Chris Down , Andrew Morton , Roman Gushchin , Dennis Zhou , LKML , Cgroups , Linux MM , kernel-team@fb.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Tejun, On Fri, Jan 25, 2019 at 10:28 AM Tejun Heo wrote: > > Hello, Michal. > > On Fri, Jan 25, 2019 at 06:37:13PM +0100, Michal Hocko wrote: > > > What if a user wants to monitor any ooms in the subtree tho, which is > > > a valid use case? > > > > How is that information useful without know which memcg the oom applies > > to? > > For example, a workload manager watching over a subtree for a job with > nested memory limits set by the job itself. It wants to take action > (reporting and possibly other remediative actions) when something goes > wrong in the delegated subtree but isn't involved in how the subtree > is configured inside. > Why not make this configurable at the delegation boundary? As you mentioned, there are jobs who want centralized workload manager to watch over their subtrees while there can be jobs which want to monitor their subtree themselves. For example I can have a job which know how to act when one of the children cgroup goes OOM. However if the root of that job goes OOM then the centralized workload manager should do something about it. With this change, how to implement this scenario? How will the central manager differentiates between that a subtree of a job goes OOM or the root of that job? I guess from the discussion it seems like the centralized manager has to traverse that job's subtree to find the source of OOM. Why can't we let the implementation of centralized manager easier by allowing to configure the propagation of these notifications across delegation boundary. thanks, Shakeel