Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3531346imu; Mon, 28 Jan 2019 06:32:04 -0800 (PST) X-Google-Smtp-Source: ALg8bN4B3va9zN81stgC7pJbDM24+TBfJozF0+lfym+lyinfma0lWG5dI3c4/wC8d9GORwuUQr5/ X-Received: by 2002:a62:5b44:: with SMTP id p65mr21873863pfb.47.1548685924816; Mon, 28 Jan 2019 06:32:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548685924; cv=none; d=google.com; s=arc-20160816; b=ISunjOVYNamAzvy/PvjiM8C1yMftcUP1xCxKF+nBZRaU8acMS5v1u5oi3GfWH1fQLm ikD4o699FX24SijvdUCX3d5OTVYd6BQtdW1gXbXWnf/Prx/xLTrlyr/ng2G60e/4opnh umW9ZcjhJv2RZSBQaSWI3237qJP3e0FsQX3CYPc+pjdNau7scYmvujNpz8NlUZ6VtEsJ IJuMK9sFDuL7ESpHPIi0ilTH8p6Tt/i4uuvHXriXCoyv8v0hyWIyQYuwjLhUWEXZrvZh G+JMdtp1gG9hX8RQKfrI28ImQGiaOrXYdFdWr0sBA551dFvJ/YPh3f/JM5VzWbg6TRgv OM4A== 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:dkim-signature; bh=1ogb3hFMHB8WCDDPWWGm6OYJJs0L4GkVd3fDg6sKROY=; b=L4hF3iVay+gYEGGkdHxZtmTGeAFqZGpeHedLbfrh3EQN530GsddUU31w4s9T6bLz4h ME8iMNeT7TMLh40Aer7eQCS2GVjJtnk0enssiiJHrurPh1oMqkskl2KzKf6EE+t9hDIX t3nOEieSBs0FZkAwoaxmYlToEdYD6TmqUxTKR9IxY0k9SlMcQsLrlQSF0EwiPDSpxlxv TbmbNJ9vJcBYVTMRXp4n6x9Uk3JBn8u4Y2kyBpFGcqcNgl/fu8iCsQLalhD/30nf+Bdw F3Q+70Psi6QbrbA6OO+BKif4x0UOmNFc+Zt4A47PYe4We5YdQtrRiPPxc11RD1dlcfth C1fw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=L1ydZxq2; 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 g15si31466500pgl.141.2019.01.28.06.31.48; Mon, 28 Jan 2019 06:32:04 -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=fail header.i=@gmail.com header.s=20161025 header.b=L1ydZxq2; 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 S1726774AbfA1Oai (ORCPT + 99 others); Mon, 28 Jan 2019 09:30:38 -0500 Received: from mail-yw1-f67.google.com ([209.85.161.67]:33428 "EHLO mail-yw1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726266AbfA1Oah (ORCPT ); Mon, 28 Jan 2019 09:30:37 -0500 Received: by mail-yw1-f67.google.com with SMTP id p65so6798247ywe.0; Mon, 28 Jan 2019 06:30:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=1ogb3hFMHB8WCDDPWWGm6OYJJs0L4GkVd3fDg6sKROY=; b=L1ydZxq2pUdx41QvZPNxpibVmlWNSwIjOand8ivfRjISmfa1LIaEOSgbFYxaCSfydA 9JKxXq9itIXeevyyuBGJLlFvvNMbaCxOhfKS7sqFVcq9o2ImHgRNS2PQ7u2P7OE/8Ld1 vnN1CBwoZeu0o42j/hO7OJiH4yjm2hm6aM07+9zdXFS+ZBMBhS9pEW5fDqUbGYEn+Lir D5NhFy92Kzkr0o4YoBq/SMH3e2HXhOOzRhaJ0INHmUPkPVYoNe1eXw+pLHT94+qlDtsR eNw8P/PcwD5FAWBJTBDnl4nJZaCanVN663vg1JgF1tds/39xysXE1CSWq+en5qvrzmRl zWeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=1ogb3hFMHB8WCDDPWWGm6OYJJs0L4GkVd3fDg6sKROY=; b=Bv2CupUZM9f0ZoQNlc2Off09rzs66nwiZMNVlXuyTBOieFILP7OhjkHdg0eGDPkXPW foLHCfTeKEuWs6vWEPiPjQ+dwDbAYnsE24y9kU5yBH3rrF8SGk1ZpEYWBVrh97xsDPxg 0WvEcjipnTPoSNhFJTEcA2+5FaceGobrPnxwwPWCEBXHHek+UGQ6AcfRNv12VjjeJlJB xj6EAVOikZoa7yz8majgGuKSXFAqRUtD90doIBrZqFyAW0Z2Hug4IxxaJsdQvpr8evM1 aDmgEyVucRdcQjmzLPl6BNpRAoxzcvvLwgvNfla2UEkc2H1y1zdsnDCS5Htt99wuhXsB MvVg== X-Gm-Message-State: AJcUukcTOBU82o+O/KXc0eXKmaCaw/MSlahY+W4AbALgWndoc5BUDJV7 q1VfqC5Oe5Gr0hXOm/IeMvs= X-Received: by 2002:a81:f00c:: with SMTP id p12mr21249044ywm.55.1548685836139; Mon, 28 Jan 2019 06:30:36 -0800 (PST) Received: from localhost ([2620:10d:c091:200::7:a62a]) by smtp.gmail.com with ESMTPSA id k127sm13451223ywa.81.2019.01.28.06.30.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 28 Jan 2019 06:30:35 -0800 (PST) Date: Mon, 28 Jan 2019 06:30:33 -0800 From: Tejun Heo To: Chris Down Cc: Andrew Morton , Johannes Weiner , Michal Hocko , 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: <20190128143033.GN50184@devbig004.ftw2.facebook.com> References: <20190123223144.GA10798@chrisdown.name> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190123223144.GA10798@chrisdown.name> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 23, 2019 at 05:31:44PM -0500, Chris Down wrote: > memory.stat and other files already consider subtrees in their output, > and we should too in order to not present an inconsistent interface. > > The current situation is fairly confusing, because people interacting > with cgroups expect hierarchical behaviour in the vein of memory.stat, > cgroup.events, and other files. For example, this causes confusion when > debugging reclaim events under low, as currently these always read "0" > at non-leaf memcg nodes, which frequently causes people to misdiagnose > breach behaviour. The same confusion applies to other counters in this > file when debugging issues. > > Aggregation is done at write time instead of at read-time since these > counters aren't hot (unlike memory.stat which is per-page, so it does it > at read time), and it makes sense to bundle this with the file > notifications. ... > Signed-off-by: Chris Down > Acked-by: Johannes Weiner Acked-by: Tejun Heo Michal has a valid counterpoint that this is a change in userland visible behavior but to me this patch seems to be more of a bug fix than anything else in that it's addressing an obvious inconsistency in the interface. Thanks. -- tejun