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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3268DC433EF for ; Wed, 15 Jun 2022 11:11:43 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A3F796B0071; Wed, 15 Jun 2022 07:11:42 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9C8166B0072; Wed, 15 Jun 2022 07:11:42 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 842E16B0073; Wed, 15 Jun 2022 07:11:42 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 6DF966B0071 for ; Wed, 15 Jun 2022 07:11:42 -0400 (EDT) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay13.hostedemail.com (Postfix) with ESMTP id 3006F6146B for ; Wed, 15 Jun 2022 11:11:42 +0000 (UTC) X-FDA: 79580204844.16.74C8647 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by imf20.hostedemail.com (Postfix) with ESMTP id 8BD6A1C008A for ; Wed, 15 Jun 2022 11:11:41 +0000 (UTC) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 1B4F21F38D; Wed, 15 Jun 2022 11:11:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1655291500; 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=2rItd1ojkTsOwmaVczGGbIEFSm9A7rqtW6hIDanRzN4=; b=Coxyj/JBf7TTWY4B+qracSbRGznAkf6jOmVjaP+KpeSYgTI6s6ELGfQ/VB3v8AiGQdfWHv ks1V+v1QKORYwiiukKRiGiVVo/9VOqjHxpf1xmGva00W9hi73lhWyqxIWiwN9nW/sBfZuQ UfXwQ8R92LSa3pa8XeAY29Aacud9TK4= 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 245E52C141; Wed, 15 Jun 2022 11:11:37 +0000 (UTC) Date: Wed, 15 Jun 2022 13:11:34 +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: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1655291501; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=2rItd1ojkTsOwmaVczGGbIEFSm9A7rqtW6hIDanRzN4=; b=Jm/ql/29cM8oLGjl1E4NkCrhVQIzLY7aHShWa237LUoWZIGw1YI2CFqfUk2GtbdzY1o5ZI NEQ3mK0b10TJByMEwUw/tnQ/3gLDr1Rp3Dz6bEB3yis/7aznGExHG0CNsDx6z95pWGAzIs ldA9vsp5k+0PtVR+7MS7W7qHtYwjZ9E= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b="Coxyj/JB"; spf=pass (imf20.hostedemail.com: domain of mhocko@suse.com designates 195.135.220.29 as permitted sender) smtp.mailfrom=mhocko@suse.com; dmarc=pass (policy=quarantine) header.from=suse.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1655291501; a=rsa-sha256; cv=none; b=7Zk9KP+wGl4YpzAw6NIUoJPEJsCStrQScuxqQVxEPJDxW7OIZmPi1iGLZtU+ZaLNejXSPi 8WNzQRVrbvPXCC81YZhU7CsNbPAvbCmPnyQ5CMow/pWWUYL2ocIlznEc2QuPile4grvtYf 2v0FNL99qMgVCMrpLNuRTGnBC/Ftsdo= X-Stat-Signature: eku476qjb1tpcfajq8p81n3u67cg6mkr X-Rspamd-Queue-Id: 8BD6A1C008A X-Rspamd-Server: rspam11 X-Rspam-User: Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b="Coxyj/JB"; spf=pass (imf20.hostedemail.com: domain of mhocko@suse.com designates 195.135.220.29 as permitted sender) smtp.mailfrom=mhocko@suse.com; dmarc=pass (policy=quarantine) header.from=suse.com X-HE-Tag: 1655291501-461439 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 Tue 14-06-22 15:25:32, Tim Chen wrote: > For controlling usage of a top tiered memory by a cgroup, accounting > of top tier memory usage is needed. This patch set implements the > following: > > Patch 1 introduces interface and simple implementation to retrieve > cgroup tiered memory usage > Patch 2 introduces more efficient accounting with top tier memory page counter > Patch 3 provides a sysfs interface to repot the the top tiered memory > usage. I guess you meant cgroupfs here, right? > 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? -- Michal Hocko SUSE Labs