Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp637297iog; Wed, 15 Jun 2022 09:09:56 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tLC8dk3qTCIhptvY5bfF6EIWmN9CBtNP0juVyn9lM+l3m8ugeIbg/5POaFI2fnp5JaecfD X-Received: by 2002:a05:6402:f1b:b0:42d:e92f:c924 with SMTP id i27-20020a0564020f1b00b0042de92fc924mr532904eda.389.1655309396210; Wed, 15 Jun 2022 09:09:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655309396; cv=none; d=google.com; s=arc-20160816; b=TNm16zLEBA6fPVXV8jwWGtDBWXNjIBD/2I09Wl5+6XCs0i2LEDelMUJ1829x87Qjse OQu/ceWtLl7qLz1huOqOs/gVPFpQ8lv+N6qhW24CsqLUD5GyTz5qUPzLaCgJ7BjtOzJK LFKDoLH82j6b8L1wqu58SuVF921IXIbgPLhN1bOfJyBp51KhnkpwHqOzHGo6mu9ZBjVt qjS4XfDqahk1XG11zrqM2XWdXUjcYyrNEv7rr47p8FX0GQV1FWbz9A+hJgQcZX8poH3E ipdxvQCR6LZu/wEUgVWRXObJCdrdJDWJdZYIbsOaZDsEREIy+VQgAreCtCgJT1sozPma CD+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=ygjyshnlbg3+pSNVNR1FjCFt/v865tBihLkOKM937/E=; b=ruk2OFEYTVRVTV2qCb5IniLd6iQ+uGx5m9+1vUzqPLzQ8tduI3jWJOjoKODKa9UPrY 9waUFUagSiq6gAGUOp53o6+2lVpKebSCF6hT0S9vHt80APzL9qZRTn65M7hsbwuMQ6VP 13rdVR22v4kUL3QEFa1KpaA1OS3uVNDHRNUOHRMPypVDtc09aguZINEMGSpbJhVuEJjb mJ47eyO6zWYyuWzsSfx4jeZISo/exyi33lU4U9QpQnlTULwIITPla7uGjF2+F1AOF6Ug XjiWxRMLo0nlNrVAv7B1Ann6+wenLAhmqckdvuM2F4P7n6snFkn0hhM6lW5c0QxcJmj5 lXLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=mie4c7DI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o6-20020a170906974600b006ff22be82f4si15908771ejy.61.2022.06.15.09.09.28; Wed, 15 Jun 2022 09:09:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=mie4c7DI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344065AbiFOQAQ (ORCPT + 99 others); Wed, 15 Jun 2022 12:00:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55556 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348588AbiFOQAI (ORCPT ); Wed, 15 Jun 2022 12:00:08 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 75F3DBF0 for ; Wed, 15 Jun 2022 09:00:05 -0700 (PDT) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id B024821AEE; Wed, 15 Jun 2022 16:00:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1655308803; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ygjyshnlbg3+pSNVNR1FjCFt/v865tBihLkOKM937/E=; b=mie4c7DI40Uh042n1iLaOmGvSPGdHGfuFfPg5NSbr6YEHCBZpvJc5xMWWe5wsMoeJQHBIJ DvZ4eu+qUis0dtWO1/vup6a6iDlwXBgp4sh8CF2dRMrZk8omjKXagUgfQSgRRkVliKZz8F O9Z/ptPbrKuitAHATw3+GPf98REucWY= Received: from suse.cz (unknown [10.100.201.86]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id CF1062C141; Wed, 15 Jun 2022 16:00:02 +0000 (UTC) Date: Wed, 15 Jun 2022 17:59:59 +0200 From: Michal Hocko To: Tim Chen Cc: linux-mm@kvack.org, akpm@linux-foundation.org, Wei Xu , Huang Ying , Greg Thelen , Yang Shi , Davidlohr Bueso , Brice Goglin , Linux Kernel Mailing List , Hesham Almatary , Dave Hansen , Jonathan Cameron , Alistair Popple , Dan Williams , Feng Tang , Jagdish Gediya , Baolin Wang , David Rientjes , "Aneesh Kumar K . V" , Shakeel Butt Subject: Re: [RFC PATCH 0/3] Cgroup accounting of memory tier usage Message-ID: References: <34f985f63e6dbaa60bb9d1edb6022e83b98304e4.camel@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <34f985f63e6dbaa60bb9d1edb6022e83b98304e4.camel@linux.intel.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 15-06-22 08:23:56, Tim Chen wrote: > On Wed, 2022-06-15 at 13:11 +0200, Michal Hocko wrote: [...] > > > The patchset works with Aneesh's v6 memory-tiering implementation [1]. > > > It is a preparatory patch set before introducing features to > > > control top tiered memory in cgroups. > > > > > > I'll like to first get feedback to see if > > > (1) Controllng the topmost tiered memory is enough > > > or > > > (2) Multiple tiers at the top levels need to be grouped into "toptier" > > > or > > > (3) There are use cases not covered by (1) and (2). > > > > I would start by asking why do we need a dedicated interface in the > > first place. Why the existing numa_stat is not a proper interface. Right > > now we only report LRU per node stats. Is this insufficient? > > What is userspace expect to do based on the reported data? > > Exporting the toptier information here is convenient for me for debugging > purpose of seeing whether a cgroup's toptier usage is under control. > Otherwise writing a script to parse numastat and the memtier heirachy will > work too. Exporting toptier usage directly is optional and we don't have to do it. Please keep in mind this is an userspace API which has to be maintained for ever. We do not add those just to make debugging more convenient. -- Michal Hocko SUSE Labs