Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4737521imu; Tue, 29 Jan 2019 06:44:21 -0800 (PST) X-Google-Smtp-Source: ALg8bN4UgmDc0dPShGEaF2UW54uV5qox/Sz7exDUUtY4HPnjgDuj4N5GeCbbkCz04Y/51sRkf0Qa X-Received: by 2002:a63:2054:: with SMTP id r20mr23680229pgm.328.1548773061494; Tue, 29 Jan 2019 06:44:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548773061; cv=none; d=google.com; s=arc-20160816; b=RJe8bwb6+0TamdJUnjD1Z5X7Z9RZtmkdyjlhMc4kS8Q7LKqpWkPZ3bU+wUOP7HuSD2 1Ebu+EnnbBXJGfXVJ/4MVWbZA5i0btGZ1CIpPGajSavHa2BdM0iaeryRpoE0hT0kdoZi kvUfBF8f5pb7qUYsspHMjh98v5HIzCZce8Qf2CyNhswZLpGRMyhO3GdjYVf9c9YPQBzN xakl2+O//C1YjmQAda/qs0rUknU/eoYdxx/GubWreswa6xMeFo4ZqIYrNIjCWmeJAW5s ej+cR6X7Ll05ENGA+UVWYhSrxlfdE8/hy8wgXOKJ0MIHqrYdCQ7s3G+hDnqv0ede56p8 te0A== 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=Lf+lYekVrX5peqJ1BYuI15TXxt8cAjECIxDDnxjSpnY=; b=TmGRVVSCiP/oNAX+3+1idVXO67wAuu0NHkhnuuOzXywyXcpKvNYWvvsZARDpApJS+Y E8o37TQaCnIML0KIInhHMkPE6QIuwZKbAl9WYJMkp3Ws5PXtuVM0dYoqh7aA8ar5NVDo NBKHS3OWzQvEZ5v7vMdh1PIds7hFuwifNyLDuDmxhrB0CZ9Cv0VUgxg5K4jY7FavRNxm V1wRtYxBQ5geCSt6MPx0AUWZH4Z0i1nK30hRo6g8ANZ6msM5BXdVpjZHJNPYsPNQ6inf ou+09hBzH1Pa1U8/8RI9rgdQunSRqrDiZmc16cxFtHzQDWi4mEfstZPLINxj7uhMn8cf b5lA== 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 z20si33537079pgv.159.2019.01.29.06.44.03; Tue, 29 Jan 2019 06:44:21 -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 S1727246AbfA2OnL (ORCPT + 99 others); Tue, 29 Jan 2019 09:43:11 -0500 Received: from mx2.suse.de ([195.135.220.15]:47060 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725730AbfA2OnJ (ORCPT ); Tue, 29 Jan 2019 09:43:09 -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 2BBAFB049; Tue, 29 Jan 2019 14:43:08 +0000 (UTC) Date: Tue, 29 Jan 2019 15:43:06 +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: <20190129144306.GO18811@dhcp22.suse.cz> References: <20190125173713.GD20411@dhcp22.suse.cz> <20190125182808.GL50184@devbig004.ftw2.facebook.com> <20190128125151.GI18811@dhcp22.suse.cz> <20190128142816.GM50184@devbig004.ftw2.facebook.com> <20190128145210.GM18811@dhcp22.suse.cz> <20190128145407.GP50184@devbig004.ftw2.facebook.com> <20190128151859.GO18811@dhcp22.suse.cz> <20190128154150.GQ50184@devbig004.ftw2.facebook.com> <20190128170526.GQ18811@dhcp22.suse.cz> <20190128174905.GU50184@devbig004.ftw2.facebook.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190128174905.GU50184@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 09:49:05, Tejun Heo wrote: > Hello, Michal. > > On Mon, Jan 28, 2019 at 06:05:26PM +0100, Michal Hocko wrote: > > Yeah, that is quite clear. But it also assumes that the hierarchy is > > pretty stable but cgroups might go away at any time. I am not saying > > that the aggregated events are not useful I am just saying that it is > > quite non-trivial to use and catch all potential corner cases. Maybe I > > It really isn't complicated and doesn't require stable subtree. > > > am overcomplicating it but one thing is quite clear to me. The existing > > semantic is really useful to watch for the reclaim behavior at the > > current level of the tree. You really do not have to care what is > > happening in the subtree when it is clear that the workload itself > > is underprovisioned etc. Considering that such a semantic already > > existis, somebody might depend on it and we likely want also aggregated > > semantic then I really do not see why to risk regressions rather than > > add a new memory.hierarchy_events and have both. > > The problem then is that most other things are hierarchical including > some fields in .events files, so if we try to add local stats and > events, there's no good way to add them. All memcg events are represented non-hierarchical AFAICS memcg_memory_event() simply accounts at the level when it happens. Or do I miss something? Or are you talking about .events files for other controllers? -- Michal Hocko SUSE Labs