Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp668838pxk; Wed, 16 Sep 2020 13:55:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzGvqNHCCQWJ4lR3Qj3Q4/hXUN9g+msIS6EqSYgq9mrxdGp/pP1VfiJiHcf/SIwIXWeF/h/ X-Received: by 2002:a17:906:2b83:: with SMTP id m3mr9582135ejg.456.1600289752139; Wed, 16 Sep 2020 13:55:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600289752; cv=none; d=google.com; s=arc-20160816; b=RXvOKBvF1qcU0BHKOD69CQhblUgXBz/9+TMDMvIy4Hj/1qDRgbXLQ74qdl8EsKBbd8 CbuzG2qW/eZg3bkyVdqaQnNgWo1/+8p1z/XzjVWmLIzBb1fY+XC38r8nL9woxwEVNksc tkbdN0rmIoVUQEs8YO/Yc3m6dgGEEh55rZlApUWNwomib7VQ9oht9U+ZrDQwRCaW1CeE 1QtiHRQhkeK0Y/qsnRizXk0/xt4M/M+2DSLzb5taf7w6V0xRO39yreNobgdOWNUL0YUE N81TvN8j+LC+1y/EYc697sWCkFdKVm2+iioBFFyXQrT257OjBzetb6qvAr9ZBFF3PPX1 jZSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=FQGO6d/0mEB1ogv6r8XPPwwDAuJ9mmObgleVeh1W30Q=; b=IRMuAoC8gKsTbktI6e19glyobjAbIgmz13u++NIrh3lhcijh0CCX2gYBjZdGPkvYlD iYLUmC1xlv4SoznTSpvx4IyuJurcq1y5UTKpqmGI3G5BF8O5WeGItIYT3ibEL+eL2+MQ eROIqTfLuKtvFHr58yWLCOzp+IadkN/CI6qJyLGUiuWFyg6xKcwlXqm/KLID7S1SpC/f XFA3WGaYAf7WDe1xRRIUbU97e5f+aB9m2A/Ws0OX0GYCpWaW7liMzWXHlP5Bwveq5VH0 OrR4TWgDRP9QZxhPqAk39pcFENYjCwTAfxU0QRhmXaKaWPHOW74SSkg+EDV8MLSZokVG wLbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance-com.20150623.gappssmtp.com header.s=20150623 header.b=diAhpmQr; 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=bytedance.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w17si12666603eds.432.2020.09.16.13.55.28; Wed, 16 Sep 2020 13:55:52 -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=@bytedance-com.20150623.gappssmtp.com header.s=20150623 header.b=diAhpmQr; 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=bytedance.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726355AbgIPUw1 (ORCPT + 99 others); Wed, 16 Sep 2020 16:52:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55256 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726513AbgIPQy4 (ORCPT ); Wed, 16 Sep 2020 12:54:56 -0400 Received: from mail-pf1-x444.google.com (mail-pf1-x444.google.com [IPv6:2607:f8b0:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E7D5C0D9417 for ; Wed, 16 Sep 2020 07:47:49 -0700 (PDT) Received: by mail-pf1-x444.google.com with SMTP id k8so755699pfk.2 for ; Wed, 16 Sep 2020 07:47:49 -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=uWlcrtPeWzXNX1YAsvgHstzDYzhfYfoquwW2ALD33MpBYvGA2QGBe5SmFkZZYg03LN +66y1AcODilkg7emdpH4QDcSncuYvrp1EqNsNtT1RN+7D/6nbgWoFH9xAxTJZdPd0xPD iXwTa7oXh7yRlIzr4wZkMdUMeuY/BfTXoZuUFpUoUSTN1mIsCkObgTMWvRyKJCdrQzMi ODl1Z8/R/2+KPpek1eAn0phWgU84RRsPTPenknK4NtTQDiJQXhA13NPHHuQs709cUl/r Wnxx5GPgslPkTgFw6OF3soRydjNRoatp9nxqTzBa8aZjJEhAs14x4ZRf9IO3F28m3cG0 Gyeg== X-Gm-Message-State: AOAM532GWwVzYS3+OqiCk1wYjFyCNsAd1XsSHWG+o7XBASt8SNxkDncU VngK1I2iEb9MgM9VTwM6LWN/IGs1vIwz9bPPTZIsXQ== 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" 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 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