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 956D1C43334 for ; Thu, 9 Jun 2022 08:18:37 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D372D6B0085; Thu, 9 Jun 2022 04:18:36 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id CE6DD6B0087; Thu, 9 Jun 2022 04:18:36 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B874C6B0088; Thu, 9 Jun 2022 04:18:36 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id A9DA46B0085 for ; Thu, 9 Jun 2022 04:18:36 -0400 (EDT) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay13.hostedemail.com (Postfix) with ESMTP id 84B9F60F3D for ; Thu, 9 Jun 2022 08:18:36 +0000 (UTC) X-FDA: 79557995832.29.D2C948A Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by imf24.hostedemail.com (Postfix) with ESMTP id 0AEA518006B for ; Thu, 9 Jun 2022 08:18:35 +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 2596q3te029000; Thu, 9 Jun 2022 08:18:09 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=RlEBM5GB4cQkJjwHL8MJAF5Il+Z4n+I6fx6IyJsVSFQ=; b=LxH/paiMhZ90TjxJO52RajierJA9XlbE/eMysyM0b8YbVNa85d8Delp7qk5yjG2aoheA w3mEUw7kuH/63oVCOetxMxoXe/XPtKAKTGDsF7ldmCAcnT7TT0NTmMW4mTmByiNOgWvN ivqsGznpUWiH7B01ungX+gqbJfNK8JIUj/sVdk3IDnNu1INW22sg9x7RyH1JpKY+EnO4 0Ahfv5bj0RDiXH0zYT4HHo7QYPmxTbNUHUn0tjNBwp16VLf021zFHHUZl5WM2aayYaVI kBoK5bQN9JHeHBkdWSUS31T8JpbiMStTHHPrMoyhhHqRsJIX/qHAtmnXyvKsNQcLHofg 3g== Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3gkby9shqq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 09 Jun 2022 08:18:09 +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 2596qokt029650; Thu, 9 Jun 2022 08:18:08 GMT Received: from ppma03ams.nl.ibm.com (62.31.33a9.ip4.static.sl-reverse.com [169.51.49.98]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3gkby9shqa-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 09 Jun 2022 08:18:08 +0000 Received: from pps.filterd (ppma03ams.nl.ibm.com [127.0.0.1]) by ppma03ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 259860fv026103; Thu, 9 Jun 2022 08:18:06 GMT Received: from b06avi18878370.portsmouth.uk.ibm.com (b06avi18878370.portsmouth.uk.ibm.com [9.149.26.194]) by ppma03ams.nl.ibm.com with ESMTP id 3gfy19ek53-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 09 Jun 2022 08:18:06 +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 2598I64D24772918 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 9 Jun 2022 08:18:06 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 248EDAE045; Thu, 9 Jun 2022 08:18:04 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id F2E6FAE04D; Thu, 9 Jun 2022 08:17:59 +0000 (GMT) Received: from [9.109.205.170] (unknown [9.109.205.170]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 9 Jun 2022 08:17:59 +0000 (GMT) Message-ID: Date: Thu, 9 Jun 2022 13:47:59 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH v5 1/9] mm/demotion: Add support for explicit memory tiers Content-Language: en-US To: Yang Shi Cc: Linux MM , Andrew Morton , Wei Xu , Huang Ying , Greg Thelen , Davidlohr Bueso , Tim C Chen , Brice Goglin , Michal Hocko , Linux Kernel Mailing List , Hesham Almatary , Dave Hansen , Jonathan Cameron , Alistair Popple , Dan Williams , Feng Tang , Jagdish Gediya , Baolin Wang , David Rientjes References: <20220603134237.131362-1-aneesh.kumar@linux.ibm.com> <20220603134237.131362-2-aneesh.kumar@linux.ibm.com> <2b4f053b-de25-986c-f764-5cc6a28f4953@linux.ibm.com> From: Aneesh Kumar K V In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: i4nusXWK5onzxVhdlimBAdhsyek0OmhH X-Proofpoint-GUID: rCJ0qriMgfvzRBnhux-UTqsD8ZNH_Hdt X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.874,Hydra:6.0.517,FMLib:17.11.64.514 definitions=2022-06-09_08,2022-06-07_02,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 mlxlogscore=916 phishscore=0 adultscore=0 mlxscore=0 bulkscore=0 malwarescore=0 impostorscore=0 lowpriorityscore=0 priorityscore=1501 clxscore=1015 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2204290000 definitions=main-2206090029 ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1654762716; a=rsa-sha256; cv=none; b=Hg+zWo/W5HBwIar4NDhPRKsLSnFiAnkhL3UMyZdbi9NpU7X+zCYRiVSZ4OYcigkQlB5mkw /A7Ikg9yKym3CQw7OjgB1/m2i66P63Pbpn4FLG7FX0MacihQpkr6FsrvKQJBhwyUnVW626 L/gATkPwqvtoggQowfkk1g1MrO32rQc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1654762716; 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=RlEBM5GB4cQkJjwHL8MJAF5Il+Z4n+I6fx6IyJsVSFQ=; b=5C64SZPtL1Ws1eXatb2C6PKeA81K6BBre69WjqvryNwLQpjMZ1DzkPgIfSnJqFI1Tnbkzg Pe00nugWP0NSGLpB+fxu0vZm9fZ5/kWFsniOF+GjK95IEQNX7/MA6ZEcr7N2fprJ73BeXm tBZYzlxFTLJUCDQs+w0BiV/OZ8/pJMY= ARC-Authentication-Results: i=1; imf24.hostedemail.com; dkim=pass header.d=ibm.com header.s=pp1 header.b="LxH/paiM"; dmarc=pass (policy=none) header.from=ibm.com; spf=pass (imf24.hostedemail.com: domain of aneesh.kumar@linux.ibm.com designates 148.163.158.5 as permitted sender) smtp.mailfrom=aneesh.kumar@linux.ibm.com Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=ibm.com header.s=pp1 header.b="LxH/paiM"; dmarc=pass (policy=none) header.from=ibm.com; spf=pass (imf24.hostedemail.com: domain of aneesh.kumar@linux.ibm.com designates 148.163.158.5 as permitted sender) smtp.mailfrom=aneesh.kumar@linux.ibm.com X-Stat-Signature: 4f5mp7of3tch331inmrbabsne9qef6ow X-Rspamd-Queue-Id: 0AEA518006B X-Rspamd-Server: rspam12 X-Rspam-User: X-HE-Tag: 1654762715-896338 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 6/8/22 10:12 PM, Yang Shi wrote: > On Tue, Jun 7, 2022 at 9:58 PM Aneesh Kumar K V > wrote: .... >> config TIERED_MEMORY >> bool "Support for explicit memory tiers" >> - def_bool n >> - depends on MIGRATION && NUMA >> - help >> - Support to split nodes into memory tiers explicitly and >> - to demote pages on reclaim to lower tiers. This option >> - also exposes sysfs interface to read nodes available in >> - specific tier and to move specific node among different >> - possible tiers. >> + def_bool MIGRATION && NUMA > > CONFIG_NUMA should be good enough. Memory tiering doesn't have to mean > demotion/promotion has to be supported IMHO. > >> >> config HUGETLB_PAGE_SIZE_VARIABLE >> def_bool n >> >> ie, we just make it a Kconfig variable without exposing it to the user? >> We can do that but that would also mean in order to avoid building the demotion targets etc we will now have to have multiple #ifdef CONFIG_MIGRATION in mm/memory-tiers.c . It builds without those #ifdef So these are not really build errors, but rather we will be building all the demotion targets for no real use with them. What usecase do you have to expose memory tiers on a system with CONFIG_MIGRATION disabled? CONFIG_MIGRATION gets enabled in almost all configs these days due to its dependency against COMPACTION and TRANSPARENT_HUGEPAGE. Unless there is a real need, I am wondering if we can avoid sprinkling #ifdef CONFIG_MIGRATION in mm/memory-tiers.c -aneesh