Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp661725pxk; Wed, 16 Sep 2020 13:41:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxcSotueqvl0JuoeLiG5GcTbQpfXEDr8EJFawBtEn01dPSkhxFieeOPiPNBty65ON965mra X-Received: by 2002:a05:6402:304f:: with SMTP id bu15mr30059188edb.201.1600288875706; Wed, 16 Sep 2020 13:41:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600288875; cv=none; d=google.com; s=arc-20160816; b=RydMCEks8oTLfzBTSoCAZlega3KmhJ5d30u1lkFvJrEhohqx6ZEOCgnNeVei6pr19F DYCkDHmxmXXhdET9OAGFOwrLzC1JDYFYD1kJCo9UjQpHL3bSGxGWRZrKU9PQy3hr+EOr h1ZCcdq+fSvGbyZxYSOAAWj3wrZTOA+sT2JF5G5ueC1Ej8zZ1Ms0qeBCHWVgh0Bberd6 4rfuqDhGV9t4ZseY+IzShGvwVYIgzZrfq8DM5IiohF0Gy4t0ThrTwS+MNVOAUrurGZUT NSBSQAHwDu1Mfo4NaZ3N/quSz7mXG8PDveRUgGWzn8PZuV4N6TguOvtMilTOmkY7j0R9 s+Cg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=fKYfJDr6XxN79fp7RRW8vHbFzGf8aLsEG/U2ZaiDjdE=; b=tRL5m4C+T1kYKV4/8YDQsXToGoKVTj6OgvIq9lnCQI2abJKBQgBj9gWnG6Vv8yc/9y YHG2O7EqEmoIk8Gio6EDZ4bbUiwQlHogydu5CV8SIFybs3ePWMXYR/efozDRHNgzxECH RZeKDYP6gOp+ABoB/LoGp3nMnNql8UPuSRLdJREGofj+fuQSSuruEQNPZuEeiPqg6Pp3 351YF3QdhXyXU5MRlXDoMNX+TtWrrkyRJ8s/hnW5n5bb7UmRuPb9rq5tSdk+T3PI7HcQ cUog9+kyjDNdCei3yV1zkLoGOxTR/zJDyEBDQQuTHvhELFoVobwW2Ov/wJdyUsCnjpNC 9FOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cmpxchg-org.20150623.gappssmtp.com header.s=20150623 header.b=x3fuQca0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p8si12615953edr.224.2020.09.16.13.40.52; Wed, 16 Sep 2020 13:41:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@cmpxchg-org.20150623.gappssmtp.com header.s=20150623 header.b=x3fuQca0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726835AbgIPUiq (ORCPT + 99 others); Wed, 16 Sep 2020 16:38:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57474 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726839AbgIPRH4 (ORCPT ); Wed, 16 Sep 2020 13:07:56 -0400 Received: from mail-qk1-x741.google.com (mail-qk1-x741.google.com [IPv6:2607:f8b0:4864:20::741]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D7050C002178 for ; Wed, 16 Sep 2020 07:42:23 -0700 (PDT) Received: by mail-qk1-x741.google.com with SMTP id w186so8416533qkd.1 for ; Wed, 16 Sep 2020 07:42:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=fKYfJDr6XxN79fp7RRW8vHbFzGf8aLsEG/U2ZaiDjdE=; b=x3fuQca0YO4vXhnbqTr/awp8cN0ZmiMYzYQ/wBG5yKnOrO8F+Nw+YZ0TuosHxJH//Y 3iNLZoxNj3tgOeuQOZc/gGlF2FUljYQwnGuXvAJLuhARwn22qD/0LFjmb/NZ3tKLJ+of Gr1QMEfApz/Dx/Qro6daJdCGB5v8rMY7CZQp0JFUZHnZysVsMBjlc53pAUpu1lkR/jwA GaWH31lJFMfcLnxfjTsd2oFBxFLjxEuT2GZiX3v9V95vS6x+6VnHOOh1j46dEpnz3rOI gItFy9wcDwGEuqN9UCktG0P2Nk87Swobyq2yLNj8GLYSO0YGumg8dOshimjHMZL5xP8Q s4WA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=fKYfJDr6XxN79fp7RRW8vHbFzGf8aLsEG/U2ZaiDjdE=; b=HkdZKb/sXjil1y7jGsXTKBhOcGoJ1pBW7evkw9lG6UeBsYx+K0q+k9bq/1yDOa6hNB 7NipgZDlR4H6766fMQigLa9lBl8FykKmucdv8j0Ib1Wq5dEoor93RJ9T8NpEH5nGl+1h 9k9MR0UwVCo1XFFe2fbhvpfJM1XwCIfhE8T+tTXjol9tM41ZFU/oZYJoD6KLA86oTJ5P x2CYsTIo5DGihWXW0RkM8f36TjhA7D3vL3p9zYXMudY2NtqwXzL0JdiSHXB/7HOIHi0T ioXC5x9IzlZfTlkg6Zhi7fcawZLHON0DoXLYHNVldFdY811eTXuKHdS5gg+1gqFNno3F C9oQ== X-Gm-Message-State: AOAM533+yhN+wlHz5hwRJOAQeZsdRQ6JbQdgzqJvfJ/5rbClS7zaejvw MnPTZCqLekvdQfXzuezI/wb7gA== X-Received: by 2002:ae9:dd01:: with SMTP id r1mr22802872qkf.467.1600267342448; Wed, 16 Sep 2020 07:42:22 -0700 (PDT) Received: from localhost ([2620:10d:c091:480::1:445c]) by smtp.gmail.com with ESMTPSA id 16sm19950302qks.102.2020.09.16.07.42.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Sep 2020 07:42:21 -0700 (PDT) Date: Wed, 16 Sep 2020 10:40:57 -0400 From: Johannes Weiner To: Muchun Song Cc: Tejun Heo , Zefan Li , Jonathan Corbet , Michal Hocko , Vladimir Davydov , Andrew Morton , Shakeel Butt , Roman Gushchin , Randy Dunlap , Cgroups , linux-doc@vger.kernel.org, LKML , Linux Memory Management List Subject: Re: [External] Re: [PATCH v5] mm: memcontrol: Add the missing numa_stat interface for cgroup v2 Message-ID: <20200916144057.GA194430@cmpxchg.org> References: <20200915171801.39761-1-songmuchun@bytedance.com> <20200915214845.GB189808@cmpxchg.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 16, 2020 at 12:14:49PM +0800, Muchun Song wrote: > On Wed, Sep 16, 2020 at 5:50 AM Johannes Weiner wrote: > > > > On Wed, Sep 16, 2020 at 01:18:01AM +0800, Muchun Song wrote: > > > In the cgroup v1, we have a numa_stat interface. This is useful for > > > providing visibility into the numa locality information within an > > > memcg since the pages are allowed to be allocated from any physical > > > node. One of the use cases is evaluating application performance by > > > combining this information with the application's CPU allocation. > > > But the cgroup v2 does not. So this patch adds the missing information. > > > > > > Signed-off-by: Muchun Song > > > Suggested-by: Shakeel Butt > > > Reviewed-by: Shakeel Butt > > > > Yup, that would be useful information to have. Just a few comments on > > the patch below: > > > > > @@ -1368,6 +1368,78 @@ PAGE_SIZE multiple when read back. > > > collapsing an existing range of pages. This counter is not > > > present when CONFIG_TRANSPARENT_HUGEPAGE is not set. > > > > > > + memory.numa_stat > > > + A read-only flat-keyed file which exists on non-root cgroups. > > > > It's a nested key file, not flat. > > This is just copied from memory.stat documentation.Is the memory.stat > also a nested key file? No, memory.stat is a different format. From higher up in the document: Flat keyed KEY0 VAL0\n KEY1 VAL1\n ... Nested keyed KEY0 SUB_KEY0=VAL00 SUB_KEY1=VAL01... KEY1 SUB_KEY0=VAL10 SUB_KEY1=VAL11... ... > > Otherwise, this looks reasonable to me. > > OK. Will do that. Thanks!