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 013D9C6FA82 for ; Fri, 23 Sep 2022 10:36:11 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 477B480008; Fri, 23 Sep 2022 06:36:11 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 400F180007; Fri, 23 Sep 2022 06:36:11 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 252F480008; Fri, 23 Sep 2022 06:36:11 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 12BC880007 for ; Fri, 23 Sep 2022 06:36:11 -0400 (EDT) Received: from smtpin18.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id CD8501C6E0A for ; Fri, 23 Sep 2022 10:36:10 +0000 (UTC) X-FDA: 79942995300.18.CBBF24C Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by imf26.hostedemail.com (Postfix) with ESMTP id 22735140003 for ; Fri, 23 Sep 2022 10:36:09 +0000 (UTC) Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 28N9xZps016526; Fri, 23 Sep 2022 10:35:47 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=ooxMihpH152oG5VCj9k8zT0AYwKGGyXZsd3SxSfv/Mg=; b=YSmP1tBiERN4CvL/u1SFXYI2gtimnBHgDWwwQCbsnFSd1D8e2FN7AJmwdDjVbph0jNTi 4zJkIMyXbwR1yXbbFpeb/qV5Unz01W3luNh4nxQIkDlLrIU+8ZkTsxWoO3Otx3W5hzSG U5QYvU/fkbLtXja79Qzo7Vnf8MMNsDs2sUCjiwWG/acXzGzdsvEkIZsn/rwrJJi2iwf7 jGOSXwEaBpqEBW6sWy+yHBJ+LvMdQ5dewGOnTFiv8dI95ik4gsCP2Zv5eOeTgckkU+qg NxzdlumeoAV89fkgTjWSGcCHnG3hQVOrLtY1D8VLqm0b/ne1jQmoay/j4Bw9h4aJ+Ume 2w== Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3js8necbyd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 23 Sep 2022 10:35:46 +0000 Received: from m0098420.ppops.net (m0098420.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 28N89EQ0000401; Fri, 23 Sep 2022 10:35:46 GMT Received: from ppma06fra.de.ibm.com (48.49.7a9f.ip4.static.sl-reverse.com [159.122.73.72]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3js8necbxa-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 23 Sep 2022 10:35:45 +0000 Received: from pps.filterd (ppma06fra.de.ibm.com [127.0.0.1]) by ppma06fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 28NAZi2A014518; Fri, 23 Sep 2022 10:35:44 GMT Received: from b06avi18878370.portsmouth.uk.ibm.com (b06avi18878370.portsmouth.uk.ibm.com [9.149.26.194]) by ppma06fra.de.ibm.com with ESMTP id 3jn5ghnv3r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 23 Sep 2022 10:35:43 +0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06avi18878370.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 28NAa8YR39977348 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 23 Sep 2022 10:36:08 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6202CAE059; Fri, 23 Sep 2022 10:35:41 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A1EF5AE057; Fri, 23 Sep 2022 10:35:36 +0000 (GMT) Received: from [9.43.40.22] (unknown [9.43.40.22]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Fri, 23 Sep 2022 10:35:36 +0000 (GMT) Message-ID: <3a966604-77c5-e6fc-1541-2fed7c71cc0c@linux.ibm.com> Date: Fri, 23 Sep 2022 16:05:30 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.1 Subject: Re: [PATCH v4] mm/demotion: Expose memory tier details via sysfs Content-Language: en-US To: "Huang, Ying" Cc: linux-mm@kvack.org, akpm@linux-foundation.org, Wei Xu , Yang Shi , Davidlohr Bueso , Tim C Chen , Michal Hocko , Linux Kernel Mailing List , Hesham Almatary , Dave Hansen , Jonathan Cameron , Alistair Popple , Dan Williams , Johannes Weiner , jvgediya.oss@gmail.com, Bharata B Rao References: <20220922102201.62168-1-aneesh.kumar@linux.ibm.com> <874jwyjyy9.fsf@yhuang6-desk2.ccr.corp.intel.com> From: Aneesh Kumar K V In-Reply-To: <874jwyjyy9.fsf@yhuang6-desk2.ccr.corp.intel.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: INbxC0JoIBAkkr3j-pMzcrV5m05BRPRE X-Proofpoint-ORIG-GUID: X6-BGHRBFgUjWrMlgzwXW4O5k3W1p20y X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.528,FMLib:17.11.122.1 definitions=2022-09-23_02,2022-09-22_02,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 mlxscore=0 phishscore=0 impostorscore=0 bulkscore=0 adultscore=0 malwarescore=0 spamscore=0 mlxlogscore=999 lowpriorityscore=0 priorityscore=1501 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2209130000 definitions=main-2209230068 ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1663929370; a=rsa-sha256; cv=none; b=2BX7pAQv9MbiTGJr5FCaNjICYcmL6eJgoNCB8BOj+7crlGos5gp2dAAkpEXQ97in8cQBUg C60W865lq1+8S2KqmGJtle2BnANkr00EvzO+eh5SUfhljyrXfphp/9ZnHTvb6M7fhe1EUp QjJnYerjNJD10ahGB+dtCWYw0Qnxqp4= ARC-Authentication-Results: i=1; imf26.hostedemail.com; dkim=pass header.d=ibm.com header.s=pp1 header.b=YSmP1tBi; spf=pass (imf26.hostedemail.com: domain of aneesh.kumar@linux.ibm.com designates 148.163.158.5 as permitted sender) smtp.mailfrom=aneesh.kumar@linux.ibm.com; dmarc=pass (policy=none) header.from=ibm.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1663929370; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=ooxMihpH152oG5VCj9k8zT0AYwKGGyXZsd3SxSfv/Mg=; b=SLKRxhFrbj1H/8OI49+h56MiRG9ZmARHe2SKzS4Qwo5nePr1gT38rNZg3L+Xt9N2MyIObq n0o3wZgsS4MbDmtY4+Oj6KUjDwyi79m5fXIXkoz+jZWm1o0EYjqV7N6w62fnxSyJKJF5Dr x8kd0S2tGtls6pJSSQ0ZB5PsA+E690E= Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=ibm.com header.s=pp1 header.b=YSmP1tBi; spf=pass (imf26.hostedemail.com: domain of aneesh.kumar@linux.ibm.com designates 148.163.158.5 as permitted sender) smtp.mailfrom=aneesh.kumar@linux.ibm.com; dmarc=pass (policy=none) header.from=ibm.com X-Rspam-User: X-Stat-Signature: 56o6587rjiuhbjfi5tfn8zejqaxefrtk X-Rspamd-Queue-Id: 22735140003 X-Rspamd-Server: rspam02 X-HE-Tag: 1663929369-967835 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 9/23/22 1:37 PM, Huang, Ying wrote: > "Aneesh Kumar K.V" writes: > >> This patch adds /sys/devices/virtual/memory_tiering/ where all memory tier >> related details can be found. All allocated memory tiers will be listed >> there as /sys/devices/virtual/memory_tiering/memory_tierN/ >> >> The nodes which are part of a specific memory tier can be listed via >> /sys/devices/virtual/memory_tiering/memory_tierN/nodes > > It appears that XXXs is used for mask while XXXs_list is used for list? > For example, > > # cat /sys/devices/system/cpu/cpu2/topology/core_cpus > 0,00100004 > # cat /sys/devices/system/cpu/cpu2/topology/core_cpus_list > 2,20 > > It's better to follow the this convention? > That is not followed in other parts of the kernel. I was loking at cpuset $cat cpuset.cpus.effective 0-7 >> A directory hierarchy looks like >> :/sys/devices/virtual/memory_tiering$ tree memory_tier4/ >> memory_tier4/ >> ├── nodes >> ├── subsystem -> ../../../../bus/memory_tiering >> └── uevent >> >> :/sys/devices/virtual/memory_tiering$ cat memory_tier4/nodes >> 0,2 >> >> Signed-off-by: Aneesh Kumar K.V > > Best Regards, > Huang, Ying > > [snip]