Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp950645iob; Fri, 13 May 2022 17:29:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxFc+U9gNz4HMSGuBKouPOi2/4AMoMAoFYN07VuQbFvgeQcAmGIVLldDvoc6QWqfmtnVBPn X-Received: by 2002:a05:600c:3490:b0:394:5616:ac78 with SMTP id a16-20020a05600c349000b003945616ac78mr6772874wmq.80.1652488158169; Fri, 13 May 2022 17:29:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652488158; cv=none; d=google.com; s=arc-20160816; b=KPk5H693WWzj9LdkLh5Pl/Lz9oUDIHB2VNBly+MsAeLildMFdT0C4fAErYGk1qXhFt InKUmRNP1OnVmOI8TIPgzz422jqTa21aNIewttcoK/m3yYpsxbwajenSHQksSqyvL0AX HlQFhiNAggXuUps/L3tXF42CKrTBB/wSYO8nEYTlU545WEw1mRqX21ubUO0WAJmN9CpH UWGZUpCElFLnRdj9cHfH/yF0VTY3JqkyblTiZmSv9BEx/WXrwgtOZOxqWzAfgIzB2DY2 U9yedZ5cETKoPMSlWDYgsvuRNtQphzxx+9HjkNuVpHXpGwVeDQAYTyIoJ+hhlr8tGJXn 1MOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:to:from:subject:message-id :dkim-signature; bh=QW6EUDqhVAK8iXoPGHDHvkxLJML3+LEzvNzBPpqcW6Q=; b=O62LLMRra+YPUsx1Ho9Cu6vC5C0nJVB7EbrI9QweGHrwZA4wb0LwZG0s2Mrds6RYDm 62UZpp/hbprQGqO77jncZ/W/L6YH/0NqFK+pVgpCeeT/sEMWwQNTHTSFmxb0wmvqPges 8bXvhx9kODx0SdZEcYQztM1MVNYz1bM/xghCNI2cw0zSIsX+S2+L1/7qQrUYaH26M+sx 1OzcbMfDVoD+sfmzHEtvTA5zNhOe+T+0xd8gkiSZDpYhgFT1OVzIXx0SeXkg/5RXTPZA FNOjn1Ub6r24NFAtPLcJgouaKppOcD8rlfu+IhDpL99sy/Xc+d/OV04HYYWqpHwD08uf KvHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ZpgMFcEV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id b13-20020adfc74d000000b0020c5a159438si3859879wrh.357.2022.05.13.17.29.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 May 2022 17:29:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ZpgMFcEV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 51088301E91; Fri, 13 May 2022 16:21:28 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350625AbiELHDr (ORCPT + 99 others); Thu, 12 May 2022 03:03:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42882 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229934AbiELHDq (ORCPT ); Thu, 12 May 2022 03:03:46 -0400 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 555B457B12 for ; Thu, 12 May 2022 00:03:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1652339025; x=1683875025; h=message-id:subject:from:to:date:in-reply-to:references: mime-version:content-transfer-encoding; bh=2BoPkenWCDtGr5uisyAJ+mBH2Rf2kRq/FNVqeUodPQc=; b=ZpgMFcEVxMlVjm1Ez1YSVa3LQaLy/3RbjD0u6zcOr5aQNwmvIgjEp1qj uz9sr2RKdKnsT5dJVeuUUUfNUREeQHRX86dQMbVHfGZpZTD7amyMrVaj4 87hfy4Qe2y2czrjP2Ga8DOiWWeHUFRwWTry843//VqAAKo15RZEHUCzD+ doW4U3RfudPZgqUYRhN8HW2ILHZRJyvY72Pc4AKIzVrdF3VxdVWZl78Se B1drLnpozpniYCXABYtw1C5ILqAtUasi/ssbDXQfecA5AoxXtmPB0pYIJ Sk7+YeAQPANuVbesy8TwGNaHIyeXOjXZmca6Aa+J1ret2hOedJ2oLOHMV A==; X-IronPort-AV: E=McAfee;i="6400,9594,10344"; a="267500389" X-IronPort-AV: E=Sophos;i="5.91,218,1647327600"; d="scan'208";a="267500389" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 May 2022 00:03:45 -0700 X-IronPort-AV: E=Sophos;i="5.91,218,1647327600"; d="scan'208";a="697915194" Received: from ruonanwa-mobl.ccr.corp.intel.com ([10.254.212.157]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 May 2022 00:03:39 -0700 Message-ID: <56b41ce6922ed5f640d9bd46a603fa27576532a9.camel@intel.com> Subject: Re: RFC: Memory Tiering Kernel Interfaces (v2) From: "ying.huang@intel.com" To: Wei Xu , Andrew Morton , Greg Thelen , "Aneesh Kumar K.V" , Yang Shi , Linux Kernel Mailing List , Jagdish Gediya , Michal Hocko , Tim C Chen , Dave Hansen , Alistair Popple , Baolin Wang , Feng Tang , Jonathan Cameron , Davidlohr Bueso , Dan Williams , David Rientjes , Linux MM , Brice Goglin , Hesham Almatary Date: Thu, 12 May 2022 15:03:36 +0800 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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, 2022-05-11 at 23:22 -0700, Wei Xu wrote: > Sysfs Interfaces > ================ > > * /sys/devices/system/memtier/memtierN/nodelist > >   where N = 0, 1, 2 (the kernel supports only 3 tiers for now). > >   Format: node_list > >   Read-only. When read, list the memory nodes in the specified tier. > >   Tier 0 is the highest tier, while tier 2 is the lowest tier. > >   The absolute value of a tier id number has no specific meaning. >   What matters is the relative order of the tier id numbers. > >   When a memory tier has no nodes, the kernel can hide its memtier >   sysfs files. > > * /sys/devices/system/node/nodeN/memtier > >   where N = 0, 1, ... > >   Format: int or empty > >   When read, list the memory tier that the node belongs to. Its value >   is empty for a CPU-only NUMA node. > >   When written, the kernel moves the node into the specified memory >   tier if the move is allowed. The tier assignment of all other nodes >   are not affected. > >   Initially, we can make this interface read-only. It seems that "/sys/devices/system/node/nodeN/memtier" has all information we needed. Do we really need "/sys/devices/system/memtier/memtierN/nodelist"? That can be gotten via a simple shell command line, $ grep . /sys/devices/system/node/nodeN/memtier | sort -n -k 2 -t ':' Best Regards, Huang, Ying