Received: by 2002:a5d:925a:0:0:0:0:0 with SMTP id e26csp211771iol; Thu, 9 Jun 2022 02:14:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwT51yMdxyYkZPAsABFRVVjzRmkBiaGeBvT5HWW4cgPMs74vxxrhI9vu4i+tmasKp/8ScBS X-Received: by 2002:a17:906:1cc3:b0:711:24e4:70e1 with SMTP id i3-20020a1709061cc300b0071124e470e1mr23162313ejh.551.1654766068305; Thu, 09 Jun 2022 02:14:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654766068; cv=none; d=google.com; s=arc-20160816; b=CkdZLDO0+z/TWVKj9yqvBLw2bF4S9AgouijNdk2SmilERo5DwgXb8nPG3PoI1Dmpi4 gFn84CdQXeCWreuAqzLzBAc86YPgvKAHe0AEKJVctTEO5O9vTScO6UG/iIU72DwMGsOJ sT1AX6ugb7A5jh/tJeFfRiKvWXsDAHvrTSQAFdiU1L/71Ipbc1pUFymUWYM4GklnmjuD PC3UeEdWGhYDIBQKwxHHU40jNzeZiTf4gSsCRVz763xuDHTl8R2v9osQJOUXGFVKO+Uh 8/fJd3wCsc5dXCaWSrMOqEVt27RFfpoxz5D+qGqZpAbMW7l3S5naOBtyacnnD3Ui8Yv1 qknQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=RlEBM5GB4cQkJjwHL8MJAF5Il+Z4n+I6fx6IyJsVSFQ=; b=tLoeSD08wp9YYK3wYkKrSVwUnKQF1Gsw+bugwLzJ9M+wvGFWrSBpSy+W0r5FXqLUjA ZjEg47CfdyZ5G34VbpO+LWnGSNSpysl68Y5+Y1a4Puvm3JqCyhXgIXb/t1PomDvsuySB gu4CDp2HQy4yrLyc1+BKskyM5VS40+RME3KXPa+8l0IGBs96aCL3Ha1MRXu+l6Ik1I1r Zre5SCbHsd06QrT/KXndBE9CWouxDG8ZvbFgMMnaW4DFhiXrEW1ZWhwopkfkz79vKpd0 eRTSc1BbaoR04ax9CB/irlPMsgTzOlKKnKgGb+NlYLI+9tVrokHqXK5uAKD5sFEK/ckS 1++w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b="LxH/paiM"; 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=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hd6-20020a170907968600b007048e19020esi19837900ejc.30.2022.06.09.02.14.02; Thu, 09 Jun 2022 02:14:28 -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=@ibm.com header.s=pp1 header.b="LxH/paiM"; 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=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240422AbiFIISv (ORCPT + 99 others); Thu, 9 Jun 2022 04:18:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52324 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229893AbiFIISq (ORCPT ); Thu, 9 Jun 2022 04:18:46 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8148B24BC0 for ; Thu, 9 Jun 2022 01:18:39 -0700 (PDT) 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 X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_MSPIKE_H2,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 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