Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3552354imu; Mon, 28 Jan 2019 06:53:59 -0800 (PST) X-Google-Smtp-Source: ALg8bN7iH4As7wJhfVCLX0wRBK9WyH7qj1PRxHm3GBrmonRwiC4U+bxwaM9MsfZB31T66ONeF0fS X-Received: by 2002:a17:902:b707:: with SMTP id d7mr21109300pls.29.1548687239485; Mon, 28 Jan 2019 06:53:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548687239; cv=none; d=google.com; s=arc-20160816; b=cBnCsb+4+uv6KW3dWWUjA1hNsyqijfRqR2mmmpU/xVLXhGdWd8zuniZ7ogkigmPHAB CcYS2LnQm4KP0zXJOLSuOl/LpeyOm5x1mKDlVJOV4nyqsFvQZwv3hF8mfYZjclwEOL2K eyqJMQNqAVyks18V/RX5XnBEiIKeDU99CwgzMuqfZ6raXzsFt29tWbD/Zm5727T2IpOe bAX2XURrgNagV4kGhT0xQEpgVscQWeT1YQQQMCGbt+h2LJz+emfpt8ZgN540pCgNCiie Ec5R79cwlPL1UIPTv2mOIApENHo0WkIyxScNV+dExdpl8kaIsmrEiOvm0Rgci0VtLvhC ZDcQ== 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=3bjSfiUXIMXFCemCwMevoOfYIhP/2rBCS+wSAnPGAWY=; b=jhfan2VTiIOOT+vjKgMMB8qvWkgsN0UEvhFp0Tnus0C4y+gq86SaDTxXSWdD3weMgn cjbCseMd7q1mQ4sHPL0RUwN3jTBFcrj4ngTFe8I98NIG4vdD7QWZnVmY7kFlfixp0aHz 6MoI9tp3GpGI7clU15WRaBCfcSkDhkU8+zAUozQyy+iPk3plAMX5WZ/yOzv7+YD4nco2 qnDxwwXEChkykH4LiNSiJmPfFw9BYi2UK6/rbqlKGl/yuTbR5DS+fOsn7ctjWR6BYQ6l bQMxBEUQohfH0vfqJD5lU38la+Ak3JIJoXVbxWL51P75XoNu6I99tYtegItUI15TrnER nAiA== 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 1si34174157pls.16.2019.01.28.06.53.43; Mon, 28 Jan 2019 06:53:59 -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 S1726864AbfA1OwM (ORCPT + 99 others); Mon, 28 Jan 2019 09:52:12 -0500 Received: from mx2.suse.de ([195.135.220.15]:57570 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726678AbfA1OwM (ORCPT ); Mon, 28 Jan 2019 09:52:12 -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 3AF52AEF3; Mon, 28 Jan 2019 14:52:11 +0000 (UTC) Date: Mon, 28 Jan 2019 15:52:10 +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: <20190128145210.GM18811@dhcp22.suse.cz> References: <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> <20190128125151.GI18811@dhcp22.suse.cz> <20190128142816.GM50184@devbig004.ftw2.facebook.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190128142816.GM50184@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 Mon 28-01-19 06:28:16, Tejun Heo wrote: > Hello, Michal. > > On Mon, Jan 28, 2019 at 01:51:51PM +0100, Michal Hocko wrote: > > > 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. > > > > Yes, I understand this part, but it is not clear to me, _how_ to report > > anything sensible without knowing _what_ has caused the event. You can > > walk the cgroup hierarchy and compare cached results with new ones but > > this is a) racy and b) clumsy. > > All .events files generate aggregated stateful notifications. For > anyone to do anything, they'd have to remember the previous state to > identify what actually happened. Being hierarchical, it'd of course > need to walk down when an event triggers. And how do you do that in a raceless fashion? > > > That sure is an option for use cases like above but it has the > > > downside of carrying over the confusing interface into the indefinite > > > future. > > > > I actually believe that this is not such a big deal. For one thing the > > current events are actually helpful to watch the reclaim/setup behavior. > > Sure, it isn't something critical. It's just confusing and I think > it'd be better to improve. > > > I do not really think you can go back. You cannot simply change semantic > > back and forth because you just break new users. > > > > Really, I do not see the semantic changing after more than 3 years of > > production ready interface. If you really believe we need a hierarchical > > notification mechanism for the reclaim activity then add a new one. > > I don't see it as black and white as you do. Let's agree to disagree. > I'll ack the patch and note the disagreement. Considering the justification behhind this change I really do not see other option than nack this change. There is simply no _strong_ reason to change the behavior. Even if the current behavior is confusing, the documentation can be improved to be more specific. If there is a strong demand for hierarchical reporting then add a new interface. But I have to say that I would consider such a reporting clumsy at best. -- Michal Hocko SUSE Labs