Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3581454imu; Mon, 28 Jan 2019 07:20:03 -0800 (PST) X-Google-Smtp-Source: ALg8bN5ThiAf5asG1BMuxCHa4UpST9lmh8jBqPNkL8n1b1QHW8IUMSSAu45mC9Iy7OGlf5bOwTeT X-Received: by 2002:a63:65c7:: with SMTP id z190mr20301883pgb.249.1548688803798; Mon, 28 Jan 2019 07:20:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548688803; cv=none; d=google.com; s=arc-20160816; b=YzPQu45TjfEtiSYfOPTlTNyH9kTnXCl4efQUmfn73ElGiav6EweV05WIpW3FTT9sl0 IN/P4Wf09fUrV4WsLumaTttQ2YEFt1YykPBfAIw9OHfUtkvX/sE6bGW5RCFnOaYGAVv2 AeofuyQXiiuPUsTkLuKLIkKL32/9QMuMmAu3CcFhNpavocg4w3TUW5ax0IsVoxjlpTSb D/e5S2U6wyggNuiPcYWm5L9YZU6+0SXysQNj/wrFsF4ZPkj+LxZ3YqP26mPxGJnL/TER 6ljV2/e0/LMlO7I43LkJufch7fe3iay0ouwaE/Xm8kplkKn7h/dUmvlY1PU9jhwEDnj4 +Stw== 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=kZV/a4nQc59NHXlfnKflXXYNJ3bLT3Pp5avcSSWpu90=; b=fK+Sj7yby3v9FKVnHVG+uZTttLgzjeOnGmBEEuXjE3wOWBUzFR5XRsMWJegBnFdAw/ IOsDmeskI+vzSpLknfDgvDvguH8tXLAWC5tw5qFQZnNV2zx2MpQNrfTX7UQGWTIOpH6H xHMq/Iv1akaYOKCDmhAKj/xenAfKdNYkROf3oRPsQyT5vvRN4y+4rKlb35yHJxI3XREm eq5j0gwNFAAkKtTQhQ4aDuZaNPPT/G6oYXU0ItmXCTH9/UJ2D918bEzEnjj4aN6gVG1M TygQKdwXmzeMCeC6ghNL/EORgiIZRx3Z4yWvaclWZec9+Chp6TEGDX1pa1ilV5LVeDHg wtAw== 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 g5si26443851plt.273.2019.01.28.07.19.46; Mon, 28 Jan 2019 07:20:03 -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 S1726750AbfA1PTC (ORCPT + 99 others); Mon, 28 Jan 2019 10:19:02 -0500 Received: from mx2.suse.de ([195.135.220.15]:33786 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726266AbfA1PTC (ORCPT ); Mon, 28 Jan 2019 10:19:02 -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 A6432AE41; Mon, 28 Jan 2019 15:19:00 +0000 (UTC) Date: Mon, 28 Jan 2019 16:18:59 +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: <20190128151859.GO18811@dhcp22.suse.cz> References: <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> <20190128145210.GM18811@dhcp22.suse.cz> <20190128145407.GP50184@devbig004.ftw2.facebook.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190128145407.GP50184@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:54:07, Tejun Heo wrote: > Hello, > > On Mon, Jan 28, 2019 at 03:52:10PM +0100, Michal Hocko wrote: > > > 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? > > Hmm... I'm having trouble imagining why this would be a problem. How > would it race? How do you make an atomic snapshot of the hierarchy state? Or you do not need it because event counters are monotonic and you are willing to sacrifice some lost or misinterpreted events? For example, you receive an oom event while the two children increase the oom event counter. How do you tell which one was the source of the event and which one is still pending? Or is the ordering unimportant in general? I can imagine you can live with this model, but having a hierarchical reporting without a source of the event just sounds too clumsy from my POV. But I guess this is getting tangent to the original patch. -- Michal Hocko SUSE Labs