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 DD2B0C433EF for ; Wed, 8 Jun 2022 08:28:09 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 79CB88D0019; Wed, 8 Jun 2022 04:28:09 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 74B998D0009; Wed, 8 Jun 2022 04:28:09 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5ED108D0019; Wed, 8 Jun 2022 04:28:09 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 502718D0009 for ; Wed, 8 Jun 2022 04:28:09 -0400 (EDT) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 24CC234F57 for ; Wed, 8 Jun 2022 08:28:09 +0000 (UTC) X-FDA: 79554391098.04.4627240 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by imf17.hostedemail.com (Postfix) with ESMTP id 713B540012 for ; Wed, 8 Jun 2022 08:28:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1654676888; x=1686212888; h=message-id:subject:from:to:cc:date:in-reply-to: references:mime-version:content-transfer-encoding; bh=8K6LeNsRWmnLejKyvvzLEzNHPs1j7CKcbVI/K2R0Ois=; b=Oxs/pk6Y6iNNekQAKbh9sRAnRJ+e0waXjS4I2h1+fQdC+/wyvinAyLl7 KW994DByXNxd9Fo5L/DAYMZJYNo5Ooyc2Ec85B3dpnzeuWsnE1S2BnRLX c1jWd+bu0aXVW9RVLSsk2wky6jhaqY1sRB2FqPBIx4yOW8v4fhSqcvd4a BP/uE+GO3s+WfIajphQMhppQNRgKRd0wfC8d+okK9mfpM5LwtbME6kITJ zIf90C41PenPT1Ubw3fyvTfB7k/j1B9IPboWlpibNv3jnC7Rvw9id0nMq n1itBWfuDSrzJtMJ3LbHKY5RbPKYr+q2aHc19/E4QfudqNSUdMiYcOCpR A==; X-IronPort-AV: E=McAfee;i="6400,9594,10371"; a="276843592" X-IronPort-AV: E=Sophos;i="5.91,285,1647327600"; d="scan'208";a="276843592" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jun 2022 01:28:06 -0700 X-IronPort-AV: E=Sophos;i="5.91,285,1647327600"; d="scan'208";a="723742180" Received: from xding11-mobl.ccr.corp.intel.com ([10.254.214.239]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jun 2022 01:28:02 -0700 Message-ID: <13a58454fc2512242d5ff69e9067afc926c3b563.camel@intel.com> Subject: Re: [RFC PATCH v4 1/7] mm/demotion: Add support for explicit memory tiers From: Ying Huang To: Aneesh Kumar K V , 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 Date: Wed, 08 Jun 2022 16:27:59 +0800 In-Reply-To: References: <20220527122528.129445-1-aneesh.kumar@linux.ibm.com> <20220527122528.129445-2-aneesh.kumar@linux.ibm.com> <604403db000ced33f997688ce82eaa43ed6c8bbe.camel@intel.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Authentication-Results: imf17.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b="Oxs/pk6Y"; dmarc=pass (policy=none) header.from=intel.com; spf=none (imf17.hostedemail.com: domain of ying.huang@intel.com has no SPF policy when checking 192.55.52.115) smtp.mailfrom=ying.huang@intel.com X-Stat-Signature: c1fb6mmoabuuy17knxzjt3p8wan3r7ph X-Rspam-User: X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 713B540012 X-HE-Tag: 1654676888-48661 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 Wed, 2022-06-08 at 13:54 +0530, Aneesh Kumar K V wrote: > 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? Yes. We don't need to panic system for this. Best Regards, Huang, Ying > > > + > > > + /* > > > + * 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 */ > > > > >