Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2330503iof; Wed, 8 Jun 2022 02:39:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxbe0sT7OCEKc38Fsms+1ET0j2MW1As0ORwyiyzD4hb2qTmpb5Z2UQnHjN/oKh5d70FFSqN X-Received: by 2002:a63:88c6:0:b0:3fc:aa43:7e3b with SMTP id l189-20020a6388c6000000b003fcaa437e3bmr28765077pgd.567.1654681169956; Wed, 08 Jun 2022 02:39:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654681169; cv=none; d=google.com; s=arc-20160816; b=dJwI+L8kY+MmvG2WiOQMiVKMUEGfLP34TyIfm3lvftadnLymAn23cqV93GsNKBqK3D Dn+2C87iQebWB+5IqnvzvlY2qValFyyqbElbRchSVviecgz+egUyvAyYBlxFhSgbNqzH CNwBEJ00bzdqxLd/25d5Nvdhlb5fse5km+kNr7UqwHMKyZTHfWPiRSUnpFY4H3EOzpRK 063twOLnUfVYbu42FmItHfB/KABV5lXfTPOR5AkwzPhw0gxV3t9OtDBSXHY0NRHv03dX m5oFCYVSIHl5nS0wsPVp6bD6AfcX5zwIyLeUiFByKrrxu66ldjcFt21ib11Ej+qYfZ8A XfRw== 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=n8YORMICtcoEXTgTlEMkLLrxOJq2wW8tJfHevJnl+N8=; b=bturl7Gs1Q0GS3nMjKoJGPVoOmbntJnUOwEirwQ/J9/BxElAEd3VRcMTz/8uq7kRIo ZMVrQE6GFD1dgnXF+LrK7n2EQ118+20YNK0XarIlHXNtSDm7Tc1Q97dRTIxc8+2OtApJ TestbOoqh6NVk2jwJd48hN5NclWpjbGZi1FtkZcBWfQbMMfhcvKezN+ztKNGDI7ZogIn nSHVb4NQHUmX5MKisXNfYJprv8+JxLoWsbEtduRwz2AARBHCJGnB0JxEDbcAVgs0SUIO hm9jpdAJDPj1iQByQ4Dzzdqkug4DLtDowTBe37slYCjcoByenM/PHXffo2TrIwJ1F5/7 4JPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=GDeKjKqo; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id 22-20020a631756000000b003fa74d5d33fsi27989541pgx.448.2022.06.08.02.39.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jun 2022 02:39:29 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=GDeKjKqo; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B260716FEE1; Wed, 8 Jun 2022 02:11:21 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232778AbiFHJJC (ORCPT + 99 others); Wed, 8 Jun 2022 05:09:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44570 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233783AbiFHJHK (ORCPT ); Wed, 8 Jun 2022 05:07:10 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 767E4101915 for ; Wed, 8 Jun 2022 01:25:09 -0700 (PDT) Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 25888rON020142; Wed, 8 Jun 2022 08:24:51 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=n8YORMICtcoEXTgTlEMkLLrxOJq2wW8tJfHevJnl+N8=; b=GDeKjKqoZhFWfT7mL5+blzBjwS5YYR/PJkUTQI7Ojn0bqEwz6YE4ZjjXZfNyv8rUKCCf k0nJKIwGT12MJNTdKP78ZyqOYsIyJFNuq37plndq6vdLweENV94CO8Hot07jMD2ajgH8 PXtmUbv/LNWPymo83ePbGVsisBFhC40JKz0ccp1DSX+soM497a16GH5Arau9avVEx4+g aTkizcib1++5WsKzOV9dg2IG4A/Gy+RyOpjGIzaQ5wmIhsIxe3l3Ycneh0FGgr3ye23n qPCl9Pox5Hb2i/okXz/MT1F32rOgIUE0zxWDuCshzWsWRxBOfABobvXXjHi4VIg6RrV2 SA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3gjr0mra70-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 08 Jun 2022 08:24:50 +0000 Received: from m0098399.ppops.net (m0098399.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 2588DT6L007042; Wed, 8 Jun 2022 08:24:50 GMT Received: from ppma03ams.nl.ibm.com (62.31.33a9.ip4.static.sl-reverse.com [169.51.49.98]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3gjr0mra68-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 08 Jun 2022 08:24:49 +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 2588JwuB025071; Wed, 8 Jun 2022 08:24:47 GMT Received: from b06avi18626390.portsmouth.uk.ibm.com (b06avi18626390.portsmouth.uk.ibm.com [9.149.26.192]) by ppma03ams.nl.ibm.com with ESMTP id 3gfy19cv8w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 08 Jun 2022 08:24:47 +0000 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06avi18626390.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 2588OSsL22741320 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 8 Jun 2022 08:24:28 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 12A895204E; Wed, 8 Jun 2022 08:24:45 +0000 (GMT) Received: from [9.43.53.124] (unknown [9.43.53.124]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTP id 78D5152050; Wed, 8 Jun 2022 08:24:39 +0000 (GMT) Message-ID: Date: Wed, 8 Jun 2022 13:54:38 +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: [RFC PATCH v4 1/7] mm/demotion: Add support for explicit memory tiers Content-Language: en-US To: Ying Huang , linux-mm@kvack.org, akpm@linux-foundation.org Cc: Greg Thelen , Yang Shi , 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: <20220527122528.129445-1-aneesh.kumar@linux.ibm.com> <20220527122528.129445-2-aneesh.kumar@linux.ibm.com> <604403db000ced33f997688ce82eaa43ed6c8bbe.camel@intel.com> From: Aneesh Kumar K V In-Reply-To: <604403db000ced33f997688ce82eaa43ed6c8bbe.camel@intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: nmOCLq0ZUk4nnP_msbBOQTEgj7rag_i0 X-Proofpoint-ORIG-GUID: 7vBFHH2_ZDmACl9Qr52T_s72RjWl9TLR 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-08_02,2022-06-07_02,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 spamscore=0 malwarescore=0 adultscore=0 phishscore=0 bulkscore=0 lowpriorityscore=0 impostorscore=0 mlxlogscore=999 clxscore=1015 mlxscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2204290000 definitions=main-2206080035 X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,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 6/8/22 12:46 PM, Ying Huang wrote: > On Fri, 2022-05-27 at 17:55 +0530, Aneesh Kumar K.V wrote: > > [snip] > >> >> +static int __init memory_tier_init(void) >> +{ >> + int ret; >> + >> + ret = subsys_system_register(&memory_tier_subsys, memory_tier_attr_groups); >> + if (ret) >> + panic("%s() failed to register subsystem: %d\n", __func__, ret); > > I don't think we should go panic for failing to register subsys and > device for memory tiers. Just pr_err() should be enough. > So you are suggesting we continue to work with memory tiers with no userspace interface? >> + >> + /* >> + * Register only default memory tier to hide all empty >> + * memory tier from sysfs. >> + */ >> + ret = register_memory_tier(DEFAULT_MEMORY_TIER); >> + if (ret) >> + panic("%s() failed to register memory tier: %d\n", __func__, ret); >> + >> + /* >> + * CPU only nodes are not part of memoty tiers. >> + */ >> + memory_tiers[DEFAULT_MEMORY_TIER]->nodelist = node_states[N_MEMORY]; >> + >> + return 0; >> +} >> +subsys_initcall(memory_tier_init); >> + >> +#endif /* CONFIG_TIERED_MEMORY */ > >