From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AB671C2BB84 for ; Wed, 16 Sep 2020 14:47:52 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 380922224D for ; Wed, 16 Sep 2020 14:47:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=bytedance-com.20150623.gappssmtp.com header.i=@bytedance-com.20150623.gappssmtp.com header.b="diAhpmQr" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 380922224D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=bytedance.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 9E6A66B0037; Wed, 16 Sep 2020 10:47:51 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9BD666B0062; Wed, 16 Sep 2020 10:47:51 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 886846B0071; Wed, 16 Sep 2020 10:47:51 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0061.hostedemail.com [216.40.44.61]) by kanga.kvack.org (Postfix) with ESMTP id 71B886B0037 for ; Wed, 16 Sep 2020 10:47:51 -0400 (EDT) Received: from smtpin15.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 26712180AD804 for ; Wed, 16 Sep 2020 14:47:51 +0000 (UTC) X-FDA: 77269203942.15.smash80_1b0c3cc2711a Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin15.hostedemail.com (Postfix) with ESMTP id DED151814B0C8 for ; Wed, 16 Sep 2020 14:47:50 +0000 (UTC) X-HE-Tag: smash80_1b0c3cc2711a X-Filterd-Recvd-Size: 5265 Received: from mail-pf1-f193.google.com (mail-pf1-f193.google.com [209.85.210.193]) by imf36.hostedemail.com (Postfix) with ESMTP for ; Wed, 16 Sep 2020 14:47:50 +0000 (UTC) Received: by mail-pf1-f193.google.com with SMTP id z18so1574297pfg.0 for ; Wed, 16 Sep 2020 07:47:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=FQGO6d/0mEB1ogv6r8XPPwwDAuJ9mmObgleVeh1W30Q=; b=diAhpmQrYS7M270CGrN/O5Df6Kk/JIw2jK0wB8bstS53QPuZIMXExqEKVk18DEyzjV lrxvcXifZ+5YUVBfWIwCtt7OL+27JGQ4L6/7JfqaU/QubBtMkdF5BiHfRNUNu5xc6s9K AJ7katPYRezI+CcMmjtpqq8ya/8MlrOYuWNc237it6xBe7QJU8lEHsJEiHYWLLq9ERdW BheACdvioFzNHXrAxzi2skE1jYQhc6reOgiq78JPVS+vGTCNAlfbk53fkYaROBTG13j7 X1GrYdQmyNtu+fn7IOnI+Dff9pLuqE3a44IT0Q+A7uB1oip+EXX3cRjS1IJ0R+YRsUNg NgpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=FQGO6d/0mEB1ogv6r8XPPwwDAuJ9mmObgleVeh1W30Q=; b=QequF9/I56eFCnvSQ0kM2Ad47G4C3PpB8Z82sgnKTDlK/EIYfDEIM+fJH9h9cqML1u CK91z2FqDBl22+bVMLVbw3Ycjjv1aXxoyBW9dotSGlwsSGscb0FM4HhZm09kAVWJvpm0 iqCIXZkW2MpJDUfIIRuXViTZN3sUlbo8GOEdtiu4WzfCimLLy2cZb60HOBUVt8VwR6Ug V8dQRFEjrpAglXXSKQXPiB9NmlQvpSrMto+ArABnVlcKCDprGH2S+IU/YHFkQgldfCe3 iXY/rSEXYqaiya+gYuU5P5xUmMugGlFT220bPmKWNtQ8E8GFTD7+a6FE3OB54YsBl2cl x/gQ== X-Gm-Message-State: AOAM5320U8NTDGO4IVKDpg5W5Z4t/EW94gYi1EdRbszq7a91VQ6sg2Pq htgof0ZXwMxjwrZtCqfXzosHuW3ACXXsr3DShiwh4Q== X-Google-Smtp-Source: ABdhPJwHamuSqfH4lJpIQcn0CZDeDCmKb5iALIr0BJPrcv+edfAnkn4NuZArB/B5l70iTD2jJffpjleIYuvEGchu+bs= X-Received: by 2002:aa7:941a:0:b029:142:2501:35d1 with SMTP id x26-20020aa7941a0000b0290142250135d1mr6672587pfo.49.1600267669164; Wed, 16 Sep 2020 07:47:49 -0700 (PDT) MIME-Version: 1.0 References: <20200915171801.39761-1-songmuchun@bytedance.com> <20200915214845.GB189808@cmpxchg.org> <20200916144057.GA194430@cmpxchg.org> In-Reply-To: <20200916144057.GA194430@cmpxchg.org> From: Muchun Song Date: Wed, 16 Sep 2020 22:47:12 +0800 Message-ID: Subject: Re: [External] Re: [PATCH v5] mm: memcontrol: Add the missing numa_stat interface for cgroup v2 To: Johannes Weiner 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 Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: DED151814B0C8 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam02 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed, Sep 16, 2020 at 10:42 PM Johannes Weiner wrote: > > 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... > ... Got it. Thanks for your explanation. > > > > Otherwise, this looks reasonable to me. > > > > OK. Will do that. > > Thanks! -- Yours, Muchun