Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp715307imu; Fri, 25 Jan 2019 09:38:54 -0800 (PST) X-Google-Smtp-Source: ALg8bN5C0OpPiG7WnlQqf2idej5YVPID56gWcOc/HoAIXOUzsfFpFcWEMx6Ehdt+2WeIkPKXsvAs X-Received: by 2002:a62:ae04:: with SMTP id q4mr11808038pff.126.1548437934717; Fri, 25 Jan 2019 09:38:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548437934; cv=none; d=google.com; s=arc-20160816; b=unwIWzEZX2+hpaaZMtvH+OhemYrVw3PsxNVRePn+2S2IpsGo3yOJ3+sGangFy+MPLp 5P0zO/VuYPO3vaku75V75ZRVY1DXActeoyu3MdBUI3WsU7LEfO1VvlLKtXe7MXtGs/d3 O3RQR/e6Jddc3XRTVxKZ+F8Vn0cJPYL2QBJAhOn/bCbvEwSC85sAH9EajKWlvn0Ja058 7hBBWFD/A2pUZmUMnimGJSqPTqrsehu27o8esQAwWac/mY3rImCqz9wl4h5+2KIvEdNF yiZf2z6QayKOJyvVwWcnCWRtXuanHzdPD1zG5mHgp7NLYJ4BH2WoW11m9rdTv2K4TJdB K9TA== 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; bh=dDrdJUiF5uEIwGmqijReuoL0Zy23mJNHKqopI9fAgec=; b=J7Fk9PeA6Go77HtfdyFT07tHH4P2qqas5hAKvVRU/zLd2VKrVcV86QzRBanj7dJKY1 uBbAjOdq71XLbsiZ4/VsCaYu5VnYP4KJFup90cHDB7TsszSh/UQZ3LVIUSMQ4jAiMajB 6mw4RlMVjlPWirSZqrmr/gO0R6rX0ysj/FAWOuERHdgXeOFUcC2gkejQzUIQpnx7ylRP CwpJToCMpLJMh9s30l9gRWX9v6Q/w7X8+qo+zl+LNajb4q5iEJYHHC5kCjsQBWjbLJhf 37ZXlG5FotyCk8uVYEIW4diPpcmYQevMaU0eZQKAbuOJ+k0guMwqb/Z7smIk7SBlmk8J clUA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t3si25830525pgl.108.2019.01.25.09.38.38; Fri, 25 Jan 2019 09:38:54 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729098AbfAYRhQ (ORCPT + 99 others); Fri, 25 Jan 2019 12:37:16 -0500 Received: from mx2.suse.de ([195.135.220.15]:49408 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726252AbfAYRhQ (ORCPT ); Fri, 25 Jan 2019 12:37:16 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id C5F19ABCB; Fri, 25 Jan 2019 17:37:14 +0000 (UTC) Date: Fri, 25 Jan 2019 18:37:13 +0100 From: Michal Hocko To: Tejun Heo Cc: Johannes Weiner , Chris Down , Andrew Morton , Roman Gushchin , Dennis Zhou , linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, linux-mm@kvack.org, kernel-team@fb.com Subject: Re: [PATCH 2/2] mm: Consider subtrees in memory.events Message-ID: <20190125173713.GD20411@dhcp22.suse.cz> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190125165152.GK50184@devbig004.ftw2.facebook.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri 25-01-19 08:51:52, Tejun Heo wrote: [...] > > I do see your point about consistency. But it is also important to > > consider the usability of this interface. As already mentioned, catching > > an oom event at a level where the oom doesn't happen and having hard > > time to identify that place without races is a not a straightforward API > > to use. So it might be really the case that the api is actually usable > > for its purpose. > > 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? > If local event monitoring is useful and it can be, > let's add separate events which are clearly identifiable to be local. > Right now, it's confusing like hell. From a backward compatible POV it should be a new interface added. Please note that I understand that this might be confusing with the rest of the cgroup APIs but considering that this is the first time somebody is actually complaining and the interface is "production ready" for more than three years I am not really sure the situation is all that bad. -- Michal Hocko SUSE Labs